Compare commits

..
Author SHA1 Message Date
farajollahi c8e5a65f5d fix(dashboard): support multiple institutions and improve project analytics
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-08-17 16:32:50 +02:00
farajollahi a6c4668d13 show projects of institut
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-08-17 14:57:31 +02:00
farajollahi df5f131320 fix(dashboard): synchronize institution selection and project status data 2026-08-17 13:03:26 +02:00
spsaefan 2f22240d94 Fix dashboard card navigation
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-08-17 11:50:47 +02:00
spsaefan 77095c8549 Set default institution tab 2026-08-17 11:50:21 +02:00
spsaefan c733442300 Remove all institutions tab 2026-08-17 11:47:43 +02:00
spsaefan 8d7323a387 Add institution filter tests
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-08-15 22:46:05 +02:00
spsaefan 6a6ec8662c Filter dashboard analytics by institution 2026-08-15 22:45:56 +02:00
spsaefan c70e6bf489 Filter word cloud by institution 2026-08-15 22:45:40 +02:00
spsaefan 82fa2e816b Add institution filtering 2026-08-15 22:45:24 +02:00
spsaefan fbcee778d2 Add institution tab styles 2026-08-15 22:44:34 +02:00
spsaefan 1758227f1e Add institution tabs 2026-08-15 22:43:52 +02:00
farajollahi 545f38bc3d Merge branch 'dev' into multi-organisations-statics
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-08-12 10:55:48 +02:00
farajollahi c8fa70e7f0 feat(dashboard): add institution filter for organization-wide statistics
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-08-11 12:53:13 +02:00
260 changed files with 13247 additions and 21706 deletions
+1 -3
View File
@@ -19,6 +19,4 @@ angular-app/.angular
# Ignore sentence-transformer local model cache
service/sentence_transformer/models/
llm_evaluations/bio_generation/.venv
.devcontainer
llm_evaluations/bio_generation/.venv
+2
View File
@@ -213,6 +213,7 @@ async def change_password(
operation_id="canFetchGdprRelevantData",
)
async def can_fetch_gdpr_relevant_data(
session: SessionDep,
access_token: Annotated[
AccessTokenMetadata,
auth_service.CurrentUserAccessTokenPayloadDep,
@@ -227,6 +228,7 @@ async def can_fetch_gdpr_relevant_data(
] = None,
) -> bool:
return await auth_service.can_fetch_gdpr_relevant_data(
session=session,
access_token=access_token,
raw_oa_author_id=raw_oa_author_id,
raw_oa_institution_id=raw_oa_institution_id,
+50 -18
View File
@@ -1467,6 +1467,7 @@ def change_password(
async def can_fetch_gdpr_relevant_data(
session: Session,
access_token: AccessTokenMetadata,
raw_oa_author_id: str | None = None,
raw_oa_institution_id: str | None = None,
@@ -1493,40 +1494,71 @@ async def can_fetch_gdpr_relevant_data(
logger.debug("No OpenAlex author ID or institution ID provided")
return False
effective_institution_id = access_token.effective_institution_id
# Current user does not belong to any institution
if not effective_institution_id:
institution_ids = list(
session.exec(
select(OrganizationInstitution.openalex_institution_id)
.where(
OrganizationInstitution.organization_id
== access_token.effective_organization_id
)
.order_by(OrganizationInstitution.position)
).all()
)
if not institution_ids and access_token.effective_institution_id:
institution_ids = [access_token.effective_institution_id]
if not institution_ids:
logger.debug(
"Current user does not belong to any institution, cannot fetch GDPR-relevant data"
)
return False
# Current user belongs to an institution, but the request is for a different institution
from inse.organization_management import service as organization_service
association_groups = await organization_service.resolve_institution_associations(
institution_ids
)
organization_institution_ids = set(institution_ids)
for group in association_groups:
organization_institution_ids.add(group.id.rstrip("/").split("/")[-1])
organization_institution_ids.update(
association.id.rstrip("/").split("/")[-1]
for association in group.associated_institutions
)
requested_institution_id = (
raw_oa_institution_id.rstrip("/").split("/")[-1]
if raw_oa_institution_id
else None
)
if (
raw_oa_institution_id
and effective_institution_id
and raw_oa_institution_id != effective_institution_id
requested_institution_id
and requested_institution_id not in organization_institution_ids
):
logger.debug(
"Current user belongs to institution %s, but request is for institution %s, cannot fetch GDPR-relevant data",
effective_institution_id,
raw_oa_institution_id,
organization_institution_ids,
requested_institution_id,
)
return False
# Current user belongs to an institution, but request is for author not belonging to that institution
if raw_oa_author_id:
author_belongs_to_institution = (
await authors_service.author_currently_belongs_to_institution(
raw_oa_author_id or "", effective_institution_id
)
)
for institution_id in organization_institution_ids:
if await authors_service.author_currently_belongs_to_institution(
raw_oa_author_id, institution_id
):
logger.debug(
"Author %s belongs to organization institution %s",
raw_oa_author_id,
institution_id,
)
return True
logger.debug(
"Author %s belongs to institution %s: %s",
"Author %s does not belong to any organization institution %s",
raw_oa_author_id,
effective_institution_id,
author_belongs_to_institution,
organization_institution_ids,
)
return author_belongs_to_institution
return False
return True
@@ -1,6 +1,7 @@
import datetime as _dt
import uuid
from datetime import timedelta
from unittest.mock import AsyncMock, patch
import pytest
from fastapi import HTTPException, Response
@@ -14,11 +15,16 @@ from inse.auth.model import (
Account,
IdTokenMetadata,
Organization,
OrganizationInstitution,
RefreshTokenMetadata,
Secret,
SecretPurpose,
UserRole,
)
from inse.organization_management.model import (
InstitutionAssociation,
InstitutionAssociationsResponse,
)
@pytest.fixture()
@@ -81,6 +87,74 @@ def test_hash_and_verify_password():
assert auth_service._verify_password("wrong", h) is False
@pytest.mark.anyio
async def test_gdpr_access_allows_every_organization_institution(in_memory_session):
org, account = create_org_and_account(
in_memory_session, "multi-institution@example.com", "pw"
)
in_memory_session.add_all(
[
OrganizationInstitution(
organization_id=org.id,
openalex_institution_id="I111",
position=0,
),
OrganizationInstitution(
organization_id=org.id,
openalex_institution_id="I222",
position=1,
),
]
)
in_memory_session.commit()
token = AccessTokenMetadata(
real_account_id=account.id,
expires_at=_dt.datetime.now(_dt.UTC) + timedelta(hours=1),
user_fingerprint_hash="fingerprint",
effective_account_id=account.id,
effective_organization_id=org.id,
effective_institution_id="I111",
)
associations = [
InstitutionAssociationsResponse(
id="I111",
display_name="Root institution",
associated_institutions=[
InstitutionAssociation(
id="I333",
display_name="Child institution",
relationship="child",
)
],
),
InstitutionAssociationsResponse(
id="I222",
display_name="Second institution",
associated_institutions=[],
),
]
with patch(
"inse.organization_management.service.resolve_institution_associations",
new=AsyncMock(return_value=associations),
):
assert await auth_service.can_fetch_gdpr_relevant_data(
session=in_memory_session,
access_token=token,
raw_oa_institution_id="https://openalex.org/I222",
)
assert await auth_service.can_fetch_gdpr_relevant_data(
session=in_memory_session,
access_token=token,
raw_oa_institution_id="I333",
)
assert not await auth_service.can_fetch_gdpr_relevant_data(
session=in_memory_session,
access_token=token,
raw_oa_institution_id="I444",
)
def test_request_otk_and_login_flow(in_memory_session, settings_backup):
config_module.settings.token_hmac_key = "test-hmac-key"
config_module.settings.token_issuer_id = "test-issuer"
@@ -113,7 +187,9 @@ def test_request_otk_and_login_flow(in_memory_session, settings_backup):
assert login_result.id_token.real_account_id == acc.id
raw_id_token = _get_cookie_value(response, auth_service.ID_TOKEN_COOKIE_KEY)
payload = auth_service._verify_id_token(raw_id_token=raw_id_token, session=in_memory_session)
payload = auth_service._verify_id_token(
raw_id_token=raw_id_token, session=in_memory_session
)
assert payload[auth_service.REAL_ACCOUNT_ID_KEY] == str(acc.id)
@@ -175,7 +251,9 @@ def test_access_and_refresh_token_flow(in_memory_session, settings_backup):
)
assert isinstance(access_response.access_token, AccessTokenMetadata)
raw_refresh_token = _get_cookie_value(response, auth_service.REFRESH_TOKEN_COOKIE_KEY)
raw_refresh_token = _get_cookie_value(
response, auth_service.REFRESH_TOKEN_COOKIE_KEY
)
refresh_payload = auth_service._verify_refresh_token(
raw_refresh_token=raw_refresh_token,
session=in_memory_session,
@@ -185,9 +263,7 @@ def test_access_and_refresh_token_flow(in_memory_session, settings_backup):
effective_account_id=uuid.UUID(
refresh_payload[auth_service.EFFECTIVE_ACCOUNT_ID_KEY]
),
expires_at=_dt.datetime.fromtimestamp(
refresh_payload["exp"], tz=_dt.UTC
),
expires_at=_dt.datetime.fromtimestamp(refresh_payload["exp"], tz=_dt.UTC),
epoch=refresh_payload[auth_service.EPOCH_KEY],
effective_role=UserRole(refresh_payload[auth_service.EFFECTIVE_ROLE_KEY]),
effective_organization_id=uuid.UUID(
@@ -240,7 +316,9 @@ def test_access_and_refresh_token_preserve_multiple_roles(
UserRole.USER.value,
]
raw_refresh_token = _get_cookie_value(response, auth_service.REFRESH_TOKEN_COOKIE_KEY)
raw_refresh_token = _get_cookie_value(
response, auth_service.REFRESH_TOKEN_COOKIE_KEY
)
refresh_payload = auth_service._verify_refresh_token(
raw_refresh_token=raw_refresh_token,
session=in_memory_session,
@@ -634,7 +712,6 @@ def test_get_account_epoch_not_found(in_memory_session):
auth_service._get_account_epoch(in_memory_session, random_id)
def test_request_password_reset_creates_secret(in_memory_session, settings_backup):
email = "reset@example.com"
password = "oldpw123"
+5
View File
@@ -1,6 +1,11 @@
from pydantic import BaseModel
class DashboardInstitution(BaseModel):
id: str
display_name: str
class DashboardStatistics(BaseModel):
institution_id: str
organization_name: str
@@ -1,3 +1,5 @@
import asyncio
from inse.institutions.institutions_search_client import InstitutionsSearchClient
from inse.projects import service as projects_service
from inse.projects.model import EuCordisProjectType
@@ -10,21 +12,53 @@ from .common import (
from .model import DashboardStatisticValue
def _institution_ids(value: str | list[str]) -> list[str]:
return value if isinstance(value, list) else [value]
def _scope_id(institution_ids: list[str]) -> str:
return (
_normalize_institution_id(institution_ids[0])
if len(institution_ids) == 1
else "all"
)
async def _institution_aliases(institution_ids: list[str]) -> list[str]:
client = InstitutionsSearchClient()
aliases = await asyncio.gather(
*(
client.get_institution_aliases_by_oa_institution_id(
_raw_institution_id(institution_id)
)
for institution_id in institution_ids
)
)
return list(dict.fromkeys(alias for group in aliases for alias in group))
async def get_dashboard_eu_projects(
institution_id: str,
institution_id: str | list[str],
organization_name: str,
from_year: int | None = None,
to_year: int | None = None,
) -> DashboardStatisticValue:
normalized_id = _normalize_institution_id(institution_id)
institution_ids = _institution_ids(institution_id)
period = _dashboard_period(from_year, to_year)
multiple_institutions = len(institution_ids) > 1
projects = await projects_service.search_eu_cordis_projects(
institutions_search_client=InstitutionsSearchClient(),
raw_oa_institution_id=_raw_institution_id(normalized_id),
raw_oa_institution_id=(
None if multiple_institutions else _raw_institution_id(institution_ids[0])
),
author_id=None,
author_ids=None,
organization_ids=None,
organization_names=None,
organization_names=(
await _institution_aliases(institution_ids)
if multiple_institutions
else None
),
project_types=list(EuCordisProjectType),
keywords=None,
topic_ids=None,
@@ -45,24 +79,27 @@ async def get_dashboard_eu_projects(
fuzzy=False,
)
return DashboardStatisticValue(
institution_id=normalized_id,
institution_id=_scope_id(institution_ids),
organization_name=organization_name,
value=projects.total,
)
async def get_dashboard_bmbf_projects(
institution_id: str,
institution_id: str | list[str],
organization_name: str,
from_year: int | None = None,
to_year: int | None = None,
) -> DashboardStatisticValue:
normalized_id = _normalize_institution_id(institution_id)
institution_ids = _institution_ids(institution_id)
period = _dashboard_period(from_year, to_year)
multiple_institutions = len(institution_ids) > 1
projects = await projects_service.search_bund_projects_with_filters(
institutions_search_client=InstitutionsSearchClient(),
executing_agency=None,
raw_oa_institution_id=_raw_institution_id(normalized_id),
raw_oa_institution_id=(
None if multiple_institutions else _raw_institution_id(institution_ids[0])
),
title=None,
keywords=None,
funding_arts=None,
@@ -78,25 +115,33 @@ async def get_dashboard_bmbf_projects(
sort_by="id",
sort_direction="asc",
fuzzy=False,
oa_institution_aliases=(
await _institution_aliases(institution_ids)
if multiple_institutions
else None
),
)
return DashboardStatisticValue(
institution_id=normalized_id,
institution_id=_scope_id(institution_ids),
organization_name=organization_name,
value=projects.total,
)
async def get_dashboard_dfg_projects(
institution_id: str,
institution_id: str | list[str],
organization_name: str,
from_year: int | None = None,
to_year: int | None = None,
) -> DashboardStatisticValue:
normalized_id = _normalize_institution_id(institution_id)
institution_ids = _institution_ids(institution_id)
period = _dashboard_period(from_year, to_year)
multiple_institutions = len(institution_ids) > 1
projects = await projects_service.get_dfg_projects(
institutions_search_client=InstitutionsSearchClient(),
raw_oa_institution_id=_raw_institution_id(normalized_id),
raw_oa_institution_id=(
None if multiple_institutions else _raw_institution_id(institution_ids[0])
),
author_id=None,
author_filter_ids=None,
institution_ids=None,
@@ -114,9 +159,14 @@ async def get_dashboard_dfg_projects(
sort_direction="asc",
fuzzy=False,
skip_enrichment=True,
institution_aliases=(
await _institution_aliases(institution_ids)
if multiple_institutions
else None
),
)
return DashboardStatisticValue(
institution_id=normalized_id,
institution_id=_scope_id(institution_ids),
organization_name=organization_name,
value=projects.total,
)
@@ -25,6 +25,7 @@ from .project_statistics_service import (
get_dashboard_dfg_projects,
get_dashboard_eu_projects,
)
from .project_ids_service import _get_dfg_project_ids_from_projects_service
def _status_count(aggregations: dict[str, Any], status_name: str) -> int:
@@ -77,13 +78,22 @@ async def get_dashboard_eu_project_statuses(
to_year: int | None = None,
) -> EuProjectStatusStatistics:
normalized_id = _normalize_institution_id(institution_id)
aliases = await _institution_aliases(normalized_id, organization_name)
project_ids = await _eu_project_ids_for_aliases(aliases)
total = (
await get_dashboard_eu_projects(
normalized_id, organization_name, from_year=from_year, to_year=to_year
)
).value
if total == 0:
return EuProjectStatusStatistics(
institution_id=normalized_id,
organization_name=organization_name,
ongoing=0,
upcoming=0,
completed=0,
)
aliases = await _institution_aliases(normalized_id, organization_name)
project_ids = await _eu_project_ids_for_aliases(aliases)
if not project_ids:
return EuProjectStatusStatistics(
institution_id=normalized_id,
@@ -152,6 +162,20 @@ async def get_dashboard_bmbf_project_statuses(
to_year: int | None = None,
) -> BmbfProjectStatusStatistics:
normalized_id = _normalize_institution_id(institution_id)
total = (
await get_dashboard_bmbf_projects(
normalized_id, organization_name, from_year=from_year, to_year=to_year
)
).value
if total == 0:
return BmbfProjectStatusStatistics(
institution_id=normalized_id,
organization_name=organization_name,
ongoing=0,
upcoming=0,
completed=0,
)
aliases = await _institution_aliases(normalized_id, organization_name)
period = _dashboard_period(from_year, to_year)
filters = [_alias_match_query("Zuwendungsempfänger", aliases)]
@@ -171,11 +195,6 @@ async def get_dashboard_bmbf_project_statuses(
cluster=ESCluster.INSE,
)
aggregations = response.get("aggregations", {})
total = (
await get_dashboard_bmbf_projects(
normalized_id, organization_name, from_year=from_year, to_year=to_year
)
).value
ongoing, upcoming, completed = reconcile_status_counts(
total,
int(aggregations.get("ongoing", {}).get("doc_count", 0)),
@@ -199,12 +218,25 @@ async def get_dashboard_dfg_project_statuses(
) -> DfgProjectStatusStatistics:
normalized_id = _normalize_institution_id(institution_id)
period = _dashboard_period(from_year, to_year)
project_ids = await _get_dfg_project_ids_for_institution(normalized_id)
total = (
await get_dashboard_dfg_projects(
normalized_id, organization_name, from_year=from_year, to_year=to_year
)
).value
if total == 0:
return DfgProjectStatusStatistics(
institution_id=normalized_id,
organization_name=organization_name,
ongoing=0,
upcoming=0,
completed=0,
)
project_ids = await _get_dfg_project_ids_from_projects_service(
normalized_id,
from_year=from_year,
to_year=to_year,
)
if not project_ids:
return DfgProjectStatusStatistics(
institution_id=normalized_id,
+143 -28
View File
@@ -11,6 +11,7 @@ from inse.tags import Tags
from .model import (
BmbfProjectStatusStatistics,
BundProjectTopics,
DashboardInstitution,
DashboardStatistics,
DashboardStatisticValue,
DfgProjectStatusStatistics,
@@ -23,10 +24,13 @@ from .model import (
TopicWordCloud,
)
from .service import (
get_dashboard_analytical_institution,
get_dashboard_institutions,
get_dashboard_organization,
get_dashboard_patents,
get_dashboard_persons,
get_dashboard_publications,
get_dashboard_statistic_institution_ids,
get_dashboard_statistics,
get_topic_heatmap,
get_topic_word_cloud,
@@ -56,6 +60,19 @@ from .top_authors_service import (
router = APIRouter(prefix="/api/dashboard", tags=[Tags.DASHBOARD])
@router.get(
"/institutions",
operation_id="getDashboardInstitutions",
response_model=list[DashboardInstitution],
)
async def dashboard_institutions(
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> list[DashboardInstitution]:
organization = get_dashboard_organization(session, access_token)
return await get_dashboard_institutions(session, organization)
@router.get(
"/statistics",
operation_id="getDashboardStatistics",
@@ -78,14 +95,18 @@ async def dashboard_statistics(
response_model=DashboardStatisticValue,
)
async def dashboard_publications(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DashboardStatisticValue:
organization = get_dashboard_organization(session, access_token)
institution_ids = await get_dashboard_statistic_institution_ids(
session, organization, institution_id
)
return await get_dashboard_publications(
organization.openalex_institution_id,
institution_ids,
organization.name,
from_year=from_year,
to_year=to_year,
@@ -98,14 +119,18 @@ async def dashboard_publications(
response_model=DashboardStatisticValue,
)
async def dashboard_persons(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DashboardStatisticValue:
organization = get_dashboard_organization(session, access_token)
institution_ids = await get_dashboard_statistic_institution_ids(
session, organization, institution_id
)
return await get_dashboard_persons(
organization.openalex_institution_id,
institution_ids,
organization.name,
from_year=from_year,
to_year=to_year,
@@ -118,14 +143,18 @@ async def dashboard_persons(
response_model=DashboardStatisticValue,
)
async def dashboard_patents(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DashboardStatisticValue:
organization = get_dashboard_organization(session, access_token)
institution_ids = await get_dashboard_statistic_institution_ids(
session, organization, institution_id
)
return await get_dashboard_patents(
organization.openalex_institution_id,
institution_ids,
organization.name,
from_year=from_year,
to_year=to_year,
@@ -138,14 +167,18 @@ async def dashboard_patents(
response_model=DashboardStatisticValue,
)
async def dashboard_eu_projects(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DashboardStatisticValue:
organization = get_dashboard_organization(session, access_token)
institution_ids = await get_dashboard_statistic_institution_ids(
session, organization, institution_id
)
return await get_dashboard_eu_projects(
organization.openalex_institution_id,
institution_ids,
organization.name,
from_year=from_year,
to_year=to_year,
@@ -158,15 +191,21 @@ async def dashboard_eu_projects(
response_model=EuProjectStatusStatistics,
)
async def dashboard_eu_project_statuses(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> EuProjectStatusStatistics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_dashboard_eu_project_statuses(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
from_year=from_year,
to_year=to_year,
)
@@ -178,14 +217,18 @@ async def dashboard_eu_project_statuses(
response_model=DashboardStatisticValue,
)
async def dashboard_bmbf_projects(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DashboardStatisticValue:
organization = get_dashboard_organization(session, access_token)
institution_ids = await get_dashboard_statistic_institution_ids(
session, organization, institution_id
)
return await get_dashboard_bmbf_projects(
organization.openalex_institution_id,
institution_ids,
organization.name,
from_year=from_year,
to_year=to_year,
@@ -198,15 +241,21 @@ async def dashboard_bmbf_projects(
response_model=BmbfProjectStatusStatistics,
)
async def dashboard_bmbf_project_statuses(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> BmbfProjectStatusStatistics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_dashboard_bmbf_project_statuses(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
from_year=from_year,
to_year=to_year,
)
@@ -218,14 +267,18 @@ async def dashboard_bmbf_project_statuses(
response_model=DashboardStatisticValue,
)
async def dashboard_dfg_projects(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DashboardStatisticValue:
organization = get_dashboard_organization(session, access_token)
institution_ids = await get_dashboard_statistic_institution_ids(
session, organization, institution_id
)
return await get_dashboard_dfg_projects(
organization.openalex_institution_id,
institution_ids,
organization.name,
from_year=from_year,
to_year=to_year,
@@ -238,15 +291,21 @@ async def dashboard_dfg_projects(
response_model=DfgProjectStatusStatistics,
)
async def dashboard_dfg_project_statuses(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DfgProjectStatusStatistics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_dashboard_dfg_project_statuses(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
from_year=from_year,
to_year=to_year,
)
@@ -258,15 +317,21 @@ async def dashboard_dfg_project_statuses(
response_model=DfgProjectTopics,
)
async def dashboard_dfg_project_topics(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> DfgProjectTopics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_dashboard_dfg_topics(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
from_year=from_year,
to_year=to_year,
)
@@ -278,15 +343,21 @@ async def dashboard_dfg_project_topics(
response_model=EuProjectTopics,
)
async def dashboard_eu_project_topics(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> EuProjectTopics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_dashboard_eu_topics(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
from_year=from_year,
to_year=to_year,
)
@@ -298,15 +369,21 @@ async def dashboard_eu_project_topics(
response_model=BundProjectTopics,
)
async def dashboard_bund_project_topics(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> BundProjectTopics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_dashboard_bund_topics(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
from_year=from_year,
to_year=to_year,
)
@@ -322,15 +399,21 @@ async def dashboard_top_authors(
default="all_time",
pattern="^(all_time|last_5_years)$",
),
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopAuthorStatistics:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_top_authors(
organization.openalex_institution_id,
organization.name,
selected_institution_id,
selected_institution_name,
works_period=works_period,
from_year=from_year,
to_year=to_year,
@@ -346,14 +429,18 @@ async def dashboard_top_work_authors(
works_period: Literal["all_time", "last_5_years"] = Query(
default="all_time", pattern="^(all_time|last_5_years)$"
),
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopAuthorAnalysis:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, _ = await get_dashboard_analytical_institution(
session, organization, institution_id
)
return await get_top_work_authors(
organization.openalex_institution_id, works_period, from_year, to_year
selected_institution_id, works_period, from_year, to_year
)
@@ -363,14 +450,20 @@ async def dashboard_top_work_authors(
response_model=TopAuthorAnalysis,
)
async def dashboard_top_project_authors(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopAuthorAnalysis:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_top_project_authors(
organization.openalex_institution_id, organization.name, from_year, to_year
selected_institution_id, selected_institution_name, from_year, to_year
)
@@ -380,14 +473,18 @@ async def dashboard_top_project_authors(
response_model=TopAuthorAnalysis,
)
async def dashboard_top_eu_project_authors(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopAuthorAnalysis:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, _ = await get_dashboard_analytical_institution(
session, organization, institution_id
)
return await get_top_eu_project_authors(
organization.openalex_institution_id, from_year, to_year
selected_institution_id, from_year, to_year
)
@@ -397,14 +494,18 @@ async def dashboard_top_eu_project_authors(
response_model=TopAuthorAnalysis,
)
async def dashboard_top_patent_authors(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopAuthorAnalysis:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, _ = await get_dashboard_analytical_institution(
session, organization, institution_id
)
return await get_top_patent_authors(
organization.openalex_institution_id, from_year, to_year
selected_institution_id, from_year, to_year
)
@@ -414,14 +515,18 @@ async def dashboard_top_patent_authors(
response_model=TopAuthorAnalysis,
)
async def dashboard_top_news_authors(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
session: Session = Depends(get_session),
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopAuthorAnalysis:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, _ = await get_dashboard_analytical_institution(
session, organization, institution_id
)
return await get_top_news_authors(
organization.openalex_institution_id, from_year, to_year
selected_institution_id, from_year, to_year
)
@@ -431,6 +536,7 @@ async def dashboard_top_news_authors(
response_model=TopicHeatmap,
)
async def dashboard_topic_heatmap(
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
limit: int = Query(default=25, ge=1, le=50),
@@ -438,9 +544,14 @@ async def dashboard_topic_heatmap(
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopicHeatmap:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, selected_institution_name = (
await get_dashboard_analytical_institution(
session, organization, institution_id
)
)
return await get_topic_heatmap(
institution_id=organization.openalex_institution_id,
organization_name=organization.name,
institution_id=selected_institution_id,
organization_name=selected_institution_name,
from_year=from_year,
to_year=to_year,
limit=limit,
@@ -454,6 +565,7 @@ async def dashboard_topic_heatmap(
)
async def dashboard_topic_word_cloud(
topic_id: str = Query(alias="topicId", min_length=1),
institution_id: str | None = Query(default=None),
from_year: int | None = Query(default=None, ge=1900, le=2100),
to_year: int | None = Query(default=None, ge=1900, le=2100),
limit: int = Query(default=30, ge=1, le=100),
@@ -461,8 +573,11 @@ async def dashboard_topic_word_cloud(
access_token: AccessToken = auth_service.CurrentUserAccessTokenPayloadDep,
) -> TopicWordCloud:
organization = get_dashboard_organization(session, access_token)
selected_institution_id, _ = await get_dashboard_analytical_institution(
session, organization, institution_id
)
return await get_topic_word_cloud(
institution_id=organization.openalex_institution_id,
institution_id=selected_institution_id,
topic_id=topic_id,
from_year=from_year,
to_year=to_year,
+148 -27
View File
@@ -3,13 +3,17 @@ import logging
from typing import Any
from fastapi import HTTPException, status
from sqlmodel import Session
from sqlmodel import Session, select
from inse import config
from inse.auth.model import AccessToken, Organization
from inse.auth.model import AccessToken, Organization, OrganizationInstitution
from inse.authors.institution_membership_query import (
build_institution_membership_query,
)
from inse.institutions.v2 import service as institutions_v2_service
from inse.integrations import elasticsearch
from inse.model import ESCluster, ESIndex
from inse.organization_management import service as organization_management_service
from inse.patents.org.elastic_search_client import OrgPatentsSearchClient
from inse.persons import service as persons_service
from inse.works.v2 import service as works_v2_service
@@ -22,6 +26,7 @@ from .common import (
raw_institution_id as _raw_institution_id,
)
from .model import (
DashboardInstitution,
DashboardStatistics,
DashboardStatisticValue,
TopicHeatmap,
@@ -45,6 +50,92 @@ TOPIC_WORD_CLOUD_LIMIT = 30
logger = logging.getLogger(__name__)
async def get_dashboard_institutions(
session: Session,
organization: Organization,
) -> list[DashboardInstitution]:
rows = session.exec(
select(OrganizationInstitution)
.where(OrganizationInstitution.organization_id == organization.id)
.order_by(OrganizationInstitution.position)
).all()
institution_ids = [row.openalex_institution_id for row in rows]
if not institution_ids and organization.openalex_institution_id:
institution_ids = [_raw_institution_id(organization.openalex_institution_id)]
if not institution_ids:
return []
association_groups = (
await organization_management_service.resolve_institution_associations(
institution_ids
)
)
institutions: dict[str, DashboardInstitution] = {}
for group in association_groups:
root_id = _raw_institution_id(group.id)
institutions[root_id] = DashboardInstitution(
id=root_id,
display_name=group.display_name,
)
for association in group.associated_institutions:
association_id = _raw_institution_id(association.id)
institutions.setdefault(
association_id,
DashboardInstitution(
id=association_id,
display_name=association.display_name,
),
)
return list(institutions.values())
async def get_dashboard_statistic_institution_ids(
session: Session,
organization: Organization,
selected_institution_id: str | None,
) -> list[str]:
institutions = await get_dashboard_institutions(session, organization)
institution_ids = [institution.id for institution in institutions]
if selected_institution_id in (None, "all"):
return institution_ids
selected_id = _raw_institution_id(selected_institution_id)
if selected_id not in institution_ids:
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail="Institution is not associated with this organization.",
)
return [selected_id]
async def get_dashboard_analytical_institution(
session: Session,
organization: Organization,
selected_institution_id: str | None,
) -> tuple[str, str]:
if selected_institution_id in (None, "all"):
return organization.openalex_institution_id, organization.name
selected_id = _raw_institution_id(selected_institution_id)
institutions = await get_dashboard_institutions(session, organization)
for institution in institutions:
if institution.id == selected_id:
return selected_id, institution.display_name
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail="Institution is not associated with this organization.",
)
def _statistic_scope_id(institution_ids: list[str]) -> str:
return (
_normalize_institution_id(institution_ids[0])
if len(institution_ids) == 1
else "all"
)
def _publication_year_filter(period: DashboardPeriod) -> dict[str, Any] | None:
from_year, to_year = period
year_range: dict[str, int] = {}
@@ -104,12 +195,15 @@ async def get_dashboard_statistics(
async def get_dashboard_publications(
institution_id: str,
institution_id: str | list[str],
organization_name: str,
from_year: int | None = None,
to_year: int | None = None,
) -> DashboardStatisticValue:
normalized_id = _normalize_institution_id(institution_id)
institution_ids = (
institution_id if isinstance(institution_id, list) else [institution_id]
)
normalized_ids = [_normalize_institution_id(value) for value in institution_ids]
period = _dashboard_period(from_year, to_year)
publication_years: list[int] = []
if period != (None, None):
@@ -120,67 +214,94 @@ async def get_dashboard_publications(
works = await works_v2_service.get_works(
page=0,
size=1,
institution_ids=[normalized_id],
institution_ids=normalized_ids,
publication_years=publication_years,
)
return DashboardStatisticValue(
institution_id=normalized_id,
institution_id=_statistic_scope_id(institution_ids),
organization_name=organization_name,
value=works.total,
)
async def get_dashboard_persons(
institution_id: str,
institution_id: str | list[str],
organization_name: str,
from_year: int | None = None,
to_year: int | None = None,
) -> DashboardStatisticValue:
normalized_id = _normalize_institution_id(institution_id)
institution_ids = institution_id if isinstance(institution_id, list) else [institution_id]
normalized_ids = [_normalize_institution_id(value) for value in institution_ids]
period = _dashboard_period(from_year, to_year)
if (period[0] is None) != (period[1] is None):
raise HTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail="from_year and to_year must either both be provided or both omitted.",
)
persons = await persons_service.search_persons_list(
query=None,
institution_id=normalized_id,
sort_by=None,
sort_order=None,
topic=None,
page=1,
page_size=1,
include="",
year_filter_enabled=period[0] is not None,
filter_mode="between" if period[0] is not None else None,
filter_year=period[0],
filter_year_to=period[1],
if len(normalized_ids) == 1:
persons = await persons_service.search_persons_list(
query=None,
institution_id=normalized_ids[0],
sort_by=None,
sort_order=None,
topic=None,
page=1,
page_size=1,
include="",
year_filter_enabled=period[0] is not None,
filter_mode="between" if period[0] is not None else None,
filter_year=period[0],
filter_year_to=period[1],
)
return DashboardStatisticValue(
institution_id=normalized_ids[0],
organization_name=organization_name,
value=int(persons.meta.count or 0) if persons.meta else 0,
)
membership_queries = [
build_institution_membership_query(
institution_id=value,
year_mode="between" if period[0] is not None else "all",
year=period[0],
year_to=period[1],
)
for value in normalized_ids
]
value = await elasticsearch.count(
index="openalex-authors",
query={
"bool": {
"should": membership_queries,
"minimum_should_match": 1,
}
},
)
return DashboardStatisticValue(
institution_id=normalized_id,
institution_id=_statistic_scope_id(institution_ids),
organization_name=organization_name,
value=int(persons.meta.count or 0) if persons.meta else 0,
value=value,
)
async def get_dashboard_patents(
institution_id: str,
institution_id: str | list[str],
organization_name: str,
from_year: int | None = None,
to_year: int | None = None,
) -> DashboardStatisticValue:
normalized_id = _normalize_institution_id(institution_id)
institution_ids = institution_id if isinstance(institution_id, list) else [institution_id]
normalized_ids = [_normalize_institution_id(value) for value in institution_ids]
period = _dashboard_period(from_year, to_year)
_, total = await OrgPatentsSearchClient().search_by_institution(
normalized_id,
normalized_ids,
page=0,
size=0,
from_year=period[0],
to_year=period[1],
)
return DashboardStatisticValue(
institution_id=normalized_id,
institution_id=_statistic_scope_id(institution_ids),
organization_name=organization_name,
value=total,
)
+270 -5
View File
@@ -8,8 +8,15 @@ from fastapi import HTTPException
from sqlmodel import Session, SQLModel, create_engine
from inse import config
from inse.auth.model import AccessToken, Organization, UserRole
from inse.auth.model import (
AccessToken,
Organization,
OrganizationInstitution,
UserRole,
)
from inse.dashboard.service import (
get_dashboard_analytical_institution,
get_dashboard_institutions,
get_dashboard_organization,
get_dashboard_persons,
get_dashboard_publications,
@@ -22,8 +29,13 @@ from inse.dashboard.common import (
)
from inse.dashboard.bund_topics_service import get_dashboard_bund_topics
from inse.dashboard.eu_topics_service import get_dashboard_eu_topics
from inse.dashboard.model import TopAuthor
from inse.dashboard.project_status_service import reconcile_status_counts
from inse.dashboard.model import DashboardStatisticValue, TopAuthor
from inse.dashboard.project_status_service import (
get_dashboard_bmbf_project_statuses,
get_dashboard_dfg_project_statuses,
get_dashboard_eu_project_statuses,
reconcile_status_counts,
)
from inse.dashboard.project_ids_service import (
_get_dfg_project_ids_from_projects_service,
)
@@ -42,6 +54,10 @@ from inse.exceptions import ElasticsearchException
from inse.model import ESIndex
from inse.models.openalex.institution import Institution
from inse.models.openalex.meta import Meta
from inse.organization_management.model import (
InstitutionAssociation,
InstitutionAssociationsResponse,
)
from inse.persons.model import CustomAuthorsListResponse
from inse.projects.model import (
BundProjectPage,
@@ -116,6 +132,100 @@ def test_project_status_counts_match_authoritative_total():
assert reconcile_status_counts(7, 4, 2, 3) == (2, 2, 3)
@pytest.mark.anyio
@pytest.mark.parametrize(
("status_loader", "count_loader", "extra_dependency"),
[
(
get_dashboard_eu_project_statuses,
"get_dashboard_eu_projects",
"_institution_aliases",
),
(
get_dashboard_bmbf_project_statuses,
"get_dashboard_bmbf_projects",
"_institution_aliases",
),
(
get_dashboard_dfg_project_statuses,
"get_dashboard_dfg_projects",
"_get_dfg_project_ids_from_projects_service",
),
],
)
async def test_project_status_zero_count_is_not_an_error(
status_loader, count_loader, extra_dependency
):
zero_count = DashboardStatisticValue(
institution_id=ORG_INSTITUTION_ID,
organization_name="Example University",
value=0,
)
with (
patch(
f"inse.dashboard.project_status_service.{count_loader}",
new=AsyncMock(return_value=zero_count),
),
patch(
f"inse.dashboard.project_status_service.{extra_dependency}",
new=AsyncMock(side_effect=AssertionError("must not be called")),
),
):
result = await status_loader(ORG_INSTITUTION_ID, "Example University")
assert result.ongoing == 0
assert result.upcoming == 0
assert result.completed == 0
@pytest.mark.anyio
async def test_dfg_project_status_uses_card_project_ids_and_total():
card_total = DashboardStatisticValue(
institution_id=ORG_INSTITUTION_ID,
organization_name="University Hospital Essen",
value=24,
)
status_aggregations = {
"aggregations": {
"projects_nested": {
"selected_projects": {
"ongoing": {"projects": {"value": 7}},
"completed": {"projects": {"value": 17}},
}
}
}
}
with (
patch(
"inse.dashboard.project_status_service.get_dashboard_dfg_projects",
new=AsyncMock(return_value=card_total),
),
patch(
"inse.dashboard.project_status_service._get_dfg_project_ids_from_projects_service",
new=AsyncMock(
return_value=[str(project_id) for project_id in range(1, 25)]
),
) as project_ids_loader,
patch(
"inse.dashboard.project_status_service.elasticsearch.search",
new=AsyncMock(return_value=status_aggregations),
),
):
result = await get_dashboard_dfg_project_statuses(
ORG_INSTITUTION_ID,
"University Hospital Essen",
)
project_ids_loader.assert_awaited_once_with(
ORG_INSTITUTION_ID,
from_year=None,
to_year=None,
)
assert result.ongoing == 7
assert result.completed == 17
assert result.ongoing + result.upcoming + result.completed == 24
def test_project_status_period_uses_interval_overlap():
assert _project_boundary_year_filter(
"startDate", "endDate", (2022, 2026), "iso"
@@ -971,11 +1081,11 @@ def test_eu_author_count_groups_multiple_publications_by_project_id():
works_response,
doi_project_ids,
ORG_INSTITUTION_ID,
{"https://openalex.org/A5007170803"},
)
assert [author.model_dump() for author in result] == [
{"id": "A5007170803", "name": "Marcus Example", "count": 1}
{"id": "A999", "name": "External Example", "count": 1},
{"id": "A5007170803", "name": "Marcus Example", "count": 1},
]
@@ -1618,6 +1728,161 @@ def test_get_dashboard_organization_uses_effective_organization():
assert result.openalex_institution_id == "I456"
@pytest.mark.anyio
async def test_dashboard_institutions_include_openalex_associations():
engine = create_engine("sqlite://", connect_args={"check_same_thread": False})
SQLModel.metadata.create_all(engine)
with Session(engine) as session:
organization = Organization(
name="Example University",
openalex_institution_id="I123",
)
session.add(organization)
session.commit()
session.refresh(organization)
session.add(
OrganizationInstitution(
organization_id=organization.id,
openalex_institution_id="I123",
position=0,
)
)
session.commit()
associations = [
InstitutionAssociationsResponse(
id="I123",
display_name="Main institution",
associated_institutions=[
InstitutionAssociation(
id="I456",
display_name="Child institution",
relationship="child",
),
InstitutionAssociation(
id="I789",
display_name="Related institution",
relationship="related",
),
],
)
]
with patch(
"inse.dashboard.service.organization_management_service."
"resolve_institution_associations",
new=AsyncMock(return_value=associations),
):
result = await get_dashboard_institutions(session, organization)
assert [institution.model_dump() for institution in result] == [
{"id": "I123", "display_name": "Main institution"},
{"id": "I456", "display_name": "Child institution"},
{"id": "I789", "display_name": "Related institution"},
]
@pytest.mark.anyio
async def test_dashboard_analytical_institution_all_uses_root_organization():
engine = create_engine("sqlite://", connect_args={"check_same_thread": False})
SQLModel.metadata.create_all(engine)
with Session(engine) as session:
organization = Organization(
name="Example University",
openalex_institution_id="I123",
)
session.add(organization)
session.commit()
session.refresh(organization)
result = await get_dashboard_analytical_institution(
session,
organization,
"all",
)
assert result == ("I123", "Example University")
@pytest.mark.anyio
async def test_dashboard_analytical_institution_uses_selected_tab_institution():
engine = create_engine("sqlite://", connect_args={"check_same_thread": False})
SQLModel.metadata.create_all(engine)
with Session(engine) as session:
organization = Organization(
name="Example University",
openalex_institution_id="I123",
)
session.add(organization)
session.commit()
session.refresh(organization)
session.add(
OrganizationInstitution(
organization_id=organization.id,
openalex_institution_id="I123",
position=0,
)
)
session.commit()
associations = [
InstitutionAssociationsResponse(
id="I123",
display_name="Main institution",
associated_institutions=[
InstitutionAssociation(
id="I456",
display_name="Child institution",
relationship="child",
),
],
)
]
with patch(
"inse.dashboard.service.organization_management_service."
"resolve_institution_associations",
new=AsyncMock(return_value=associations),
):
result = await get_dashboard_analytical_institution(
session,
organization,
"https://openalex.org/I456",
)
assert result == ("I456", "Child institution")
@pytest.mark.anyio
async def test_dashboard_analytical_institution_rejects_unassociated_selection():
engine = create_engine("sqlite://", connect_args={"check_same_thread": False})
SQLModel.metadata.create_all(engine)
with Session(engine) as session:
organization = Organization(
name="Example University",
openalex_institution_id="I123",
)
session.add(organization)
session.commit()
session.refresh(organization)
with patch(
"inse.dashboard.service.organization_management_service."
"resolve_institution_associations",
new=AsyncMock(return_value=[]),
):
with pytest.raises(HTTPException) as exc_info:
await get_dashboard_analytical_institution(
session,
organization,
"I999",
)
assert exc_info.value.status_code == 422
def test_get_dashboard_organization_rejects_missing_openalex_id():
engine = create_engine("sqlite://", connect_args={"check_same_thread": False})
SQLModel.metadata.create_all(engine)
@@ -79,7 +79,6 @@ async def get_top_authors(
"eu_projects",
_top_eu_project_publication_authors(
normalized_id,
authors,
from_year=period[0],
to_year=period[1],
),
@@ -152,12 +151,10 @@ async def get_top_eu_project_authors(
) -> TopAuthorAnalysis:
normalized_id = _normalize_institution_id(institution_id)
period = _period(from_year=from_year, to_year=to_year)
authors = await _safe_institution_authors(normalized_id)
return TopAuthorAnalysis(
institution_id=normalized_id,
authors=await _top_eu_project_publication_authors(
normalized_id,
authors,
from_year=period[0],
to_year=period[1],
),
@@ -825,18 +822,9 @@ async def _top_patent_authors(
async def _top_eu_project_publication_authors(
institution_id: str,
institution_authors: list[dict[str, Any]],
from_year: int | None = None,
to_year: int | None = None,
) -> list[TopAuthor]:
institution_author_ids = {
author_id
for author in institution_authors
if (author_id := _normalize_author_id(author.get("id")))
}
if not institution_author_ids:
return []
# Candidate discovery is deliberately all-time. The selected period is
# applied to each person's authoritative project count below. Otherwise a
# person can disappear merely because their recent projects have no linked
@@ -889,7 +877,6 @@ async def _top_eu_project_publication_authors(
works_response,
doi_project_ids,
institution_id,
institution_author_ids,
limit=None,
)
ranked = await _count_eu_projects_for_candidates(
@@ -976,7 +963,6 @@ def _openalex_work_authors_by_eu_projects(
response: dict[str, Any],
doi_project_ids: dict[str, set[str]],
institution_id: str,
institution_author_ids: set[str],
limit: int | None = TOP_AUTHOR_LIMIT,
) -> list[TopAuthor]:
# Count unique CORDIS projects per author, not publications. Multiple works
@@ -999,11 +985,7 @@ def _openalex_work_authors_by_eu_projects(
author = authorship.get("author") or {}
author_id = _normalize_author_id(author.get("id"))
author_name = str(author.get("display_name") or "").strip()
if (
not author_id
or author_id not in institution_author_ids
or not author_name
):
if not author_id or not author_name:
continue
author_project_ids[author_id].update(project_ids)
author_names.setdefault(author_id, author_name)
@@ -352,6 +352,12 @@ async def get_institution_associations(
institution_ids: list[str],
) -> list[InstitutionAssociationsResponse]:
_require_super_admin(access_token)
return await resolve_institution_associations(institution_ids)
async def resolve_institution_associations(
institution_ids: list[str],
) -> list[InstitutionAssociationsResponse]:
clean_ids = _normalize_institution_ids(institution_ids)
if not clean_ids:
return []
@@ -251,7 +251,7 @@ class OrgPatentsSearchClient:
async def search_by_institution(
self,
institution_id: str,
institution_id: str | list[str],
match_type: MatchTypeFilter = "all",
page: int = 0,
size: int = DEFAULT_PAGE_SIZE,
@@ -259,8 +259,16 @@ class OrgPatentsSearchClient:
from_year: int | None = None,
to_year: int | None = None,
) -> tuple[list[OrgPatentEntry], int]:
short_id = institution_id.replace("https://openalex.org/", "").upper()
filters: list[dict[str, Any]] = [{"term": {"institution_id": short_id}}]
institution_ids = (
institution_id if isinstance(institution_id, list) else [institution_id]
)
short_ids = [
value.replace("https://openalex.org/", "").upper()
for value in institution_ids
]
filters: list[dict[str, Any]] = [
{"terms": {"institution_id": short_ids}}
]
if match_type == "institution":
filters.append({"terms": {"match_type": ["institution", "both"]}})
@@ -1003,13 +1003,13 @@ async def search_eu_cordis_projects(
body={
"size": size,
"from": page * size,
"track_total_hits": True,
"_source": [
"id",
"title",
"acronym",
"objective",
"keywords",
"topics",
"frameworkProgramme",
"fundingScheme",
"status",
@@ -1019,28 +1019,12 @@ async def search_eu_cordis_projects(
"totalCost",
],
"query": query,
"highlight": {
"fields": {
"title": {},
"acronym": {},
"objective": {},
"keywords": {},
"topics": {},
},
"pre_tags": ["<em>"],
"post_tags": ["</em>"],
"require_field_match": True,
},
"sort": [
{
sort_field: {
"order": sort_direction,
"missing": "_last",
"unmapped_type": (
"keyword"
if sort_field.endswith(".keyword")
else "date"
),
"unmapped_type": "keyword" if sort_field.endswith(".keyword") else "date",
}
}
],
@@ -1164,6 +1148,7 @@ async def get_eu_cordis_projects_funding_data(
while True:
body: dict[str, Any] = {
"size": page_size,
"track_total_hits": False,
"_source": ["id", "startDate", "endDate", "ecMaxContribution"],
"query": query,
"sort": [{"id": {"order": "asc", "unmapped_type": "keyword"}}],
+86 -103
View File
@@ -128,42 +128,51 @@ async def get_bund_project_ids_by_topic_ids(topic_ids: list[str]) -> list[str]:
project_topics: dict[str, set[str]] = defaultdict(set)
body = {
"size": 10000,
"_source": ["project_id", "topic_matches"],
"query": {
"terms": {
"topic_matches.topic_id.keyword": topic_ids
}
},
}
page_size = 1000
from_ = 0
response = await elasticsearch.search(
index=ESIndex.PROJECTS_BUND_TOPICS,
cluster=ESCluster.INSE,
body=body,
)
hits = response.get("hits", {}).get("hits", [])
while True:
body = {
"size": page_size,
"from": from_,
"_source": ["project_id", "topic_matches"],
"query": {
"terms": {
"topic_matches.topic_id.keyword": topic_ids
}
},
}
response = await elasticsearch.search(
index=ESIndex.PROJECTS_BUND_TOPICS,
cluster=ESCluster.INSE,
body=body,
)
hits = response.get("hits", {}).get("hits", [])
if not hits:
break
for hit in hits:
source = hit["_source"]
for hit in hits:
source = hit["_source"]
project_id = source.get("project_id")
if not project_id:
continue
project_id = source.get("project_id")
if not project_id:
continue
topic_matches = source.get("topic_matches") or []
topic_matches = source.get("topic_matches") or []
if isinstance(topic_matches, dict):
topic_matches = [topic_matches]
if isinstance(topic_matches, dict):
topic_matches = [topic_matches]
for match in topic_matches:
topic_id = match.get("topic_id")
if topic_id in required_topics:
project_topics[project_id].add(topic_id)
for match in topic_matches:
topic_id = match.get("topic_id")
if topic_id in required_topics:
project_topics[project_id].add(topic_id)
if len(hits) < page_size:
break
from_ += page_size
return [
project_id
@@ -182,43 +191,52 @@ async def get_dfg_project_ids_by_topic_ids(topic_ids: list[str]) -> list[str]:
project_topics: dict[str, set[str]] = defaultdict(set)
page_size = 1000
from_ = 0
body = {
"size": 10000,
"_source": ["project_id", "topic_matches"],
"query": {
"terms": {
"topic_matches.topic_id.keyword": topic_ids
}
},
}
print("BODY", body)
response = await elasticsearch.search(
index=ESIndex.PROJECTS_DFG_TOPICS,
cluster=ESCluster.INSE,
body=body,
)
while True:
body = {
"size": page_size,
"from": from_,
"_source": ["project_id", "topic_matches"],
"query": {
"terms": {
"topic_matches.topic_id.keyword": topic_ids
}
},
}
hits = response.get("hits", {}).get("hits", [])
response = await elasticsearch.search(
index=ESIndex.PROJECTS_DFG_TOPICS,
cluster=ESCluster.INSE,
body=body,
)
hits = response.get("hits", {}).get("hits", [])
if not hits:
break
for hit in hits:
source = hit["_source"]
for hit in hits:
source = hit["_source"]
project_id = source.get("project_id")
if not project_id:
continue
project_id = source.get("project_id")
if not project_id:
continue
topic_matches = source.get("topic_matches") or []
topic_matches = source.get("topic_matches") or []
if isinstance(topic_matches, dict):
topic_matches = [topic_matches]
if isinstance(topic_matches, dict):
topic_matches = [topic_matches]
for match in topic_matches:
topic_id = match.get("topic_id")
if topic_id in required_topics:
project_topics[project_id].add(topic_id)
for match in topic_matches:
topic_id = match.get("topic_id")
if topic_id in required_topics:
project_topics[project_id].add(topic_id)
if len(hits) < page_size:
break
from_ += page_size
return [
project_id
@@ -253,34 +271,17 @@ async def get_openalex_topics_for_bund_projects(project_ids: list[str]) -> dict[
lookup: dict[str, list[dict]] = {}
for hit in response.get("hits", {}).get("hits", []):
src = hit["_source"]
pid = src.get("project_id")
if not pid:
continue
pid = str(pid)
if pid not in lookup:
lookup[pid] = {}
for topic in src.get("topic_matches", []):
topic_id = topic.get("topic_id")
if topic_id:
lookup[pid][str(topic_id)] = topic
result = {
pid: list(topics.values())
for pid, topics in lookup.items()
}
return result
src = hit["_source"]
pid = src.get("project_id")
if pid:
lookup[pid] = src.get("topic_matches", [])
return lookup
async def get_openalex_topics_for_dfg_projects(
project_ids: list[str],
) -> dict[str, list[dict]]:
"""
Retrieve unique OpenAlex topic details for a list of DFG project IDs.
Returns a dict mapping `project_id` -> unique list of topic_match objects.
Retrieve OpenAlex topic details for a list of DFG project IDs.
Returns a dict mapping `project_id` -> list of topic_match objects.
"""
if not project_ids:
return {}
@@ -292,41 +293,23 @@ async def get_openalex_topics_for_dfg_projects(
"project_id.keyword": project_ids
}
},
"_source": ["project_id", "topic_matches"],
"_source": ["project_id", "topic_matches"]
}
response = await elasticsearch.search(
index=ESIndex.PROJECTS_DFG_TOPICS,
body=body,
cluster=ESCluster.INSE,
cluster=ESCluster.INSE
)
lookup: dict[str, dict[str, dict]] = {}
lookup: dict[str, list[dict]] = {}
for hit in response.get("hits", {}).get("hits", []):
src = hit["_source"]
pid = src.get("project_id")
if pid:
lookup[str(pid)] = src.get("topic_matches", [])
if not pid:
continue
pid = str(pid)
if pid not in lookup:
lookup[pid] = {}
for topic in src.get("topic_matches", []):
topic_id = topic.get("topic_id")
if topic_id:
lookup[pid][str(topic_id)] = topic
result = {
pid: list(topics.values())
for pid, topics in lookup.items()
}
return result
return lookup
async def get_person_institutes(
person_ids: list[int],
+40 -401
View File
@@ -73,25 +73,7 @@ class Page(BaseModel):
page: int = Field(default=0, 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 items.")
class BundProjectHighlight(BaseModel):
"""Highlighted matching fragments from a BUND project search."""
joint_project: list[str] = Field(
default_factory=list,
description='Highlights from the Elasticsearch field "Verbundprojekt".',
)
topic: list[str] = Field(
default_factory=list,
description='Highlights from the Elasticsearch field "Thema".',
)
recipient: list[str] = Field(
default_factory=list,
description='Highlights from the Elasticsearch field "Zuwendungsempfänger".',
)
implementing_agency: list[str] = Field(
default_factory=list,
description='Highlights from the Elasticsearch field "Ausführende Stelle".',
)
class BundProjectSummary(BundProject):
oa_topics: list[Topic] | None = Field(
default=None,
@@ -104,34 +86,22 @@ class BundProjectSummary(BundProject):
description="The executing agency / recipient institution for this project, "
"derived from the project's own agency fields.",
)
highlight: BundProjectHighlight | None = Field(
default=None,
description="Highlighted matching fragments from the project search.",
)
@classmethod
def from_hit(cls, hit: dict[str, Any]) -> "BundProjectSummary":
def from_hit(cls, hit: dict) -> "BundProjectSummary":
"""Create a BundProjectSummary from an Elasticsearch hit."""
source = hit.get("_source", {})
topics_raw = source.get("oa_topics") or []
oa_topics = None
if isinstance(topics_raw, list) and topics_raw:
sorted_topics_raw = sorted(
(topic for topic in topics_raw if isinstance(topic, dict)),
key=lambda topic: (
topic.get("rank")
if topic.get("rank") is not None
else float("inf")
),
)
oa_topics = [
cls._topic_from_match(topic)
for topic in sorted_topics_raw
]
sorted_topics_raw = sorted(
(t for t in topics_raw if isinstance(t, dict)),
key=lambda t: t.get("rank") if t.get("rank") is not None else float("inf"),
)
oa_topics = [cls._topic_from_match(t) for t in sorted_topics_raw]
return cls(
funding_code=source.get("Förderkennzeichen"),
department=source.get("Ressort"),
@@ -149,9 +119,7 @@ class BundProjectSummary(BundProject):
implementing_agency=source.get("Ausführende Stelle"),
topic=source.get("Thema"),
performance_plan_system=source.get("Leistungsplansystematik"),
performance_plan_system_text=source.get(
"Klartext Leistungsplansystematik"
),
performance_plan_system_text=source.get("Klartext Leistungsplansystematik"),
funding_start=source.get("funding_start"),
funding_end=source.get("funding_end"),
grant_amount=source.get("Fördersumme"),
@@ -165,61 +133,8 @@ class BundProjectSummary(BundProject):
duration=source.get("Laufzeit"),
oa_topics=oa_topics,
institution=BundInstitutionSummary.from_source(source),
highlight=cls._highlight_from_hit(hit),
)
@staticmethod
def _highlight_fragments(value: Any) -> list[str]:
"""Normalize an Elasticsearch highlight value to a list of strings."""
if isinstance(value, str):
return [value]
if isinstance(value, list):
return [
fragment
for fragment in value
if isinstance(fragment, str)
]
return []
@classmethod
def _highlight_from_hit(
cls,
hit: dict[str, Any],
) -> BundProjectHighlight | None:
"""Extract BUND project highlights from an Elasticsearch hit."""
raw_highlight = hit.get("highlight")
if not isinstance(raw_highlight, dict):
return None
highlight = BundProjectHighlight(
joint_project=cls._highlight_fragments(
raw_highlight.get("Verbundprojekt")
),
topic=cls._highlight_fragments(
raw_highlight.get("Thema")
),
recipient=cls._highlight_fragments(
raw_highlight.get("Zuwendungsempfänger")
),
implementing_agency=cls._highlight_fragments(
raw_highlight.get("Ausführende Stelle")
),
)
has_highlights = any(
(
highlight.joint_project,
highlight.topic,
highlight.recipient,
highlight.implementing_agency,
)
)
return highlight if has_highlights else None
@staticmethod
def _topic_from_match(match: dict[str, Any]) -> Topic:
"""Builds a Topic model from a flattened topic_match dict.
@@ -248,42 +163,16 @@ class BundProjectPage(Page):
default_factory=list, description="The bund projects on this page."
)
class BundProjectList(BaseModel):
elements: list[BundProjectSummary] = Field(
default_factory=list, description="All bund projects."
)
total: int = Field(default=0, description="The total number of bund projects.")
class DfgSubjectClassificationHighlight(BaseModel):
"""A highlighted nested subject classification."""
query: str = Field(
description="The keyword/inner_hits group which produced this match.",
)
offset: int | None = Field(
default=None,
description="Index of the matched item in subject_classifications.",
)
fach: list[str] = Field(default_factory=list)
fachkollegium: list[str] = Field(default_factory=list)
fachgebiet: list[str] = Field(default_factory=list)
fachgebiet_de: list[str] = Field(default_factory=list)
wissenschaftsbereich: list[str] = Field(default_factory=list)
class DfgProjectHighlight(BaseModel):
"""Highlighted fragments returned for a DFG project."""
title_de: list[str] = Field(default_factory=list)
title_en: list[str] = Field(default_factory=list)
abstract_de: list[str] = Field(default_factory=list)
abstract_en: list[str] = Field(default_factory=list)
subject_classifications: list[DfgSubjectClassificationHighlight] = Field(
default_factory=list,
)
class DfgInstitutionSummary(BaseModel):
"""A summary of a DFG institution."""
id: int
@@ -316,22 +205,16 @@ class DfgProjectSummary(BaseModel):
description="The link to the DFG project details."
)
title_de: str | None = Field(
title: str | None = Field(
default=None,
description="The title of the DFG project in German."
description="The title of the DFG project."
)
title_en: str | None = Field(
professional_classification: str | None = Field(
default=None,
description="The title of the DFG project in English."
description="The professional classification of the DFG project."
)
subject_classifications_raw: str | None = Field(
default=None,
description="The subject classifications of the DFG project."
)
abstract_de: str | None = Field( default=None, description="The abstract of the DFG project in German.")
abstract_en: str | None = Field( default=None, description="The abstract of the DFG project in English.")
funding_start: str | None = Field(
default=None,
@@ -363,17 +246,11 @@ class DfgProjectSummary(BaseModel):
default=None,
description="The topics associated with the DFG project.",
)
highlight: DfgProjectHighlight | None = Field(
default=None,
description="Highlighted matching fragments.",
)
@classmethod
def from_hit(cls, hit: dict) -> "DfgProjectSummary":
source = hit.get("_source", {})
source_id = source.get("id")
project_id = source_id if source_id is not None else hit.get("_id", "")
fields = hit.get("fields", {})
names = []
institutions = {}
project_persons = []
@@ -461,6 +338,7 @@ class DfgProjectSummary(BaseModel):
)
)
topics_raw = source.get("topics") or []
print(f"Raw topics for DFG project {hit.get('_id', '')}: {topics_raw}")
topics = None
if isinstance(topics_raw, list) and topics_raw:
# Sort by rank if present, so the most relevant topic comes first
@@ -470,51 +348,34 @@ class DfgProjectSummary(BaseModel):
)
topics = [cls._topic_from_match(t) for t in sorted_topics_raw]
subject_classifications = source.get("subject_classifications")
if not isinstance(subject_classifications, list):
subject_classifications = []
return cls(
id=str(project_id),
id=hit.get("_id", ""),
link=source.get("link") or source.get("page_url"),
page_url=source.get("page_url"),
title_de=source.get("title_de"),
title_en=source.get("title_en"),
abstract_de=source.get("abstract_de"),
abstract_en=source.get("abstract_en"),
subject_classifications_raw=(
source.get("subject_area_de")
title=(
source.get("title")
or source.get("title_de")
or source.get("title_en")
),
professional_classification=(
source.get("Fachliche Zuordnung")
or source.get("subject_area_de")
or source.get("subject_area_en")
),
funding_start=(
str(source["funding_start"])
str(source.get("funding_start"))
if source.get("funding_start") is not None
else None
),
funding_end=(
str(source["funding_end"])
str(source.get("funding_end"))
if source.get("funding_end") is not None
else None
),
institutions=list(institutions.values()),
names=names,
persons=project_persons,
subject_classifications=[
DFGProjectFachgebieteInner.from_dict(classification)
for classification in subject_classifications
if isinstance(classification, dict)
],
topics=topics or [],
highlight=cls._highlight_from_hit(hit),
subject_classifications=[DFGProjectFachgebieteInner.from_dict(cls) for cls in source.get('subject_classifications', [])],
topics=topics
)
@staticmethod
def _topic_from_match(match: dict[str, Any]) -> Topic:
@@ -551,146 +412,13 @@ class DfgProjectSummary(BaseModel):
field=field,
subfield=subfield,
)
@staticmethod
def _highlight_fragments(value: Any) -> list[str]:
"""Normalize an Elasticsearch highlight value."""
if isinstance(value, str):
return [value]
if isinstance(value, list):
return [
fragment
for fragment in value
if isinstance(fragment, str)
]
return []
@classmethod
def _highlight_from_hit(
cls,
hit: dict[str, Any],
) -> DfgProjectHighlight | None:
"""Parse top-level and nested highlights from an Elasticsearch hit."""
raw_highlight = hit.get("highlight")
if not isinstance(raw_highlight, dict):
raw_highlight = {}
result = DfgProjectHighlight(
title_de=cls._highlight_fragments(
raw_highlight.get("title_de")
),
title_en=cls._highlight_fragments(
raw_highlight.get("title_en")
),
abstract_de=cls._highlight_fragments(
raw_highlight.get("abstract_de")
),
abstract_en=cls._highlight_fragments(
raw_highlight.get("abstract_en")
),
)
raw_inner_hits = hit.get("inner_hits")
if isinstance(raw_inner_hits, dict):
for query_name, inner_hit_group in raw_inner_hits.items():
if not isinstance(inner_hit_group, dict):
continue
inner_hits_block = inner_hit_group.get("hits")
if not isinstance(inner_hits_block, dict):
continue
nested_hits = inner_hits_block.get("hits", [])
if not isinstance(nested_hits, list):
continue
for nested_hit in nested_hits:
if not isinstance(nested_hit, dict):
continue
nested_highlight = nested_hit.get("highlight")
if not isinstance(nested_highlight, dict):
continue
nested_metadata = nested_hit.get("_nested")
offset = None
if isinstance(nested_metadata, dict):
raw_offset = nested_metadata.get("offset")
if isinstance(raw_offset, int):
offset = raw_offset
parsed_nested_highlight = (
DfgSubjectClassificationHighlight(
query=str(query_name),
offset=offset,
fach=cls._highlight_fragments(
nested_highlight.get(
"subject_classifications.fach"
)
),
fachkollegium=cls._highlight_fragments(
nested_highlight.get(
"subject_classifications.fachkollegium"
)
),
fachgebiet=cls._highlight_fragments(
nested_highlight.get(
"subject_classifications.fachgebiet"
)
),
fachgebiet_de=cls._highlight_fragments(
nested_highlight.get(
"subject_classifications.fachgebiet_de"
)
),
wissenschaftsbereich=cls._highlight_fragments(
nested_highlight.get(
"subject_classifications."
"wissenschaftsbereich"
)
),
)
)
# Do not expose empty nested highlight objects.
has_nested_fragments = any(
(
parsed_nested_highlight.fach,
parsed_nested_highlight.fachkollegium,
parsed_nested_highlight.fachgebiet,
parsed_nested_highlight.fachgebiet_de,
parsed_nested_highlight.wissenschaftsbereich,
)
)
if has_nested_fragments:
result.subject_classifications.append(
parsed_nested_highlight
)
has_highlights = any(
(
result.title_de,
result.title_en,
result.abstract_de,
result.abstract_en,
result.subject_classifications,
)
)
return result if has_highlights else None
class DfgProjectPage(Page):
elements: list[DfgProjectSummary] = Field(
default_factory=list, description="The DFG projects on this page."
)
class InstitutionFunderSummary(BaseModel):
type: ProjectType = Field(
description="The type of funding data (e.g., 'bund', 'eu', 'dfg')."
@@ -978,20 +706,7 @@ class EuCordisEurosciVocSummary(BaseModel):
description=source.get("description"),
path=source.get("path"),
)
class EuCordisProjectHighlight(BaseModel):
"""Highlighted fragments returned by Elasticsearch."""
title: list[str] = Field(default_factory=list)
acronym: list[str] = Field(default_factory=list)
objective: list[str] = Field(default_factory=list)
keywords: list[str] = Field(default_factory=list)
# Elasticsearch source/highlight field is "topics", but "topics" is already
# used by the API model for mapped OpenAlex Topic objects.
cordis_topic_text: list[str] = Field(
default_factory=list,
description="Highlighted fragments from the CORDIS topics text field.",
)
class EuCordisProjectSummary(BaseModel):
id: str
@@ -1016,18 +731,7 @@ class EuCordisProjectSummary(BaseModel):
cordis_topics: list[EuCordisTopicSummary] = Field(default_factory=list)
eurosci_voc: list[EuCordisEurosciVocSummary] = Field(default_factory=list)
topics: list[Topic] = Field(default_factory=list, description="Mapped OpenAlex topics.")
cordis_topic_text: str | None = Field(
default=None,
description=(
"Original CORDIS topics text from the Elasticsearch project "
"document, for example 'MSCA-IF-2018'."
),
)
highlight: EuCordisProjectHighlight | None = Field(
default=None,
description="Highlighted matching fragments from the project search.",
)
@classmethod
@classmethod
def from_hit(
cls,
@@ -1039,23 +743,16 @@ class EuCordisProjectSummary(BaseModel):
topics: list[Topic] | None = None,
) -> "EuCordisProjectSummary":
source = hit.get("_source", {})
project_type = EuCordisProjectType.from_index_name(
hit.get("_index", "")
)
project_id = source.get("id")
if project_id is None:
project_id = hit.get("_id", "")
project_type = EuCordisProjectType.from_index_name(hit.get("_index", ""))
return cls(
id=str(project_id),
id=source.get("id") or hit.get("_id", ""),
project_type=project_type,
title=source.get("title"),
acronym=source.get("acronym"),
objective=source.get("objective"),
keywords=source.get("keywords"),
cordis_topic_text=source.get("topics"),
framework_programme=source.get("frameworkProgramme"),
funding_scheme=source.get("fundingScheme"),
@@ -1067,71 +764,13 @@ class EuCordisProjectSummary(BaseModel):
ec_max_contribution=source.get("ecMaxContribution"),
total_cost=source.get("totalCost"),
authors=authors,
authors=authors or None,
organizations=organizations or [],
cordis_topics=cordis_topics or [],
eurosci_voc=eurosci_voc or [],
topics=topics or [],
highlight=cls._highlight_from_hit(hit),
)
@staticmethod
def _highlight_fragments(value: Any) -> list[str]:
"""Normalize an Elasticsearch highlight value to a list of strings."""
if isinstance(value, str):
return [value]
if isinstance(value, list):
return [
fragment
for fragment in value
if isinstance(fragment, str)
]
return []
@classmethod
def _highlight_from_hit(
cls,
hit: dict[str, Any],
) -> EuCordisProjectHighlight | None:
"""Extract project highlights from an Elasticsearch hit."""
raw_highlight = hit.get("highlight")
if not isinstance(raw_highlight, dict):
return None
highlight = EuCordisProjectHighlight(
title=cls._highlight_fragments(
raw_highlight.get("title")
),
acronym=cls._highlight_fragments(
raw_highlight.get("acronym")
),
objective=cls._highlight_fragments(
raw_highlight.get("objective")
),
keywords=cls._highlight_fragments(
raw_highlight.get("keywords")
),
cordis_topic_text=cls._highlight_fragments(
raw_highlight.get("topics")
),
)
has_highlights = any(
(
highlight.title,
highlight.acronym,
highlight.objective,
highlight.keywords,
highlight.cordis_topic_text,
)
)
return highlight if has_highlights else None
@staticmethod
def topic_from_match(match: dict[str, Any]) -> Topic:
domain_name = match.get("domain")
@@ -100,6 +100,7 @@ async def search_bund_projects(
response = await elasticsearch.search(
index=ESIndex.PROJECTS_BUND_V1,
track_total_hits=True,
query=query,
sort=sort,
size=filter_properties.size,
@@ -400,6 +401,7 @@ async def search_dfg_projects(
body: dict[str, Any] = {
"size": size,
"from": from_,
"track_total_hits": True,
"_source": [
"id",
"link",
@@ -407,10 +409,9 @@ async def search_dfg_projects(
"title",
"title_de",
"title_en",
"abstract_de",
"abstract_en",
"funding_start",
"funding_end",
"Fachliche Zuordnung",
"subject_area_de",
"subject_area_en",
"persons",
@@ -440,57 +441,23 @@ async def search_dfg_projects(
if keyword.strip() == "":
continue
keyword_clauses.append(
{
"bool": {
"should": [
{
"multi_match": {
"query": keyword,
"fields": [
"title_de",
"title_en",
"abstract_de",
"abstract_en",
],
"type": "phrase_prefix",
"max_expansions": 100,
}
},
{
"nested": {
"path": "subject_classifications",
"query": {
"multi_match": {
"query": keyword,
"fields": [
"subject_classifications.fach",
"subject_classifications.fachkollegium",
"subject_classifications.fachgebiet",
"subject_classifications.fachgebiet_de",
"subject_classifications.wissenschaftsbereich",
],
"type": "phrase_prefix",
"max_expansions": 100,
}
},
"inner_hits": {
"name": keyword,
"highlight": {
"fields": {
"subject_classifications.fach": {},
"subject_classifications.fachkollegium": {},
"subject_classifications.fachgebiet": {},
"subject_classifications.fachgebiet_de": {},
"subject_classifications.wissenschaftsbereich": {},
}
}
},
}
},
],
"minimum_should_match": 1,
{
"multi_match": {
"query": keyword,
"fields": [
"title", "title_de", "title_en",
"abstract_de", "abstract_en",
"subject_area_de", "subject_area_en",
"subject_classifications.fach",
"subject_classifications.fachkollegium",
"subject_classifications.fachgebiet",
"subject_classifications.fachgebiet_de",
"subject_classifications.wissenschaftsbereich",
],
"type": "phrase_prefix",
"max_expansions": 100,
}
}
}
)
if keyword_clauses:
must_clauses.append({"bool": {"must": keyword_clauses}})
@@ -586,7 +553,7 @@ async def search_dfg_projects(
}
}
)
#print("MATCHING_INSTITUTION_IDS", matching_institution_ids)
print("MATCHING_INSTITUTION_IDS", matching_institution_ids)
if institution_ids:
#prevously we were filtering by person_ids, but now we are filtering by institution_ids directly
@@ -638,28 +605,14 @@ async def search_dfg_projects(
sort_config = {"id": {"order": sort_direction}}
body["sort"] = [sort_config]
#Add highlighting for the title and abstract fields
body["highlight"] = {
"fields": {
"title_de": {},
"title_en": {},
"abstract_de": {},
"abstract_en": {},
},
"pre_tags": ["<em>"],
"post_tags": ["</em>"],
"require_field_match": True,
}
# print(f"Executing DFG project search with body: {json.dumps(body, indent=2)}")
# === Execute Search ===
# print(f"Executing DFG project search with body: {body}")
response = await elasticsearch.search(
index=ESIndex.DFG_PROJECTS,
body=body,
cluster=ESCluster.INSE,
)
# print(f"Received DFG project search response: {response}")
hits = response.get("hits", {}).get("hits", [])
if skip_enrichment:
@@ -1084,24 +1037,13 @@ async def search_bund_projects_with_filters(
sort_config = {"Förderkennzeichen.keyword": {"order": sort_direction}}
body["sort"] = [sort_config]
#Add highlighting for the title and abstract fields
body["highlight"] = {
"fields": {
"Verbundprojekt": {},
"Thema": {},
"Zuwendungsempfänger": {},
"Ausführende Stelle": {},
},
"pre_tags": ["<em>"],
"post_tags": ["</em>"],
"require_field_match": True,
}
# print(f"Executing BUND project search with body: {json.dumps(body, indent=2)}")
# === Execute Search ===
response = await elasticsearch.search(
index=ESIndex.PROJECTS_BUND_V1,
body=body,
cluster=ESCluster.INSE,
track_total_hits=True,
)
hits = response.get("hits", {}).get("hits", [])
@@ -1235,6 +1177,7 @@ async def search_all_projects(
offset=offset,
query=query,
sort=sort,
track_total_hits=True,
)
return _response_to_funding_project_page(response=response, page=page, size=size)
+117 -57
View File
@@ -30,6 +30,7 @@ from inse.projects.model import (
SortDirection,
)
from inse.tags import Tags
from inse.database import SessionDep
from inse.auth.service import can_fetch_gdpr_relevant_data
from fastapi import HTTPException as HttpException
@@ -78,26 +79,36 @@ async def search_bund_projects(
"model": DfgProjectPage,
},
status.HTTP_404_NOT_FOUND: {"description": "Institution not found"},
status.HTTP_403_FORBIDDEN: {"description": "Access denied for the provided institution ID"},
status.HTTP_403_FORBIDDEN: {
"description": "Access denied for the provided institution ID"
},
},
response_model_by_alias=False,
)
async def get_dfg_projects(
access_token_metadata: Annotated[AccessTokenMetadata, CurrentUserAccessTokenPayloadDep],
session: SessionDep,
access_token_metadata: Annotated[
AccessTokenMetadata, CurrentUserAccessTokenPayloadDep
],
institutions_search_client: Annotated[
InstitutionsSearchClient, Depends(get_institutions_search_client)
],
raw_oa_institution_id: Annotated[
str | None, Query(description="The openalex institution ID to filter by.")
] = None,
author_id: Annotated[str | None, Query(description="The openalex author ID to filter by.")] = None,
author_filter_ids: Annotated[list[str] | None, Query(description="The dfg author IDs to filter by.")] = None,
institution_ids: Annotated[list[str] | None, Query(description="The institution IDs to filter by.")] = None,
title: Annotated[
str | None, Query(description="The title to filter by.")
author_id: Annotated[
str | None, Query(description="The openalex author ID to filter by.")
] = None,
author_filter_ids: Annotated[
list[str] | None, Query(description="The dfg author IDs to filter by.")
] = None,
institution_ids: Annotated[
list[str] | None, Query(description="The institution IDs to filter by.")
] = None,
title: Annotated[str | None, Query(description="The title to filter by.")] = None,
keywords: Annotated[
list[str] | None, Query(description="Raw keywords to search in title/abstract/subject fields.")
list[str] | None,
Query(description="Raw keywords to search in title/abstract/subject fields."),
] = None,
topic_ids: Annotated[
list[str] | None, Query(description="The openalex topic IDs to filter by.")
@@ -106,12 +117,15 @@ async def get_dfg_projects(
list[str] | None,
Query(
description="Additional topic IDs to merge into the fuzzy topic-id resolution "
"(union with topic_ids). Only used when fuzzy=True."
"(union with topic_ids). Only used when fuzzy=True."
),
] = None,
funding_start_years: Annotated[list[str] | None, Query(description="The funding start years to filter by.")] = None,
funding_end_years: Annotated[list[str] | None, Query(description="The funding end years to filter by.")] = None,
funding_start_years: Annotated[
list[str] | None, Query(description="The funding start years to filter by.")
] = None,
funding_end_years: Annotated[
list[str] | None, Query(description="The funding end years to filter by.")
] = None,
page: Annotated[int, Query(description="The page number.", ge=0)] = 0,
size: Annotated[int, Query(description="The page size.", ge=1)] = 20,
sort_by: Annotated[str, Query(description="The field to sort by.")] = "title",
@@ -120,9 +134,10 @@ async def get_dfg_projects(
] = "asc",
fuzzy: Annotated[
bool,
Query(description="Use topic_id resolution if True, otherwise use raw keyword search."),
Query(
description="Use topic_id resolution if True, otherwise use raw keyword search."
),
] = False,
) -> DfgProjectPage:
logger.debug(
"Received request to get DFG projects for author_id=%s, author_filter_ids=%s, "
@@ -144,8 +159,13 @@ async def get_dfg_projects(
sort_direction,
fuzzy,
)
if (author_id or raw_oa_institution_id):
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = author_id, raw_oa_institution_id = raw_oa_institution_id)
if author_id or raw_oa_institution_id:
is_allowed = await can_fetch_gdpr_relevant_data(
session=session,
access_token=access_token_metadata,
raw_oa_author_id=author_id,
raw_oa_institution_id=raw_oa_institution_id,
)
if not is_allowed:
raise HttpException(
status_code=403,
@@ -170,6 +190,7 @@ async def get_dfg_projects(
fuzzy=fuzzy,
)
@router.get(
"/dfg/{id}",
summary="Get a single DFG project.",
@@ -204,12 +225,17 @@ async def get_single_dfg_project(
"model": BundProjectPage,
},
status.HTTP_404_NOT_FOUND: {"description": "Institution not found"},
status.HTTP_403_FORBIDDEN: {"description": "Access denied for the provided institution ID"},
status.HTTP_403_FORBIDDEN: {
"description": "Access denied for the provided institution ID"
},
},
response_model_by_alias=False,
)
async def search_bund_projects(
access_token_metadata: Annotated[AccessTokenMetadata, CurrentUserAccessTokenPayloadDep],
session: SessionDep,
access_token_metadata: Annotated[
AccessTokenMetadata, CurrentUserAccessTokenPayloadDep
],
institutions_search_client: Annotated[
InstitutionsSearchClient, Depends(get_institutions_search_client)
],
@@ -262,11 +288,18 @@ async def search_bund_projects(
] = "asc",
fuzzy: Annotated[
bool,
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
Query(
description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."
),
] = False,
) -> BundProjectPage:
if (raw_oa_institution_id):
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = None, raw_oa_institution_id = raw_oa_institution_id)
if raw_oa_institution_id:
is_allowed = await can_fetch_gdpr_relevant_data(
session=session,
access_token=access_token_metadata,
raw_oa_author_id=None,
raw_oa_institution_id=raw_oa_institution_id,
)
if not is_allowed:
raise HttpException(
status_code=403,
@@ -288,9 +321,10 @@ async def search_bund_projects(
size=size,
sort_by=sort_by,
sort_direction=sort_direction,
fuzzy=fuzzy
fuzzy=fuzzy,
)
@router.get(
"/bund/{id}",
summary="Get a single BUND project.",
@@ -313,6 +347,7 @@ async def get_single_bund_project(
project_id=id,
)
########
from inse.projects.model import EuCordisProjectSearchPage, EuCordisProjectType
from inse.projects.service import search_eu_cordis_projects
@@ -334,12 +369,17 @@ from inse.projects.service import search_eu_cordis_projects
"model": EuCordisProjectSearchPage,
},
status.HTTP_404_NOT_FOUND: {"description": "Institution not found"},
status.HTTP_403_FORBIDDEN: {"description": "Access denied for the provided institution ID"},
status.HTTP_403_FORBIDDEN: {
"description": "Access denied for the provided institution ID"
},
},
response_model_by_alias=False,
)
async def search_eu_cordis_projects_endpoint(
access_token_metadata: Annotated[AccessTokenMetadata, CurrentUserAccessTokenPayloadDep],
session: SessionDep,
access_token_metadata: Annotated[
AccessTokenMetadata, CurrentUserAccessTokenPayloadDep
],
institutions_search_client: Annotated[
InstitutionsSearchClient, Depends(get_institutions_search_client)
],
@@ -353,15 +393,21 @@ async def search_eu_cordis_projects_endpoint(
] = None,
author_ids: Annotated[
list[str] | None,
Query(description="Additional OpenAlex author IDs to filter by. All selected authors must match."),
Query(
description="Additional OpenAlex author IDs to filter by. All selected authors must match."
),
] = None,
organization_ids: Annotated[
list[str] | None,
Query(description="CORDIS organisation IDs. All selected organizations must match."),
Query(
description="CORDIS organisation IDs. All selected organizations must match."
),
] = None,
organization_names: Annotated[
list[str] | None,
Query(description="CORDIS organization names. All selected organizations must match."),
Query(
description="CORDIS organization names. All selected organizations must match."
),
] = None,
project_types: Annotated[
list[EuCordisProjectType] | None,
@@ -416,9 +462,10 @@ async def search_eu_cordis_projects_endpoint(
] = "asc",
fuzzy: Annotated[
bool,
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
Query(
description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."
),
] = False,
) -> EuCordisProjectSearchPage:
logger.debug(
"Received EU CORDIS search request: raw_oa_institution_id=%s, "
@@ -450,8 +497,13 @@ async def search_eu_cordis_projects_endpoint(
sort_direction,
fuzzy,
)
if (author_id or raw_oa_institution_id):
is_allowed = await can_fetch_gdpr_relevant_data(access_token = access_token_metadata, raw_oa_author_id = author_id, raw_oa_institution_id = raw_oa_institution_id)
if author_id or raw_oa_institution_id:
is_allowed = await can_fetch_gdpr_relevant_data(
session=session,
access_token=access_token_metadata,
raw_oa_author_id=author_id,
raw_oa_institution_id=raw_oa_institution_id,
)
if not is_allowed:
raise HttpException(
status_code=403,
@@ -482,6 +534,7 @@ async def search_eu_cordis_projects_endpoint(
fuzzy=fuzzy,
)
@router.get(
"/eu/{id}",
summary="Get a single EU Cordis project.",
@@ -494,27 +547,29 @@ async def search_eu_cordis_projects_endpoint(
},
status.HTTP_404_NOT_FOUND: {
"description": "Project not found",
"model": EuCordisProjectResponse
"model": EuCordisProjectResponse,
},
status.HTTP_500_INTERNAL_SERVER_ERROR: {
"description": "Internal server error",
"model": EuCordisProjectResponse
}
"model": EuCordisProjectResponse,
},
},
)
async def get_single_eu_cordis_project(
id: Annotated[str, Path(description="The ID of the EU Cordis project to retrieve.")],
id: Annotated[
str, Path(description="The ID of the EU Cordis project to retrieve.")
],
) -> EuCordisProjectResponse:
"""
Get a single EU Cordis project by ID.
Returns a wrapper response containing the project data or error information.
"""
logger.debug(f"Received request to get single EU Cordis project for id={id}")
try:
# Get the project from the service
project = await projects_service.get_single_eu_cordis_project(project_id=id)
# Check if project exists
if project is None:
logger.warning(f"Project with ID {id} not found")
@@ -522,9 +577,9 @@ async def get_single_eu_cordis_project(
success=False,
project_type=None,
eu_project_data=None,
error=f"Project with ID {id} not found"
error=f"Project with ID {id} not found",
)
# Determine the project type
if isinstance(project, Fp7ProjectDetails):
project_type = "fp7"
@@ -539,24 +594,21 @@ async def get_single_eu_cordis_project(
success=False,
project_type=None,
eu_project_data=None,
error=f"Unknown project type for ID {id}"
error=f"Unknown project type for ID {id}",
)
# Return success with the project data
return EuCordisProjectResponse(
success=True,
project_type=project_type,
eu_project_data=project,
error=None
success=True, project_type=project_type, eu_project_data=project, error=None
)
except Exception as e:
logger.error(f"Error retrieving project with ID {id}: {e!s}", exc_info=True)
return EuCordisProjectResponse(
success=False,
project_type=None,
eu_project_data=None,
error=f"Internal server error: {e!s}"
error=f"Internal server error: {e!s}",
)
@@ -623,7 +675,9 @@ async def get_institution_bund_projects_funding_over_time(
] = None,
fuzzy: Annotated[
bool,
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
Query(
description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."
),
] = False,
) -> InstitutionFunderSummary:
return await projects_service.get_institution_bund_projects_funding_over_time(
@@ -674,15 +728,21 @@ async def get_institution_cordis_eu_projects_funding_over_time(
] = None,
author_ids: Annotated[
list[str] | None,
Query(description="Additional OpenAlex author IDs to filter by. All selected authors must match."),
Query(
description="Additional OpenAlex author IDs to filter by. All selected authors must match."
),
] = None,
organization_ids: Annotated[
list[str] | None,
Query(description="CORDIS organisation IDs. All selected organizations must match."),
Query(
description="CORDIS organisation IDs. All selected organizations must match."
),
] = None,
organization_names: Annotated[
list[str] | None,
Query(description="CORDIS organization names. All selected organizations must match."),
Query(
description="CORDIS organization names. All selected organizations must match."
),
] = None,
project_types: Annotated[
list[EuCordisProjectType] | None,
@@ -730,7 +790,9 @@ async def get_institution_cordis_eu_projects_funding_over_time(
] = None,
fuzzy: Annotated[
bool,
Query(description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."),
Query(
description="Use OpenAlex topic-id resolution if true, otherwise raw keyword search."
),
] = False,
) -> InstitutionFunderSummary:
return await projects_service.get_institution_cordis_eu_projects_funding_over_time(
@@ -777,9 +839,7 @@ async def search_projects(
description="The set of project types to filter by (e.g., 'bund', 'eu', 'dfg'). If not provided, projects of all types will be included."
),
] = None,
title: Annotated[
str | None, Query(description="The title to filter by.")
] = None,
title: Annotated[str | None, Query(description="The title to filter by.")] = None,
sort_by: Annotated[
ProjectsSortBy, Query(description="The field to sort by.")
] = ProjectsSortBy.TITLE,
@@ -794,4 +854,4 @@ async def search_projects(
title=title,
sort_by=sort_by,
sort_direction=sort_direction,
)
)
+7 -5
View File
@@ -190,6 +190,7 @@ async def get_dfg_projects(
skip_enrichment: bool = False,
active_from_year: int | None = None,
active_to_year: int | None = None,
institution_aliases: list[str] | None = None,
) -> DfgProjectPage:
logger.debug(
"Fetching DFG projects for author_id=%s, author_filter_ids=%s, "
@@ -251,18 +252,18 @@ async def get_dfg_projects(
"No author names found for author_filter_ids=%s",
author_filter_ids_int,
)
institution_aliases = []
resolved_institution_aliases = list(institution_aliases or [])
if raw_oa_institution_id:
if institutions_search_client is None:
raise ValueError(
"institutions_search_client must be provided when raw_oa_institution_id is set"
)
institution_aliases = (
resolved_institution_aliases.extend(
await institutions_search_client.get_institution_aliases_by_oa_institution_id(
raw_oa_institution_id
)
)
if not institution_aliases:
if not resolved_institution_aliases:
return DfgProjectPage(
elements=[],
page=page,
@@ -272,7 +273,7 @@ async def get_dfg_projects(
return await projects_search_client.search_dfg_projects(
page=page,
size=size,
institution_aliases=institution_aliases,
institution_aliases=resolved_institution_aliases,
project_ids=author_project_ids,
names=filter_names or [],
institution_ids=institution_ids_int,
@@ -465,8 +466,9 @@ async def search_bund_projects_with_filters(
fuzzy: bool = False,
active_from_year: int | None = None,
active_to_year: int | None = None,
oa_institution_aliases: list[str] | None = None,
) -> BundProjectPage:
institution_aliases = []
institution_aliases = list(oa_institution_aliases or [])
if raw_oa_institution_id:
if institutions_search_client is None:
raise ValueError(
-158
View File
@@ -24,14 +24,10 @@ from .model import (
FilterType,
KeywordOperator,
PublicationType,
PublicationTypeCount,
RankedAuthor,
RankingWeights,
SubfieldShare,
Timespan,
FieldNode,
SubfieldNode,
TopicNode,
)
logger = logging.getLogger(__name__)
@@ -491,49 +487,6 @@ def _topic_profile_query(
"size": 10,
},
},
# topic treemap
"by_field": {
"terms": {
"field": "primary_topic.field.id",
"size": 30,
},
"aggs": {
"field_name": {
"terms": {
"field": "primary_topic.field.display_name.keyword",
"size": 1,
},
},
"by_subfield": {
"terms": {
"field": "primary_topic.subfield.id",
"size": 30,
},
"aggs": {
"subfield_name": {
"terms": {
"field": "primary_topic.subfield.display_name.keyword",
"size": 1,
},
},
"by_topic": {
"terms": {
"field": "primary_topic.id",
"size": 30,
},
"aggs": {
"topic_name": {
"terms": {
"field": "primary_topic.display_name.keyword",
"size": 1,
},
},
},
},
},
},
},
},
"distinct_topics": {
"cardinality": {"field": "primary_topic.id"},
},
@@ -596,30 +549,6 @@ async def topic_profile_for_authors(
)
for bucket in to_work.get("by_subfield", {}).get("buckets", [])
]
field_tree = [
FieldNode(
id=field_bucket.get("key", ""),
name=_bucket_name(field_bucket, "field_name", field_bucket.get("key", "")),
count=field_bucket.get("doc_count", 0),
subfields=[
SubfieldNode(
id=subfield_bucket.get("key", ""),
name=_bucket_name(subfield_bucket, "subfield_name", subfield_bucket.get("key", "")),
count=subfield_bucket.get("doc_count", 0),
topics=[
TopicNode(
id=topic_bucket.get("key", ""),
name=_bucket_name(topic_bucket, "topic_name", topic_bucket.get("key", "")),
count=topic_bucket.get("doc_count", 0),
)
for topic_bucket in subfield_bucket.get("by_topic", {}).get("buckets", [])
],
)
for subfield_bucket in field_bucket.get("by_subfield", {}).get("buckets", [])
],
)
for field_bucket in to_work.get("by_field", {}).get("buckets", [])
]
results.append(
AuthorTopicProfile(
author_id=author_bucket.get("key", ""),
@@ -631,7 +560,6 @@ async def topic_profile_for_authors(
distinct_subfields=to_work.get("distinct_subfields", {}).get("value", 0),
distinct_fields=to_work.get("distinct_fields", {}).get("value", 0),
subfields=subfields,
field_tree=field_tree,
)
)
@@ -789,84 +717,6 @@ def _build_query(
}
def _build_publication_type_counts_query(
keywords: list[str],
operator: KeywordOperator,
author_ids: list[str],
timespan: Timespan | None,
config: MatchConfig = _KEYWORD_MATCH,
) -> dict:
"""Builds the query that counts matching works per publication type.
Mirrors _build_query's work filters but leaves out the publication_types
filter itself, since it aggregates over all types instead of one score.
"""
work_filters = [
_build_keyword_query(keywords, operator, config),
_author_filter(author_ids),
]
if timespan is not None:
work_filters.append(_timespan_filter(timespan))
return {
"size": 0,
"query": {
"bool": {
"filter": work_filters,
},
},
"aggs": {
"by_type": {
"terms": {
"field": "type",
"size": len(PublicationType),
},
},
},
}
async def publication_type_counts_for_keywords(
keywords: list[str],
operator: KeywordOperator,
institution_id: str,
career_stages: list[CareerStage],
timespan: Timespan | None,
filter_type: FilterType = FilterType.KEYWORD,
) -> list[PublicationTypeCount]:
"""Counts the university's matching works per publication type, largest first."""
author_ids = await _get_author_ids_from_institution(institution_id)
if not author_ids:
return []
if career_stages:
author_ids = await _filter_author_ids_by_career_stage(author_ids, career_stages)
query_body = _build_publication_type_counts_query(
keywords, operator, author_ids, timespan, _match_config(filter_type),
)
response: dict[str, Any] = await elasticsearch.search(
index=config.settings.openalex_works_search_index,
body=query_body,
cluster=ESCluster.NES,
)
type_buckets = response.get("aggregations", {}).get("by_type", {}).get("buckets", [])
counts = []
for bucket in type_buckets:
try:
publication_type = PublicationType(bucket["key"])
except ValueError:
continue
counts.append(PublicationTypeCount(type=publication_type, count=bucket["doc_count"]))
counts.sort(key=lambda c: c.count, reverse=True)
return counts
def _display_name_from_bucket(author_bucket: dict) -> str:
"""Reads the authors display name out of the name sub-aggregation."""
name_buckets = author_bucket.get("author_name", {}).get("buckets", [])
@@ -875,14 +725,6 @@ def _display_name_from_bucket(author_bucket: dict) -> str:
return ""
def _bucket_name(bucket: dict, name_agg_key: str, fallback: str) -> str:
"""Reads a display name out of a bucket's name sub-aggregation, falling back to its id."""
name_buckets = bucket.get(name_agg_key, {}).get("buckets", [])
if name_buckets and name_buckets[0].get("key"):
return str(name_buckets[0]["key"])
return fallback
def _citations_from_bucket(author_bucket: dict) -> int:
"""Reads the summed citations out of the reverse_nested sub-aggregation."""
citations_value = (
-67
View File
@@ -195,42 +195,6 @@ class AuthorMetricsRequest(BaseModel):
)
class PublicationTypeCountsRequest(BaseModel):
keywords: list[str] = Field(
min_length=1,
description="One or more keywords to match works against.",
)
operator: KeywordOperator = Field(
default=KeywordOperator.AND,
description="How to combine the keywords: 'and' or 'or'. Defaults to 'and'.",
)
filter_type: FilterType = Field(
default=FilterType.KEYWORD,
description="What the 'keywords' values match against: 'keyword' (OpenAlex "
"keyword display names) or 'topic' (OpenAlex topic display names). Defaults to 'keyword'.",
)
career_stages: list[CareerStage] = Field(
default_factory=list,
description="Optional filter: only count works of authors in one of these career stages. Empty = no filter.",
)
timespan: Timespan | None = Field(
default=None,
description="Optional filter: only count works whose publication_year is within [from, to].",
)
@field_validator("operator", "filter_type", mode="before")
@classmethod
def operator_case_insensitive(cls, value):
if isinstance(value, str):
return value.lower()
return value
class PublicationTypeCount(BaseModel):
type: PublicationType = Field(description="The OpenAlex work type.")
count: int = Field(description="Number of matching works of this type.")
class AuthorTopicStats(BaseModel):
"""Section 1: combined stats over an author's works that match the topic filter."""
@@ -318,32 +282,6 @@ class SubfieldShare(BaseModel):
count: int = Field(description="Number of works whose primary topic belongs to this subfield.")
class TopicNode(BaseModel):
id: str = Field(description="The OpenAlex ID of the primary topic.")
name: str = Field(description="The primary-topic display name.")
count: int = Field(description="Number of works whose primary topic is this topic.")
class SubfieldNode(BaseModel):
id: str = Field(description="The OpenAlex ID of the subfield.")
name: str = Field(description="The subfield display name.")
count: int = Field(description="Number of works whose primary topic belongs to this subfield.")
topics: list[TopicNode] = Field(
default_factory=list,
description="Primary topics within this subfield, largest first.",
)
class FieldNode(BaseModel):
id: str = Field(description="The OpenAlex ID of the field.")
name: str = Field(description="The field display name.")
count: int = Field(description="Number of works whose primary topic belongs to this field.")
subfields: list[SubfieldNode] = Field(
default_factory=list,
description="Subfields within this field, largest first.",
)
class AuthorTopicProfile(BaseModel):
author_id: str = Field(description="The OpenAlex ID of the author.")
display_name: str = Field(description="The name of the author.")
@@ -370,11 +308,6 @@ class AuthorTopicProfile(BaseModel):
default_factory=list,
description="Top subfields over all works, by primary topic, largest first.",
)
field_tree: list[FieldNode] = Field(
default_factory=list,
description="Field -> subfield -> topic hierarchy over all works, by primary "
"topic, each level largest first. Drives the interactive topic treemap.",
)
class AuthorStaticStats(BaseModel):
@@ -116,16 +116,6 @@ Content-Type: application/json
"timespan": { "from": 2018, "to": 2025 }
}
###
POST http://localhost:8000/api/rank/topic-profile
Content-Type: application/json
{
"author_ids": ["https://openalex.org/A504035360", "https://openalex.org/A5019137844"],
"keywords": ["Augmented Reality Applications"],
"operator": "or"
}
###
GET https://project.nes.uni-due.de/elastic/_aliases
Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ==
-36
View File
@@ -14,8 +14,6 @@ from .model import (
AuthorTopicProfile,
AuthorTopicStats,
KeywordToAuthorRequest,
PublicationTypeCount,
PublicationTypeCountsRequest,
RankedAuthor,
SelectedAuthorsRequest,
)
@@ -70,40 +68,6 @@ async def rank_author(
filter_type=request.filter_type,
)
# Publication-type facet counts for the "Art der Work" filter
@router.post("/publication-type-counts", response_model=list[PublicationTypeCount])
async def publication_type_counts(
request: PublicationTypeCountsRequest,
access_token_metadata: Annotated[
AccessTokenMetadata, CurrentUserAccessTokenPayloadDep
],
):
institution_id = access_token_metadata.effective_institution_id
if not institution_id:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail="No OpenAlex institution is assigned to the current organization.",
)
logger.info(
"publication-type-counts keywords=%s operator=%s filter_type=%s institution_id=%s "
"career_stages=%s timespan=%s",
request.keywords,
request.operator,
request.filter_type,
institution_id,
request.career_stages,
request.timespan,
)
return await logic.publication_type_counts_for_keywords(
keywords=request.keywords,
operator=request.operator,
institution_id=institution_id,
career_stages=request.career_stages,
timespan=request.timespan,
filter_type=request.filter_type,
)
# Compare authors table 1 (topic stats)
@router.post("/topic-stats", response_model=list[AuthorTopicStats])
async def topic_stats(request: SelectedAuthorsRequest):
+88
View File
@@ -712,6 +712,53 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e", size = 100195, upload-time = "2026-04-24T20:15:22.081Z" },
]
[[package]]
name = "pandas"
version = "2.3.3"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "numpy" },
{ name = "python-dateutil" },
{ name = "pytz" },
{ name = "tzdata" },
]
sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/9c/fb/231d89e8637c808b997d172b18e9d4a4bc7bf31296196c260526055d1ea0/pandas-2.3.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d21f6d74eb1725c2efaa71a2bfc661a0689579b58e9c0ca58a739ff0b002b53", size = 11597846, upload-time = "2025-09-29T23:19:48.856Z" },
{ url = "https://files.pythonhosted.org/packages/5c/bd/bf8064d9cfa214294356c2d6702b716d3cf3bb24be59287a6a21e24cae6b/pandas-2.3.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3fd2f887589c7aa868e02632612ba39acb0b8948faf5cc58f0850e165bd46f35", size = 10729618, upload-time = "2025-09-29T23:39:08.659Z" },
{ url = "https://files.pythonhosted.org/packages/57/56/cf2dbe1a3f5271370669475ead12ce77c61726ffd19a35546e31aa8edf4e/pandas-2.3.3-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ecaf1e12bdc03c86ad4a7ea848d66c685cb6851d807a26aa245ca3d2017a1908", size = 11737212, upload-time = "2025-09-29T23:19:59.765Z" },
{ url = "https://files.pythonhosted.org/packages/e5/63/cd7d615331b328e287d8233ba9fdf191a9c2d11b6af0c7a59cfcec23de68/pandas-2.3.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b3d11d2fda7eb164ef27ffc14b4fcab16a80e1ce67e9f57e19ec0afaf715ba89", size = 12362693, upload-time = "2025-09-29T23:20:14.098Z" },
{ url = "https://files.pythonhosted.org/packages/a6/de/8b1895b107277d52f2b42d3a6806e69cfef0d5cf1d0ba343470b9d8e0a04/pandas-2.3.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a68e15f780eddf2b07d242e17a04aa187a7ee12b40b930bfdd78070556550e98", size = 12771002, upload-time = "2025-09-29T23:20:26.76Z" },
{ url = "https://files.pythonhosted.org/packages/87/21/84072af3187a677c5893b170ba2c8fbe450a6ff911234916da889b698220/pandas-2.3.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:371a4ab48e950033bcf52b6527eccb564f52dc826c02afd9a1bc0ab731bba084", size = 13450971, upload-time = "2025-09-29T23:20:41.344Z" },
{ url = "https://files.pythonhosted.org/packages/86/41/585a168330ff063014880a80d744219dbf1dd7a1c706e75ab3425a987384/pandas-2.3.3-cp312-cp312-win_amd64.whl", hash = "sha256:a16dcec078a01eeef8ee61bf64074b4e524a2a3f4b3be9326420cabe59c4778b", size = 10992722, upload-time = "2025-09-29T23:20:54.139Z" },
{ url = "https://files.pythonhosted.org/packages/cd/4b/18b035ee18f97c1040d94debd8f2e737000ad70ccc8f5513f4eefad75f4b/pandas-2.3.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:56851a737e3470de7fa88e6131f41281ed440d29a9268dcbf0002da5ac366713", size = 11544671, upload-time = "2025-09-29T23:21:05.024Z" },
{ url = "https://files.pythonhosted.org/packages/31/94/72fac03573102779920099bcac1c3b05975c2cb5f01eac609faf34bed1ca/pandas-2.3.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:bdcd9d1167f4885211e401b3036c0c8d9e274eee67ea8d0758a256d60704cfe8", size = 10680807, upload-time = "2025-09-29T23:21:15.979Z" },
{ url = "https://files.pythonhosted.org/packages/16/87/9472cf4a487d848476865321de18cc8c920b8cab98453ab79dbbc98db63a/pandas-2.3.3-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e32e7cc9af0f1cc15548288a51a3b681cc2a219faa838e995f7dc53dbab1062d", size = 11709872, upload-time = "2025-09-29T23:21:27.165Z" },
{ url = "https://files.pythonhosted.org/packages/15/07/284f757f63f8a8d69ed4472bfd85122bd086e637bf4ed09de572d575a693/pandas-2.3.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:318d77e0e42a628c04dc56bcef4b40de67918f7041c2b061af1da41dcff670ac", size = 12306371, upload-time = "2025-09-29T23:21:40.532Z" },
{ url = "https://files.pythonhosted.org/packages/33/81/a3afc88fca4aa925804a27d2676d22dcd2031c2ebe08aabd0ae55b9ff282/pandas-2.3.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e0a175408804d566144e170d0476b15d78458795bb18f1304fb94160cabf40c", size = 12765333, upload-time = "2025-09-29T23:21:55.77Z" },
{ url = "https://files.pythonhosted.org/packages/8d/0f/b4d4ae743a83742f1153464cf1a8ecfafc3ac59722a0b5c8602310cb7158/pandas-2.3.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:93c2d9ab0fc11822b5eece72ec9587e172f63cff87c00b062f6e37448ced4493", size = 13418120, upload-time = "2025-09-29T23:22:10.109Z" },
{ url = "https://files.pythonhosted.org/packages/4f/c7/e54682c96a895d0c808453269e0b5928a07a127a15704fedb643e9b0a4c8/pandas-2.3.3-cp313-cp313-win_amd64.whl", hash = "sha256:f8bfc0e12dc78f777f323f55c58649591b2cd0c43534e8355c51d3fede5f4dee", size = 10993991, upload-time = "2025-09-29T23:25:04.889Z" },
{ url = "https://files.pythonhosted.org/packages/f9/ca/3f8d4f49740799189e1395812f3bf23b5e8fc7c190827d55a610da72ce55/pandas-2.3.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:75ea25f9529fdec2d2e93a42c523962261e567d250b0013b16210e1d40d7c2e5", size = 12048227, upload-time = "2025-09-29T23:22:24.343Z" },
{ url = "https://files.pythonhosted.org/packages/0e/5a/f43efec3e8c0cc92c4663ccad372dbdff72b60bdb56b2749f04aa1d07d7e/pandas-2.3.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:74ecdf1d301e812db96a465a525952f4dde225fdb6d8e5a521d47e1f42041e21", size = 11411056, upload-time = "2025-09-29T23:22:37.762Z" },
{ url = "https://files.pythonhosted.org/packages/46/b1/85331edfc591208c9d1a63a06baa67b21d332e63b7a591a5ba42a10bb507/pandas-2.3.3-cp313-cp313t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6435cb949cb34ec11cc9860246ccb2fdc9ecd742c12d3304989017d53f039a78", size = 11645189, upload-time = "2025-09-29T23:22:51.688Z" },
{ url = "https://files.pythonhosted.org/packages/44/23/78d645adc35d94d1ac4f2a3c4112ab6f5b8999f4898b8cdf01252f8df4a9/pandas-2.3.3-cp313-cp313t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:900f47d8f20860de523a1ac881c4c36d65efcb2eb850e6948140fa781736e110", size = 12121912, upload-time = "2025-09-29T23:23:05.042Z" },
{ url = "https://files.pythonhosted.org/packages/53/da/d10013df5e6aaef6b425aa0c32e1fc1f3e431e4bcabd420517dceadce354/pandas-2.3.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:a45c765238e2ed7d7c608fc5bc4a6f88b642f2f01e70c0c23d2224dd21829d86", size = 12712160, upload-time = "2025-09-29T23:23:28.57Z" },
{ url = "https://files.pythonhosted.org/packages/bd/17/e756653095a083d8a37cbd816cb87148debcfcd920129b25f99dd8d04271/pandas-2.3.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c4fc4c21971a1a9f4bdb4c73978c7f7256caa3e62b323f70d6cb80db583350bc", size = 13199233, upload-time = "2025-09-29T23:24:24.876Z" },
{ url = "https://files.pythonhosted.org/packages/04/fd/74903979833db8390b73b3a8a7d30d146d710bd32703724dd9083950386f/pandas-2.3.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:ee15f284898e7b246df8087fc82b87b01686f98ee67d85a17b7ab44143a3a9a0", size = 11540635, upload-time = "2025-09-29T23:25:52.486Z" },
{ url = "https://files.pythonhosted.org/packages/21/00/266d6b357ad5e6d3ad55093a7e8efc7dd245f5a842b584db9f30b0f0a287/pandas-2.3.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1611aedd912e1ff81ff41c745822980c49ce4a7907537be8692c8dbc31924593", size = 10759079, upload-time = "2025-09-29T23:26:33.204Z" },
{ url = "https://files.pythonhosted.org/packages/ca/05/d01ef80a7a3a12b2f8bbf16daba1e17c98a2f039cbc8e2f77a2c5a63d382/pandas-2.3.3-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d2cefc361461662ac48810cb14365a365ce864afe85ef1f447ff5a1e99ea81c", size = 11814049, upload-time = "2025-09-29T23:27:15.384Z" },
{ url = "https://files.pythonhosted.org/packages/15/b2/0e62f78c0c5ba7e3d2c5945a82456f4fac76c480940f805e0b97fcbc2f65/pandas-2.3.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ee67acbbf05014ea6c763beb097e03cd629961c8a632075eeb34247120abcb4b", size = 12332638, upload-time = "2025-09-29T23:27:51.625Z" },
{ url = "https://files.pythonhosted.org/packages/c5/33/dd70400631b62b9b29c3c93d2feee1d0964dc2bae2e5ad7a6c73a7f25325/pandas-2.3.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c46467899aaa4da076d5abc11084634e2d197e9460643dd455ac3db5856b24d6", size = 12886834, upload-time = "2025-09-29T23:28:21.289Z" },
{ url = "https://files.pythonhosted.org/packages/d3/18/b5d48f55821228d0d2692b34fd5034bb185e854bdb592e9c640f6290e012/pandas-2.3.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:6253c72c6a1d990a410bc7de641d34053364ef8bcd3126f7e7450125887dffe3", size = 13409925, upload-time = "2025-09-29T23:28:58.261Z" },
{ url = "https://files.pythonhosted.org/packages/a6/3d/124ac75fcd0ecc09b8fdccb0246ef65e35b012030defb0e0eba2cbbbe948/pandas-2.3.3-cp314-cp314-win_amd64.whl", hash = "sha256:1b07204a219b3b7350abaae088f451860223a52cfb8a6c53358e7948735158e5", size = 11109071, upload-time = "2025-09-29T23:32:27.484Z" },
{ url = "https://files.pythonhosted.org/packages/89/9c/0e21c895c38a157e0faa1fb64587a9226d6dd46452cac4532d80c3c4a244/pandas-2.3.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:2462b1a365b6109d275250baaae7b760fd25c726aaca0054649286bcfbb3e8ec", size = 12048504, upload-time = "2025-09-29T23:29:31.47Z" },
{ url = "https://files.pythonhosted.org/packages/d7/82/b69a1c95df796858777b68fbe6a81d37443a33319761d7c652ce77797475/pandas-2.3.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:0242fe9a49aa8b4d78a4fa03acb397a58833ef6199e9aa40a95f027bb3a1b6e7", size = 11410702, upload-time = "2025-09-29T23:29:54.591Z" },
{ url = "https://files.pythonhosted.org/packages/f9/88/702bde3ba0a94b8c73a0181e05144b10f13f29ebfc2150c3a79062a8195d/pandas-2.3.3-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a21d830e78df0a515db2b3d2f5570610f5e6bd2e27749770e8bb7b524b89b450", size = 11634535, upload-time = "2025-09-29T23:30:21.003Z" },
{ url = "https://files.pythonhosted.org/packages/a4/1e/1bac1a839d12e6a82ec6cb40cda2edde64a2013a66963293696bbf31fbbb/pandas-2.3.3-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2e3ebdb170b5ef78f19bfb71b0dc5dc58775032361fa188e814959b74d726dd5", size = 12121582, upload-time = "2025-09-29T23:30:43.391Z" },
{ url = "https://files.pythonhosted.org/packages/44/91/483de934193e12a3b1d6ae7c8645d083ff88dec75f46e827562f1e4b4da6/pandas-2.3.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d051c0e065b94b7a3cea50eb1ec32e912cd96dba41647eb24104b6c6c14c5788", size = 12699963, upload-time = "2025-09-29T23:31:10.009Z" },
{ url = "https://files.pythonhosted.org/packages/70/44/5191d2e4026f86a2a109053e194d3ba7a31a2d10a9c2348368c63ed4e85a/pandas-2.3.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:3869faf4bd07b3b66a9f462417d0ca3a9df29a9f6abd5d0d0dbab15dac7abe87", size = 13202175, upload-time = "2025-09-29T23:31:59.173Z" },
]
[[package]]
name = "pluggy"
version = "1.6.0"
@@ -823,6 +870,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/f0/d7/a812a0bd0f5160823e647524488cc9734f93782f2c273b8f77e8afc60a37/pytest-8.1.2-py3-none-any.whl", hash = "sha256:6c06dc309ff46a05721e6fd48e492a775ed8165d2ecdf57f156a80c7e95bb142", size = 337456, upload-time = "2024-04-26T18:05:15.452Z" },
]
[[package]]
name = "python-dateutil"
version = "2.9.0.post0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "six" },
]
sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" },
]
[[package]]
name = "python-dotenv"
version = "1.2.2"
@@ -841,6 +900,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/8f/cb/769cfc37177252872a45a71f3fbdde9d51b471a3f3c14bfe95dde3407386/python_multipart-0.0.29-py3-none-any.whl", hash = "sha256:2ddcc971cef266225f54f552d8fa10bcfbb1f14446caec199060daac59ff2d69", size = 29640, upload-time = "2026-05-17T17:29:45.69Z" },
]
[[package]]
name = "pytz"
version = "2026.3.post1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/fb/48/fb042503b6ca6cd271261dc559fd6432f7d8c713153e9ec5c591af4dfc1c/pytz-2026.3.post1.tar.gz", hash = "sha256:2211d3fcf9a797d3405cac96ac7f61d80e6a644f72a3309607282fe8a2010c5d", size = 319745, upload-time = "2026-07-25T15:12:07.385Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/0f/7b/39c34ca613b0b198cb866466651b26b045e2009864c5183c979a3b83f383/pytz-2026.3.post1-py2.py3-none-any.whl", hash = "sha256:dd95840dd199baea12d9cc096a1d452caa6596a1c1e4b5f3dbd1541855d5e815", size = 508283, upload-time = "2026-07-25T15:12:05.782Z" },
]
[[package]]
name = "pyyaml"
version = "6.0.3"
@@ -1143,6 +1211,7 @@ dependencies = [
{ name = "fastapi" },
{ name = "httpx" },
{ name = "openai" },
{ name = "pandas" },
{ name = "pydantic" },
{ name = "pydantic-settings" },
{ name = "pyjwt" },
@@ -1165,6 +1234,7 @@ requires-dist = [
{ name = "fastapi", specifier = "~=0.115.0" },
{ name = "httpx", specifier = "~=0.27.0" },
{ name = "openai", specifier = "~=2.41.0" },
{ name = "pandas", specifier = "~=2.3.3" },
{ name = "pydantic", specifier = "~=2.7.1" },
{ name = "pydantic-settings", specifier = "~=2.2.1" },
{ name = "pyjwt", specifier = "~=2.8.0" },
@@ -1196,6 +1266,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" },
]
[[package]]
name = "six"
version = "1.17.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" },
]
[[package]]
name = "sniffio"
version = "1.3.1"
@@ -1441,6 +1520,15 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" },
]
[[package]]
name = "tzdata"
version = "2026.3"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/92/ff/5a28bdfd8c3ebec42564ac7d0e54ca3db65044a9314a97f9564fa7a1e926/tzdata-2026.3.tar.gz", hash = "sha256:4a1518b8993086a7982523e071643f3c0e5f213e75b21318e78bcabfff9d1415", size = 198674, upload-time = "2026-07-10T08:50:37.887Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e5/6d/b53b99a9f2766d095985947a5782f1702cabb129a34f7a802d7197af832f/tzdata-2026.3-py2.py3-none-any.whl", hash = "sha256:dc096730c87af6cab1b171c9d532be840741ff5d459015e7f6947bd7d7e54931", size = 348168, upload-time = "2026-07-10T08:50:36.46Z" },
]
[[package]]
name = "uvicorn"
version = "0.29.0"
@@ -73,10 +73,8 @@ model/bodyResetPassword.ts
model/bundInstitutionSummary.ts
model/bundInstitutionSummaryPage.ts
model/bundProjectDetails.ts
model/bundProjectHighlight.ts
model/bundProjectPage.ts
model/bundProjectSummary.ts
model/bundProjectTopics.ts
model/careerMetrics.ts
model/careerStage.ts
model/collaborationGraph.ts
@@ -104,7 +102,6 @@ model/dfgInstitutionSummaryPage.ts
model/dfgPersonSummary.ts
model/dfgPersonSummaryPage.ts
model/dfgProjectDetails.ts
model/dfgProjectHighlight.ts
model/dfgProjectInstitutionRole.ts
model/dfgProjectKeyword.ts
model/dfgProjectPage.ts
@@ -115,17 +112,12 @@ model/dfgProjectSubprojectSummary.ts
model/dfgProjectSummary.ts
model/dfgProjectTopic.ts
model/dfgProjectTopics.ts
model/dfgSubjectClassificationHighlight.ts
model/dockerHealth.ts
model/domain.ts
model/domainFieldsInner.ts
model/domainIds.ts
model/edge.ts
model/euCordisEurosciVocSummary.ts
model/euCordisOrganizationSelectorPage.ts
model/euCordisOrganizationSelectorSummary.ts
model/euCordisOrganizationSummary.ts
model/euCordisProjectHighlight.ts
model/euCordisProjectResponse.ts
model/euCordisProjectSearchPage.ts
model/euCordisProjectSummary.ts
@@ -133,7 +125,6 @@ model/euCordisProjectType.ts
model/euCordisTopicSummary.ts
model/euProjectData.ts
model/euProjectStatusStatistics.ts
model/euProjectTopics.ts
model/extractedKeywords.ts
model/extractedKeywordsLLM.ts
model/extractedKeywordsResponse.ts
@@ -218,7 +209,6 @@ model/matchedTopic.ts
model/mentionedPerson.ts
model/meta.ts
model/model2YrMeanCitedness.ts
model/modelField.ts
model/models.ts
model/newsArticle.ts
model/newsArticleDetail.ts
@@ -254,14 +244,10 @@ model/score.ts
model/selectedAuthorsRequest.ts
model/sortDirection.ts
model/startCollaborationGraphResponse.ts
model/subfield.ts
model/subfieldDomain.ts
model/subfieldField.ts
model/subfieldShare.ts
model/timespan.ts
model/tokenType.ts
model/topAuthor.ts
model/topAuthorAnalysis.ts
model/topAuthorStatistics.ts
model/topInstitutionItem.ts
model/topTopicItem.ts
+1 -27
View File
@@ -48,30 +48,4 @@ export * from './works.service';
import { WorksService } from './works.service';
export * from './worksV2.service';
import { WorksV2Service } from './worksV2.service';
export const APIS = [
AuthService,
AuthorsV2Service,
BUNDInstitutionsService,
BackgroundJobsService,
BookmarksService,
CompanyConnectionsService,
DFGInstitutionsService,
DFGPersonsService,
DashboardService,
FundingService,
INSEServiceService,
InstitutionsService,
InstitutionsV2Service,
KeywordsService,
NewsService,
OrganizationService,
PatentsService,
PersonsService,
ProjectsService,
RankingService,
TopicsService,
TopicsV2Service,
UniversityRankingsService,
WorksService,
WorksV2Service,
];
export const APIS = [AuthService, AuthorsV2Service, BUNDInstitutionsService, BackgroundJobsService, BookmarksService, CompanyConnectionsService, DFGInstitutionsService, DFGPersonsService, DashboardService, FundingService, INSEServiceService, InstitutionsService, InstitutionsV2Service, KeywordsService, NewsService, OrganizationService, PatentsService, PersonsService, ProjectsService, RankingService, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service];
File diff suppressed because it is too large Load Diff
+298 -584
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { Author } from '../model/author';
@@ -34,613 +28,333 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { StartCollaborationGraphResponse } from '../model/startCollaborationGraphResponse';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class AuthorsV2Service extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Returns a paginated list of authors for a given search term based on their display name.
* @endpoint get /api/authors/v2/autocomplete/selector
* @param query A search term to filter authors by (partial matches allowed).
* @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 autocompleteAuthorsForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<AuthorPage>;
public autocompleteAuthorsForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<AuthorPage>>;
public autocompleteAuthorsForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<AuthorPage>>;
public autocompleteAuthorsForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a paginated list of authors for a given search term based on their display name.
* @endpoint get /api/authors/v2/autocomplete/selector
* @param query A search term to filter authors by (partial matches allowed).
* @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 autocompleteAuthorsForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AuthorPage>;
public autocompleteAuthorsForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AuthorPage>>;
public autocompleteAuthorsForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AuthorPage>>;
public autocompleteAuthorsForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarHeaders = this.defaultHeaders;
let localVarPath = `/api/authors/v2/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
/**
* Returns an author for a given author ID.
* @endpoint get /api/authors/v2/{raw_oa_author_id}
* @param rawOaAuthorId The ID of the author to retrieve.
* @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 getAuthorById(
rawOaAuthorId: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Author>;
public getAuthorById(
rawOaAuthorId: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Author>>;
public getAuthorById(
rawOaAuthorId: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Author>>;
public getAuthorById(
rawOaAuthorId: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (rawOaAuthorId === null || rawOaAuthorId === undefined) {
throw new Error(
'Required parameter rawOaAuthorId was null or undefined when calling getAuthorById.',
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
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();
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/authors/v2/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Author>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns a paginated list of authors for a given list of author IDs.
* @endpoint get /api/authors/v2/authors/id
* @param authorIds A list of author IDs to retrieve.
* @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 getAuthorsByIds(
authorIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<AuthorPage>;
public getAuthorsByIds(
authorIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<AuthorPage>>;
public getAuthorsByIds(
authorIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<AuthorPage>>;
public getAuthorsByIds(
authorIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (authorIds) {
authorIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'author_ids',
let localVarPath = `/api/authors/v2/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
let localVarHeaders = this.defaultHeaders;
/**
* Returns an author for a given author ID.
* @endpoint get /api/authors/v2/{raw_oa_author_id}
* @param rawOaAuthorId The ID of the author to retrieve.
* @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 getAuthorById(rawOaAuthorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Author>;
public getAuthorById(rawOaAuthorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Author>>;
public getAuthorById(rawOaAuthorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Author>>;
public getAuthorById(rawOaAuthorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (rawOaAuthorId === null || rawOaAuthorId === undefined) {
throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorById.');
}
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
let localVarHeaders = this.defaultHeaders;
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarTransferCache: boolean = options?.transferCache ?? true;
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarPath = `/api/authors/v2/authors/id`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns the status of a collaboration graph generation task.
* @endpoint get /api/authors/v2/collaboration-graph/{graph_id}/status
* @param graphId The ID of the collaboration graph generation task.
* @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 getCollaborationGraphStatus(
graphId: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<CollaborationGraphStatusResponse>;
public getCollaborationGraphStatus(
graphId: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<CollaborationGraphStatusResponse>>;
public getCollaborationGraphStatus(
graphId: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<CollaborationGraphStatusResponse>>;
public getCollaborationGraphStatus(
graphId: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (graphId === null || graphId === undefined) {
throw new Error(
'Required parameter graphId was null or undefined when calling getCollaborationGraphStatus.',
);
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/authors/v2/collaboration-graph/${this.configuration.encodeParam({ name: 'graphId', value: graphId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/status`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CollaborationGraphStatusResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns a collaboration graph for a given author ID.
* @endpoint post /api/authors/v2/collaboration-graph
* @param rawOaAuthorId The raw OpenAlex author ID for which to retrieve the collaboration graph.
* @param yearFrom The starting year to filter the works by (optional).
* @param yearTo The ending year to filter the works by (optional).
* @param minCollaborators The minimum number of collaborators to filter the works by (optional).
* @param maxCollaborators The maximum number of collaborators to filter the works by (optional).
* @param topicIds A list of topic IDs to filter the works by (optional).
* @param institutionIds A list of institution IDs to filter the works by (optional).
* @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 startCollaborationGraph(
rawOaAuthorId: string,
yearFrom?: number,
yearTo?: number,
minCollaborators?: number,
maxCollaborators?: number,
topicIds?: Array<string>,
institutionIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<StartCollaborationGraphResponse>;
public startCollaborationGraph(
rawOaAuthorId: string,
yearFrom?: number,
yearTo?: number,
minCollaborators?: number,
maxCollaborators?: number,
topicIds?: Array<string>,
institutionIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<StartCollaborationGraphResponse>>;
public startCollaborationGraph(
rawOaAuthorId: string,
yearFrom?: number,
yearTo?: number,
minCollaborators?: number,
maxCollaborators?: number,
topicIds?: Array<string>,
institutionIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<StartCollaborationGraphResponse>>;
public startCollaborationGraph(
rawOaAuthorId: string,
yearFrom?: number,
yearTo?: number,
minCollaborators?: number,
maxCollaborators?: number,
topicIds?: Array<string>,
institutionIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (rawOaAuthorId === null || rawOaAuthorId === undefined) {
throw new Error(
'Required parameter rawOaAuthorId was null or undefined when calling startCollaborationGraph.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>rawOaAuthorId,
'raw_oa_author_id',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>yearFrom,
'year_from',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>yearTo,
'year_to',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>minCollaborators,
'min_collaborators',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>maxCollaborators,
'max_collaborators',
);
if (topicIds) {
topicIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'topic_ids',
let localVarPath = `/api/authors/v2/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Author>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_ids',
/**
* Returns a paginated list of authors for a given list of author IDs.
* @endpoint get /api/authors/v2/authors/id
* @param authorIds A list of author IDs to retrieve.
* @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 getAuthorsByIds(authorIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AuthorPage>;
public getAuthorsByIds(authorIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AuthorPage>>;
public getAuthorsByIds(authorIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AuthorPage>>;
public getAuthorsByIds(authorIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (authorIds) {
authorIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'author_ids');
})
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/authors/v2/authors/id`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AuthorPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
let localVarHeaders = this.defaultHeaders;
/**
* Returns the status of a collaboration graph generation task.
* @endpoint get /api/authors/v2/collaboration-graph/{graph_id}/status
* @param graphId The ID of the collaboration graph generation task.
* @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 getCollaborationGraphStatus(graphId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CollaborationGraphStatusResponse>;
public getCollaborationGraphStatus(graphId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CollaborationGraphStatusResponse>>;
public getCollaborationGraphStatus(graphId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CollaborationGraphStatusResponse>>;
public getCollaborationGraphStatus(graphId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (graphId === null || graphId === undefined) {
throw new Error('Required parameter graphId was null or undefined when calling getCollaborationGraphStatus.');
}
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/authors/v2/collaboration-graph/${this.configuration.encodeParam({name: "graphId", value: graphId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/status`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CollaborationGraphStatusResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a collaboration graph for a given author ID.
* @endpoint post /api/authors/v2/collaboration-graph
* @param rawOaAuthorId The raw OpenAlex author ID for which to retrieve the collaboration graph.
* @param yearFrom The starting year to filter the works by (optional).
* @param yearTo The ending year to filter the works by (optional).
* @param minCollaborators The minimum number of collaborators to filter the works by (optional).
* @param maxCollaborators The maximum number of collaborators to filter the works by (optional).
* @param topicIds A list of topic IDs to filter the works by (optional).
* @param institutionIds A list of institution IDs to filter the works by (optional).
* @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 startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array<string>, institutionIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<StartCollaborationGraphResponse>;
public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array<string>, institutionIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<StartCollaborationGraphResponse>>;
public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array<string>, institutionIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<StartCollaborationGraphResponse>>;
public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array<string>, institutionIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (rawOaAuthorId === null || rawOaAuthorId === undefined) {
throw new Error('Required parameter rawOaAuthorId was null or undefined when calling startCollaborationGraph.');
}
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>rawOaAuthorId, 'raw_oa_author_id');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>yearFrom, 'year_from');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>yearTo, 'year_to');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>minCollaborators, 'min_collaborators');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>maxCollaborators, 'max_collaborators');
if (topicIds) {
topicIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'topic_ids');
})
}
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'institution_ids');
})
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/authors/v2/collaboration-graph`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<StartCollaborationGraphResponse>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
let localVarPath = `/api/authors/v2/collaboration-graph`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<StartCollaborationGraphResponse>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+122 -222
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { BundInstitutionSummaryPage } from '../model/bundInstitutionSummaryPage';
@@ -28,231 +22,137 @@ import { BundInstitutionSummaryPage } from '../model/bundInstitutionSummaryPage'
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class BUNDInstitutionsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/bund/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getBundInstitutionAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<BundInstitutionSummaryPage>;
public getBundInstitutionAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<BundInstitutionSummaryPage>>;
public getBundInstitutionAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<BundInstitutionSummaryPage>>;
public getBundInstitutionAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/bund/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<BundInstitutionSummaryPage>;
public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<BundInstitutionSummaryPage>>;
public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<BundInstitutionSummaryPage>>;
public getBundInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarHeaders = this.defaultHeaders;
let localVarPath = `/api/bund/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<BundInstitutionSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
/**
* Returns a list of institutions based on their names.
* @endpoint get /api/bund/institutions/names
* @param institutionNames A list of institution names to retrieve.
* @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 getBundInstitutionsByName(
institutionNames?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<BundInstitutionSummaryPage>;
public getBundInstitutionsByName(
institutionNames?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<BundInstitutionSummaryPage>>;
public getBundInstitutionsByName(
institutionNames?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<BundInstitutionSummaryPage>>;
public getBundInstitutionsByName(
institutionNames?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (institutionNames) {
institutionNames.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_names',
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bund/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<BundInstitutionSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
let localVarHeaders = this.defaultHeaders;
/**
* Returns a list of institutions based on their names.
* @endpoint get /api/bund/institutions/names
* @param institutionNames A list of institution names to retrieve.
* @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 getBundInstitutionsByName(institutionNames?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<BundInstitutionSummaryPage>;
public getBundInstitutionsByName(institutionNames?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<BundInstitutionSummaryPage>>;
public getBundInstitutionsByName(institutionNames?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<BundInstitutionSummaryPage>>;
public getBundInstitutionsByName(institutionNames?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (institutionNames) {
institutionNames.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'institution_names');
})
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bund/institutions/names`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<BundInstitutionSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bund/institutions/names`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<BundInstitutionSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
File diff suppressed because it is too large Load Diff
+191 -366
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CreatePersonBookmark } from '../model/createPersonBookmark';
@@ -30,375 +24,206 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { PersonBookmarkResponse } from '../model/personBookmarkResponse';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class BookmarksService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Bookmark Person
* @endpoint put /api/bookmarks/persons/{person_id}
* @param personId
* @param createPersonBookmark
* @param secureFgpAcc
* @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 bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<PersonBookmarkResponse>;
public bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<PersonBookmarkResponse>>;
public bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<PersonBookmarkResponse>>;
public bookmarkPerson(
personId: string,
createPersonBookmark: CreatePersonBookmark,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error(
'Required parameter personId was null or undefined when calling bookmarkPerson.',
);
}
if (createPersonBookmark === null || createPersonBookmark === undefined) {
throw new Error(
'Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.',
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
let localVarHeaders = this.defaultHeaders;
/**
* Bookmark Person
* @endpoint put /api/bookmarks/persons/{person_id}
* @param personId
* @param createPersonBookmark
* @param secureFgpAcc
* @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 bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PersonBookmarkResponse>;
public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PersonBookmarkResponse>>;
public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PersonBookmarkResponse>>;
public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error('Required parameter personId was null or undefined when calling bookmarkPerson.');
}
if (createPersonBookmark === null || createPersonBookmark === undefined) {
throw new Error('Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.');
}
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', '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;
// 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')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PersonBookmarkResponse>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPersonBookmark,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* List Person Bookmarks
* @endpoint get /api/bookmarks/persons
* @param secureFgpAcc
* @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 listPersonBookmarks(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<PersonBookmarkResponse>>;
public listPersonBookmarks(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
// 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,
);
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', '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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bookmarks/persons`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<PersonBookmarkResponse>>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
/**
* Remove Person Bookmark
* @endpoint delete /api/bookmarks/persons/{person_id}
* @param personId
* @param secureFgpAcc
* @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 removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public removePersonBookmark(personId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error('Required parameter personId was null or undefined when calling removePersonBookmark.');
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', '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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PersonBookmarkResponse>(
'put',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createPersonBookmark,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* List Person Bookmarks
* @endpoint get /api/bookmarks/persons
* @param secureFgpAcc
* @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 listPersonBookmarks(
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<PersonBookmarkResponse>>;
public listPersonBookmarks(
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<PersonBookmarkResponse>>>;
public listPersonBookmarks(
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bookmarks/persons`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<PersonBookmarkResponse>>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Remove Person Bookmark
* @endpoint delete /api/bookmarks/persons/{person_id}
* @param personId
* @param secureFgpAcc
* @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 removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any>;
public removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<any>>;
public removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<any>>;
public removePersonBookmark(
personId: string,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (personId === null || personId === undefined) {
throw new Error(
'Required parameter personId was null or undefined when calling removePersonBookmark.',
);
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<any>(
'delete',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { CompanyConnectionsAvailability } from '../model/companyConnectionsAvailability';
@@ -30,249 +24,137 @@ import { CompanyConnectionsResponse } from '../model/companyConnectionsResponse'
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class CompanyConnectionsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Check whether company connections are available for an author.
* @endpoint get /api/inse-service/authors/{author_id}/company-connections/availability
* @param authorId
* @param secureFgpAcc
* @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 getCompanyConnectionsAvailability(
authorId: string,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<CompanyConnectionsAvailability>;
public getCompanyConnectionsAvailability(
authorId: string,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<CompanyConnectionsAvailability>>;
public getCompanyConnectionsAvailability(
authorId: string,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<CompanyConnectionsAvailability>>;
public getCompanyConnectionsAvailability(
authorId: string,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error(
'Required parameter authorId was null or undefined when calling getCompanyConnectionsAvailability.',
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
let localVarHeaders = this.defaultHeaders;
/**
* Check whether company connections are available for an author.
* @endpoint get /api/inse-service/authors/{author_id}/company-connections/availability
* @param authorId
* @param secureFgpAcc
* @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 getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CompanyConnectionsAvailability>;
public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CompanyConnectionsAvailability>>;
public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CompanyConnectionsAvailability>>;
public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error('Required parameter authorId was null or undefined when calling getCompanyConnectionsAvailability.');
}
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', '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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections/availability`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CompanyConnectionsAvailability>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Get possible company connections by OpenAlex author ID.
* @endpoint get /api/inse-service/authors/{author_id}/company-connections
* @param authorId
* @param secureFgpAcc
* @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 getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CompanyConnectionsResponse>;
public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error('Required parameter authorId was null or undefined when calling getCompanyConnectionsByAuthor.');
}
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarHeaders = this.defaultHeaders;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', '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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CompanyConnectionsResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections/availability`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CompanyConnectionsAvailability>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Get possible company connections by OpenAlex author ID.
* @endpoint get /api/inse-service/authors/{author_id}/company-connections
* @param authorId
* @param secureFgpAcc
* @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 getCompanyConnectionsByAuthor(
authorId: string,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<CompanyConnectionsResponse>;
public getCompanyConnectionsByAuthor(
authorId: string,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(
authorId: string,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(
authorId: string,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error(
'Required parameter authorId was null or undefined when calling getCompanyConnectionsByAuthor.',
);
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CompanyConnectionsResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+122 -222
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage';
@@ -28,231 +22,137 @@ import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage';
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class DFGInstitutionsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getDfgInstitutionAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/institutions/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarHeaders = this.defaultHeaders;
let localVarPath = `/api/dfg/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/dfg/institutions/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(
institutionIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_ids',
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/dfg/institutions/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
let localVarHeaders = this.defaultHeaders;
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/dfg/institutions/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getDfgInstitutionsByIds(institutionIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgInstitutionSummaryPage>;
public getDfgInstitutionsByIds(institutionIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(institutionIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgInstitutionSummaryPage>>;
public getDfgInstitutionsByIds(institutionIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'institution_ids');
})
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/dfg/institutions/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/dfg/institutions/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgInstitutionSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+122 -222
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage';
@@ -28,231 +22,137 @@ import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage';
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class DFGPersonsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Returns a list of persons based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/persons/autocomplete/selector
* @param query A search term to filter persons by (partial matches allowed).
* @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 getDfgPersonAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgPersonSummaryPage>;
public getDfgPersonAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a list of persons based on a search term for autocomplete functionality.
* @endpoint get /api/dfg/persons/autocomplete/selector
* @param query A search term to filter persons by (partial matches allowed).
* @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 getDfgPersonAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgPersonSummaryPage>;
public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarHeaders = this.defaultHeaders;
let localVarPath = `/api/dfg/persons/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
/**
* Returns a list of persons based on their IDs.
* @endpoint get /api/dfg/persons/ids
* @param personIds A list of person IDs to retrieve.
* @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 getDfgPersonsByIds(
personIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<DfgPersonSummaryPage>;
public getDfgPersonsByIds(
personIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(
personIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(
personIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (personIds) {
personIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'person_ids',
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/dfg/persons/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
let localVarHeaders = this.defaultHeaders;
/**
* Returns a list of persons based on their IDs.
* @endpoint get /api/dfg/persons/ids
* @param personIds A list of person IDs to retrieve.
* @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 getDfgPersonsByIds(personIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgPersonSummaryPage>;
public getDfgPersonsByIds(personIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(personIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgPersonSummaryPage>>;
public getDfgPersonsByIds(personIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (personIds) {
personIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'person_ids');
})
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/dfg/persons/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/dfg/persons/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<DfgPersonSummaryPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
File diff suppressed because it is too large Load Diff
+169 -316
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,12 @@
*/
/* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core';
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpResponse,
HttpEvent,
HttpParameterCodec,
HttpContext,
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
@@ -30,333 +24,192 @@ import { Institution } from '../model/institution';
import { InstitutionPageV2 } from '../model/institutionPageV2';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
providedIn: 'root'
})
export class InstitutionsV2Service extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/institutions/v2/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getInstitutionAutocompleteForSelector(
query?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InstitutionPageV2>;
public getInstitutionAutocompleteForSelector(
query?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(
query?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(
query?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a list of institutions based on a search term for autocomplete functionality.
* @endpoint get /api/institutions/v2/autocomplete/selector
* @param query A search term to filter institutions by (partial matches allowed).
* @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 getInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionPageV2>;
public getInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>query, 'query');
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarHeaders = this.defaultHeaders;
let localVarPath = `/api/institutions/v2/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
/**
* Returns an institution based on its ID.
* @endpoint get /api/institutions/v2/single/{institution_id}
* @param institutionId The ID of the institution to retrieve.
* @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 getInstitutionById2(
institutionId: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Institution>;
public getInstitutionById2(
institutionId: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Institution>>;
public getInstitutionById2(
institutionId: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Institution>>;
public getInstitutionById2(
institutionId: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (institutionId === null || institutionId === undefined) {
throw new Error(
'Required parameter institutionId was null or undefined when calling getInstitutionById2.',
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
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();
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/institutions/v2/single/${this.configuration.encodeParam({ name: 'institutionId', value: institutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Institution>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/institutions/v2/multiple/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InstitutionPageV2>;
public getInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionsByIds(
institutionIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionsByIds(
institutionIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_ids',
let localVarPath = `/api/institutions/v2/autocomplete/selector`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
});
}
let localVarHeaders = this.defaultHeaders;
/**
* Returns an institution based on its ID.
* @endpoint get /api/institutions/v2/single/{institution_id}
* @param institutionId The ID of the institution to retrieve.
* @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 getInstitutionById2(institutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Institution>;
public getInstitutionById2(institutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Institution>>;
public getInstitutionById2(institutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Institution>>;
public getInstitutionById2(institutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (institutionId === null || institutionId === undefined) {
throw new Error('Required parameter institutionId was null or undefined when calling getInstitutionById2.');
}
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/institutions/v2/single/${this.configuration.encodeParam({name: "institutionId", value: institutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Institution>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
/**
* Returns a list of institutions based on their IDs.
* @endpoint get /api/institutions/v2/multiple/ids
* @param institutionIds A list of institution IDs to retrieve.
* @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 getInstitutionsByIds(institutionIds?: Array<string>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionPageV2>;
public getInstitutionsByIds(institutionIds?: Array<string>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionPageV2>>;
public getInstitutionsByIds(institutionIds?: Array<string>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionPageV2>>;
public getInstitutionsByIds(institutionIds?: Array<string>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarTransferCache: boolean = options?.transferCache ?? true;
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>element, 'institution_ids');
})
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
let localVarHeaders = this.defaultHeaders;
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 {
responseType_ = 'blob';
}
}
let localVarPath = `/api/institutions/v2/multiple/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
}
let localVarPath = `/api/institutions/v2/multiple/ids`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPageV2>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+48 -44
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,47 +10,51 @@
import { TokenType } from './tokenType';
import { UserRole } from './userRole';
export interface AccessToken {
/**
* The unique identifier of the real account associated with this token.
*/
real_account_id: string;
/**
* The timestamp indicating when the token will expire.
*/
expires_at: string;
/**
* The epoch value for the token. Used for versioning of tokens.
*/
epoch?: number;
/**
* The type of the token, which is always ACCESS_TOKEN for this class.
*/
token_type?: TokenType;
/**
* A unique fingerprint of the user, used for additional security checks.
*/
user_fingerprint_hash: string;
/**
* The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation.
*/
effective_account_id: string;
/**
* The specific role this access token grants within its organization.
*/
effective_role?: UserRole;
/**
* The roles this access token grants within its organization.
*/
effective_roles?: Array<UserRole>;
/**
* The unique identifier of the organization associated with this access token.
*/
effective_organization_id: string;
effective_institution_id?: string | null;
/**
* The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes.
*/
raw_token: string;
export interface AccessToken {
/**
* The unique identifier of the real account associated with this token.
*/
real_account_id: string;
/**
* The timestamp indicating when the token will expire.
*/
expires_at: string;
/**
* The epoch value for the token. Used for versioning of tokens.
*/
epoch?: number;
/**
* The type of the token, which is always ACCESS_TOKEN for this class.
*/
token_type?: TokenType;
/**
* A unique fingerprint of the user, used for additional security checks.
*/
user_fingerprint_hash: string;
/**
* The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation.
*/
effective_account_id: string;
/**
* The specific role this access token grants within its organization.
*/
effective_role?: UserRole;
/**
* The roles this access token grants within its organization.
*/
effective_roles?: Array<UserRole>;
/**
* The unique identifier of the organization associated with this access token.
*/
effective_organization_id: string;
effective_institution_id?: string | null;
/**
* The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes.
*/
raw_token: string;
}
export namespace AccessToken {}
export namespace AccessToken {
}
+15 -13
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,16 +9,18 @@
*/
import { UserRole } from './userRole';
export interface AccountProfile {
id: string;
email: string;
name: string;
roles: Array<UserRole>;
organization_id: string;
organization_name: string;
deleted: boolean;
activated: boolean;
is_current?: boolean;
is_real_account?: boolean;
is_impersonating?: boolean;
export interface AccountProfile {
id: string;
email: string;
name: string;
roles: Array<UserRole>;
organization_id: string;
organization_name: string;
deleted: boolean;
activated: boolean;
is_current?: boolean;
is_real_account?: boolean;
is_impersonating?: boolean;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,14 +9,18 @@
*/
import { CompanyStatusFilter } from './companyStatusFilter';
export interface AuthorMetricsRequest {
/**
* OpenAlex IDs of the authors.
*/
author_ids: Array<string>;
/**
* Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'.
*/
company_status?: CompanyStatusFilter;
export interface AuthorMetricsRequest {
/**
* OpenAlex IDs of the authors.
*/
author_ids: Array<string>;
/**
* Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'.
*/
company_status?: CompanyStatusFilter;
}
export namespace AuthorMetricsRequest {}
export namespace AuthorMetricsRequest {
}
+16 -14
View File
@@ -1,24 +1,26 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 AuthorNode {
/**
* The ID of the author.
*/
id: string;
/**
* The display name of the author.
*/
display_name: string;
/**
* IDs of institutions this author is affiliated with.
*/
institution_ids?: Array<string>;
export interface AuthorNode {
/**
* The ID of the author.
*/
id: string;
/**
* The display name of the author.
*/
display_name: string;
/**
* IDs of institutions this author is affiliated with.
*/
institution_ids?: Array<string>;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,18 +9,22 @@
*/
import { AuthorOrientationProfileStatus } from './authorOrientationProfileStatus';
/**
* Aggregated research-orientation result for one selected author.
*/
export interface AuthorOrientationProfile {
/**
* The full OpenAlex author ID.
*/
author_id: string;
status: AuthorOrientationProfileStatus;
orientation_score?: number | null;
primary_category_counts?: { [key: string]: number } | null;
classified_work_count?: number | null;
scored_work_count?: number | null;
export interface AuthorOrientationProfile {
/**
* The full OpenAlex author ID.
*/
author_id: string;
status: AuthorOrientationProfileStatus;
orientation_score?: number | null;
primary_category_counts?: { [key: string]: number; } | null;
classified_work_count?: number | null;
scored_work_count?: number | null;
}
export namespace AuthorOrientationProfile {}
export namespace AuthorOrientationProfile {
}
@@ -1,19 +1,20 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export const AuthorOrientationProfileStatus = {
Available: 'available',
InsufficientScoredPublications: 'insufficient_scored_publications',
NoClassifiedPublications: 'no_classified_publications',
NoOrientationScore: 'no_orientation_score',
Restricted: 'restricted',
Available: 'available',
InsufficientScoredPublications: 'insufficient_scored_publications',
NoClassifiedPublications: 'no_classified_publications',
NoOrientationScore: 'no_orientation_score',
Restricted: 'restricted'
} as const;
export type AuthorOrientationProfileStatus =
(typeof AuthorOrientationProfileStatus)[keyof typeof AuthorOrientationProfileStatus];
export type AuthorOrientationProfileStatus = typeof AuthorOrientationProfileStatus[keyof typeof AuthorOrientationProfileStatus];
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,17 +10,19 @@
import { Timespan } from './timespan';
import { PublicationType } from './publicationType';
/**
* Filters used to compare the research orientation of selected authors.
*/
export interface AuthorOrientationProfilesRequest {
/**
* One to four unique OpenAlex author IDs.
*/
author_ids: Array<string>;
/**
* Optional publication-type filter. Empty means all types.
*/
publication_types?: Array<PublicationType>;
timespan?: Timespan | null;
export interface AuthorOrientationProfilesRequest {
/**
* One to four unique OpenAlex author IDs.
*/
author_ids: Array<string>;
/**
* Optional publication-type filter. Empty means all types.
*/
publication_types?: Array<PublicationType>;
timespan?: Timespan | null;
}
+20 -18
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,24 +9,26 @@
*/
import { Author } from './author';
/**
* A paginated response containing a list of authors.
*/
export interface AuthorPage {
/**
* The elements of the page.
*/
elements?: Array<Author>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface AuthorPage {
/**
* The elements of the page.
*/
elements?: Array<Author>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+24 -22
View File
@@ -1,35 +1,37 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Section 2: author-level stats independent of any keyword/topic/time filter.
*/
export interface AuthorStaticStats {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of Handelsregister company connections matched by the author\'s name.
*/
companies_count: number;
/**
* Number of news articles that mention the author by exact name.
*/
news_count: number;
/**
* Number of patents matched to the author (from the org_patents index).
*/
patents_count: number;
export interface AuthorStaticStats {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of Handelsregister company connections matched by the author\'s name.
*/
companies_count: number;
/**
* Number of news articles that mention the author by exact name.
*/
news_count: number;
/**
* Number of patents matched to the author (from the org_patents index).
*/
patents_count: number;
}
+39 -104
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,108 +9,43 @@
*/
import { SubfieldShare } from './subfieldShare';
/**
* A primary topic within a subfield.
*/
export interface TopicNode {
/**
* The OpenAlex ID of the primary topic.
*/
id: string;
/**
* The primary-topic display name.
*/
name: string;
/**
* Number of works whose primary topic is this topic.
*/
count: number;
export interface AuthorTopicProfile {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* All works of the author in the timespan, regardless of the topic filter.
*/
works_total: number;
/**
* Works matching the topic filter (same subset as Section 1).
*/
matched_works: number;
/**
* Matched works where one of the searched topics is the work\'s primary topic (only meaningful for filter_type \'topic\').
*/
primary_topic_matches: number;
/**
* Number of distinct primary topics across all works.
*/
distinct_topics: number;
/**
* Number of distinct primary-topic subfields across all works.
*/
distinct_subfields: number;
/**
* Number of distinct primary-topic fields across all works.
*/
distinct_fields: number;
/**
* Top subfields over all works, by primary topic, largest first.
*/
subfields?: Array<SubfieldShare>;
}
/**
* A subfield within a field, with its primary topics.
*/
export interface SubfieldNode {
/**
* The OpenAlex ID of the subfield.
*/
id: string;
/**
* The subfield display name.
*/
name: string;
/**
* Number of works whose primary topic belongs to this subfield.
*/
count: number;
/**
* Primary topics within this subfield, largest first.
*/
topics: Array<TopicNode>;
}
/**
* A field with its subfields, top of the primary-topic hierarchy.
*/
export interface FieldNode {
/**
* The OpenAlex ID of the field.
*/
id: string;
/**
* The field display name.
*/
name: string;
/**
* Number of works whose primary topic belongs to this field.
*/
count: number;
/**
* Subfields within this field, largest first.
*/
subfields: Array<SubfieldNode>;
}
export interface AuthorTopicProfile {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* All works of the author in the timespan, regardless of the topic filter.
*/
works_total: number;
/**
* Works matching the topic filter (same subset as Section 1).
*/
matched_works: number;
/**
* Matched works where one of the searched topics is the work\'s primary topic (only meaningful for filter_type \'topic\').
*/
primary_topic_matches: number;
/**
* Number of distinct primary topics across all works.
*/
distinct_topics: number;
/**
* Number of distinct primary-topic subfields across all works.
*/
distinct_subfields: number;
/**
* Number of distinct primary-topic fields across all works.
*/
distinct_fields: number;
/**
* Top subfields over all works, by primary topic, largest first.
*/
subfields?: Array<SubfieldShare>;
/**
* Field -> subfield -> topic hierarchy over all works, by primary topic,
* each level largest first. Drives the interactive topic treemap.
*/
field_tree: Array<FieldNode>;
}
+82 -80
View File
@@ -1,93 +1,95 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Section 1: combined stats over an author\'s works that match the topic filter.
*/
export interface AuthorTopicStats {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of the author\'s works matching the topic filter.
*/
works_total: number;
/**
* Number of the author\'s topic works where they are the corresponding author.
*/
corresponding_count: number;
/**
* Average field-normalized citation percentile (0-1) over the author\'s topic works.
*/
avg_percentile: number;
/**
* Number of the author\'s topic works in the top 1% most-cited.
*/
top1_count: number;
/**
* Number of the author\'s topic works in the top 10% most-cited.
*/
top10_count: number;
/**
* Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1 (cited more than the field/year/type average).
*/
fwci_above_one_count?: number;
/**
* Total citations across the author\'s topic works.
*/
citations_total?: number;
/**
* Average citations per topic work.
*/
avg_citations?: number;
/**
* Citations of the author\'s most-cited topic work.
*/
max_citations?: number;
/**
* h-index over the author\'s topic works (capped at 100).
*/
h_index?: number;
/**
* Average field-weighted citation impact (FWCI) over the author\'s topic works; works without an FWCI value are excluded.
*/
avg_fwci?: number;
/**
* Number of the author\'s topic works with at least one co-author institution of type \'company\'.
*/
industry_works_count?: number;
first_year?: number | null;
last_year?: number | null;
/**
* Number of the author\'s topic works where the matched keyword\'s relevance score is above 0.8.
*/
relevance_above_80_count?: number;
/**
* Average matched-keyword relevance score (0-1) over the author\'s topic works.
*/
avg_relevance?: number;
/**
* Number of the author\'s topic works where they are the first author.
*/
first_author_count?: number;
/**
* Number of the author\'s topic works where they are a middle author.
*/
middle_author_count?: number;
/**
* Number of the author\'s topic works where they are the last author.
*/
last_author_count?: number;
export interface AuthorTopicStats {
/**
* The OpenAlex ID of the author.
*/
author_id: string;
/**
* The name of the author.
*/
display_name: string;
/**
* Number of the author\'s works matching the topic filter.
*/
works_total: number;
/**
* Number of the author\'s topic works where they are the corresponding author.
*/
corresponding_count: number;
/**
* Average field-normalized citation percentile (0-1) over the author\'s topic works.
*/
avg_percentile: number;
/**
* Number of the author\'s topic works in the top 1% most-cited.
*/
top1_count: number;
/**
* Number of the author\'s topic works in the top 10% most-cited.
*/
top10_count: number;
/**
* Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1 (cited more than the field/year/type average).
*/
fwci_above_one_count?: number;
/**
* Total citations across the author\'s topic works.
*/
citations_total?: number;
/**
* Average citations per topic work.
*/
avg_citations?: number;
/**
* Citations of the author\'s most-cited topic work.
*/
max_citations?: number;
/**
* h-index over the author\'s topic works (capped at 100).
*/
h_index?: number;
/**
* Average field-weighted citation impact (FWCI) over the author\'s topic works; works without an FWCI value are excluded.
*/
avg_fwci?: number;
/**
* Number of the author\'s topic works with at least one co-author institution of type \'company\'.
*/
industry_works_count?: number;
first_year?: number | null;
last_year?: number | null;
/**
* Number of the author\'s topic works where the matched keyword\'s relevance score is above 0.8.
*/
relevance_above_80_count?: number;
/**
* Average matched-keyword relevance score (0-1) over the author\'s topic works.
*/
avg_relevance?: number;
/**
* Number of the author\'s topic works where they are the first author.
*/
first_author_count?: number;
/**
* Number of the author\'s topic works where they are a middle author.
*/
middle_author_count?: number;
/**
* Number of the author\'s topic works where they are the last author.
*/
last_author_count?: number;
}
+6 -4
View File
@@ -1,14 +1,16 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 AvailableImages {
images: Array<string>;
detail?: string;
export interface AvailableImages {
images: Array<string>;
detail?: string;
}
+16 -14
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,17 +9,19 @@
*/
import { JobRun } from './jobRun';
export interface BackgroundJobTask {
id: number;
name: string;
description: string;
target_index: string;
image: string | null;
command: string | null;
env: { [key: string]: string };
schedule: string | null;
enabled: boolean;
next_run_at: string | null;
last_run: JobRun | null;
status: string;
export interface BackgroundJobTask {
id: number;
name: string;
description: string;
target_index: string;
image: string | null;
command: string | null;
env: { [key: string]: string; };
schedule: string | null;
enabled: boolean;
next_run_at: string | null;
last_run: JobRun | null;
status: string;
}
@@ -1,17 +1,19 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 BmbfProjectStatusStatistics {
institution_id: string;
organization_name: string;
ongoing: number;
upcoming: number;
completed: number;
export interface BmbfProjectStatusStatistics {
institution_id: string;
organization_name: string;
ongoing: number;
upcoming: number;
completed: number;
}
@@ -1,23 +1,25 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* A single institution entry derived from a BUND project record. Note: this index has no dedicated institution entity — each entry is reconstructed from the agency/recipient fields on a single project hit, so the same institution may appear multiple times (once per project).
*/
export interface BundInstitutionSummary {
department?: string | null;
department_fullname?: string | null;
name?: string | null;
recepient?: string | null;
municipality?: string | null;
place?: string | null;
state?: string | null;
country?: string | null;
export interface BundInstitutionSummary {
department?: string | null;
department_fullname?: string | null;
name?: string | null;
recepient?: string | null;
municipality?: string | null;
place?: string | null;
state?: string | null;
country?: string | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,24 +9,26 @@
*/
import { BundInstitutionSummary } from './bundInstitutionSummary';
/**
* A paginated response containing a list of institutions.
*/
export interface BundInstitutionSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<BundInstitutionSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface BundInstitutionSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<BundInstitutionSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+45 -43
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,49 +9,51 @@
*/
import { Topic } from './topic';
/**
* Clean summary model for a Bund (federal) project, consolidating all fields into semantic English names with proper native types.
*/
export interface BundProjectDetails {
/**
* The ID of the Bund project
*/
id: string;
funding_reference?: string | null;
title?: string | null;
description?: string | null;
joint_project?: string | null;
funding_type?: string | null;
funding_profile?: string | null;
funding_amount?: number | null;
funding_start_date?: string | null;
funding_end_date?: string | null;
duration?: string | null;
performance_plan_code?: string | null;
performance_plan_fullname?: string | null;
executing_agency?: string | null;
funding_recipient?: string | null;
project_agency?: string | null;
project_agency_fullname?: string | null;
department?: string | null;
department_fullname?: string | null;
division?: string | null;
location?: string | null;
municipality?: string | null;
state?: string | null;
country?: string | null;
municipality_code?: string | null;
publication_date?: string | null;
is_new?: boolean | null;
record_date?: string | null;
unix_timestamp?: number | null;
/**
* All persons associated with the Bund project (from nested Arb object)
*/
associated_persons?: Array<string>;
/**
* All institutions associated with the Bund project
*/
institutions?: Array<string>;
oa_topics?: Array<Topic> | null;
export interface BundProjectDetails {
/**
* The ID of the Bund project
*/
id: string;
funding_reference?: string | null;
title?: string | null;
description?: string | null;
joint_project?: string | null;
funding_type?: string | null;
funding_profile?: string | null;
funding_amount?: number | null;
funding_start_date?: string | null;
funding_end_date?: string | null;
duration?: string | null;
performance_plan_code?: string | null;
performance_plan_fullname?: string | null;
executing_agency?: string | null;
funding_recipient?: string | null;
project_agency?: string | null;
project_agency_fullname?: string | null;
department?: string | null;
department_fullname?: string | null;
division?: string | null;
location?: string | null;
municipality?: string | null;
state?: string | null;
country?: string | null;
municipality_code?: string | null;
publication_date?: string | null;
is_new?: boolean | null;
record_date?: string | null;
unix_timestamp?: number | null;
/**
* All persons associated with the Bund project (from nested Arb object)
*/
associated_persons?: Array<string>;
/**
* All institutions associated with the Bund project
*/
institutions?: Array<string>;
oa_topics?: Array<Topic> | null;
}
@@ -1,33 +0,0 @@
/**
* Innovation Search Engine API
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Highlighted matching fragments from a BUND project search.
*/
export interface BundProjectHighlight {
/**
* Highlights from the Elasticsearch field \"Verbundprojekt\".
*/
joint_project?: Array<string>;
/**
* Highlights from the Elasticsearch field \"Thema\".
*/
topic?: Array<string>;
/**
* Highlights from the Elasticsearch field \"Zuwendungsempfänger\".
*/
recipient?: Array<string>;
/**
* Highlights from the Elasticsearch field \"Ausführende Stelle\".
*/
implementing_agency?: Array<string>;
}
+20 -18
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,21 +9,23 @@
*/
import { BundProjectSummary } from './bundProjectSummary';
export interface BundProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The bund projects on this page.
*/
elements?: Array<BundProjectSummary>;
export interface BundProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The bund projects on this page.
*/
elements?: Array<BundProjectSummary>;
}
+34 -34
View File
@@ -1,46 +1,46 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { BundProjectHighlight } from './bundProjectHighlight';
import { Topic } from './topic';
import { BundInstitutionSummary } from './bundInstitutionSummary';
export interface BundProjectSummary {
funding_code?: string | null;
department?: string | null;
department_fullname?: string | null;
referat?: string | null;
project_sponsor?: string | null;
project_sponsor_fullname?: string | null;
work_unit?: string | null;
recipient?: string | null;
municipal_code?: string | null;
municipality?: string | null;
place?: string | null;
state?: string | null;
country?: string | null;
implementing_agency?: string | null;
topic?: string | null;
performance_plan_system?: string | null;
performance_plan_system_text?: string | null;
funding_start?: string | null;
funding_end?: string | null;
grant_amount?: number | null;
funding_profile?: string | null;
joint_project?: string | null;
funding_type?: string | null;
publication_date?: string | null;
unix_timestamp?: number | null;
date?: string | null;
new?: boolean | null;
duration?: string | null;
oa_topics?: Array<Topic> | null;
institution?: BundInstitutionSummary | null;
highlight?: BundProjectHighlight | null;
export interface BundProjectSummary {
funding_code?: string | null;
department?: string | null;
department_fullname?: string | null;
referat?: string | null;
project_sponsor?: string | null;
project_sponsor_fullname?: string | null;
work_unit?: string | null;
recipient?: string | null;
municipal_code?: string | null;
municipality?: string | null;
place?: string | null;
state?: string | null;
country?: string | null;
implementing_agency?: string | null;
topic?: string | null;
performance_plan_system?: string | null;
performance_plan_system_text?: string | null;
funding_start?: string | null;
funding_end?: string | null;
grant_amount?: number | null;
funding_profile?: string | null;
joint_project?: string | null;
funding_type?: string | null;
publication_date?: string | null;
unix_timestamp?: number | null;
date?: string | null;
'new'?: boolean | null;
duration?: string | null;
oa_topics?: Array<Topic> | null;
institution?: BundInstitutionSummary | null;
}
@@ -1,20 +0,0 @@
/**
* Innovation Search Engine API
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DfgProjectTopic } from './dfgProjectTopic';
export interface BundProjectTopics {
institution_id: string;
organization_name: string;
project_count: number;
matched_project_count: number;
topics: Array<DfgProjectTopic>;
}
+24 -22
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -12,25 +12,27 @@ import { Edge } from './edge';
import { InstitutionNode } from './institutionNode';
import { AuthorNode } from './authorNode';
export interface CollaborationGraph {
/**
* The ID of the root author.
*/
root_author_id: string;
/**
* A list of author nodes.
*/
authors?: Array<AuthorNode>;
/**
* A list of institution nodes.
*/
institutions?: Array<InstitutionNode>;
/**
* A list of work nodes.
*/
works?: Array<WorkNode>;
/**
* A list of edges in the collaboration graph.
*/
edges?: Array<Edge>;
export interface CollaborationGraph {
/**
* The ID of the root author.
*/
root_author_id: string;
/**
* A list of author nodes.
*/
authors?: Array<AuthorNode>;
/**
* A list of institution nodes.
*/
institutions?: Array<InstitutionNode>;
/**
* A list of work nodes.
*/
works?: Array<WorkNode>;
/**
* A list of edges in the collaboration graph.
*/
edges?: Array<Edge>;
}
@@ -1,17 +1,18 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export const CollaborationGraphStatus = {
Pending: 'pending',
Completed: 'completed',
Failed: 'failed',
Pending: 'pending',
Completed: 'completed',
Failed: 'failed'
} as const;
export type CollaborationGraphStatus =
(typeof CollaborationGraphStatus)[keyof typeof CollaborationGraphStatus];
export type CollaborationGraphStatus = typeof CollaborationGraphStatus[keyof typeof CollaborationGraphStatus];
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,12 +10,16 @@
import { CollaborationGraph } from './collaborationGraph';
import { CollaborationGraphStatus } from './collaborationGraphStatus';
export interface CollaborationGraphStatusResponse {
/**
* The status of the collaboration graph.
*/
status: CollaborationGraphStatus;
result?: CollaborationGraph | null;
error_message?: string | null;
export interface CollaborationGraphStatusResponse {
/**
* The status of the collaboration graph.
*/
status: CollaborationGraphStatus;
result?: CollaborationGraph | null;
error_message?: string | null;
}
export namespace CollaborationGraphStatusResponse {}
export namespace CollaborationGraphStatusResponse {
}
@@ -1,13 +1,15 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 CompanyConnectionsAvailability {
available: boolean;
export interface CompanyConnectionsAvailability {
available: boolean;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,14 @@
*/
import { CompanyConnection } from './companyConnection';
export interface CompanyConnectionsResponse {
author_id: string;
display_name?: string | null;
matching_method?: string | null;
company_count: number;
has_more_results: boolean;
common_name_warning: boolean;
connections?: Array<CompanyConnection>;
export interface CompanyConnectionsResponse {
author_id: string;
display_name?: string | null;
matching_method?: string | null;
company_count: number;
has_more_results: boolean;
common_name_warning: boolean;
connections?: Array<CompanyConnection>;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,11 +9,13 @@
*/
import { UserRole } from './userRole';
export interface CreateAccountRequest {
email: string;
name: string;
roles?: Array<UserRole>;
organization_id: string;
password: string;
openalex_person_id?: string | null;
export interface CreateAccountRequest {
email: string;
name: string;
roles?: Array<UserRole>;
organization_id: string;
password: string;
openalex_person_id?: string | null;
}
@@ -1,13 +1,15 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 CreatePersonBookmark {
person_name?: string | null;
export interface CreatePersonBookmark {
person_name?: string | null;
}
@@ -1,23 +1,25 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* DFGProjectFachgebieteInner
*/
export interface DFGProjectFachgebieteInner {
fach?: string | null;
fach_code?: string | null;
fachgebiet?: string | null;
fachgebiet_code?: string | null;
fachkollegium?: string | null;
fachkollegium_code?: string | null;
wissenschaftsbereich?: string | null;
wissenschaftsbereich_code?: string | null;
export interface DFGProjectFachgebieteInner {
fach?: string | null;
fach_code?: string | null;
fachgebiet?: string | null;
fachgebiet_code?: string | null;
fachkollegium?: string | null;
fachkollegium_code?: string | null;
wissenschaftsbereich?: string | null;
wissenschaftsbereich_code?: string | null;
}
@@ -1,15 +1,17 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 DashboardStatisticValue {
institution_id: string;
organization_name: string;
value: number;
export interface DashboardStatisticValue {
institution_id: string;
organization_name: string;
value: number;
}
+12 -10
View File
@@ -1,20 +1,22 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 DashboardStatistics {
institution_id: string;
organization_name: string;
publications: number;
persons: number;
projects: number;
dfg_projects: number;
eu_projects: number;
bmbf_projects: number;
export interface DashboardStatistics {
institution_id: string;
organization_name: string;
publications: number;
persons: number;
projects: number;
dfg_projects: number;
eu_projects: number;
bmbf_projects: number;
}
@@ -1,23 +1,25 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* A summary of a DFG institution.
*/
export interface DfgInstitutionSummary {
id: number;
institute_name_de?: string | null;
institute_name_en?: string | null;
root_id?: number | null;
root_name_de?: string | null;
root_name_en?: string | null;
address_country_de?: string | null;
address_country_en?: string | null;
export interface DfgInstitutionSummary {
id: number;
institute_name_de?: string | null;
institute_name_en?: string | null;
root_id?: number | null;
root_name_de?: string | null;
root_name_en?: string | null;
address_country_de?: string | null;
address_country_en?: string | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,24 +9,26 @@
*/
import { DfgInstitutionSummary } from './dfgInstitutionSummary';
/**
* A paginated response containing a list of institutions.
*/
export interface DfgInstitutionSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgInstitutionSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface DfgInstitutionSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgInstitutionSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+11 -9
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,14 @@
*/
import { DfgInstitutionSummary } from './dfgInstitutionSummary';
export interface DfgPersonSummary {
person_id: number;
orcid_id?: string | null;
project_ref_id?: number | null;
full_name?: string | null;
role_label_en?: string | null;
role_label_de?: string | null;
institution?: DfgInstitutionSummary | null;
export interface DfgPersonSummary {
person_id: number;
orcid_id?: string | null;
project_ref_id?: number | null;
full_name?: string | null;
role_label_en?: string | null;
role_label_de?: string | null;
institution?: DfgInstitutionSummary | null;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,24 +9,26 @@
*/
import { DfgPersonSummary } from './dfgPersonSummary';
/**
* A paginated response containing a list of persons.
*/
export interface DfgPersonSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgPersonSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
export interface DfgPersonSummaryPage {
/**
* The elements of the page.
*/
elements?: Array<DfgPersonSummary>;
/**
* The page number. (0-based)
*/
page?: number;
/**
* The page size in elements.
*/
size?: number;
/**
* The total number of elements.
*/
total?: number;
}
+65 -63
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,69 +14,71 @@ import { DFGProjectFachgebieteInner } from './dFGProjectFachgebieteInner';
import { Topic } from './topic';
import { DfgProjectPublicationSummary } from './dfgProjectPublicationSummary';
/**
* Clean, enriched summary model for a DFG project.
*/
export interface DfgProjectDetails {
id?: number | null;
link?: string | null;
page_url?: string | null;
external_link?: string | null;
title_de?: string | null;
title_en?: string | null;
description_de?: string | null;
description_en?: string | null;
final_report_abstract_de?: string | null;
final_report_abstract_en?: string | null;
project_identifier_de?: string | null;
project_identifier_en?: string | null;
funding_start?: number | null;
funding_end?: number | null;
funding_period_de?: string | null;
funding_period_en?: string | null;
funding_type_de?: string | null;
funding_type_en?: string | null;
funding_type_key?: string | null;
dfg_procedure?: string | null;
is_transfer_project?: boolean | null;
website_html_de?: string | null;
website_html_en?: string | null;
equipment_group?: string | null;
equipment_name?: string | null;
subject_area_de?: string | null;
subject_area_en?: string | null;
/**
* Detailed DFG subject-area classification entries (Fachsystematik)
*/
subject_classifications?: Array<DFGProjectFachgebieteInner>;
international_relation_de?: string | null;
international_relation_en?: string | null;
/**
* All persons associated with the project, each with their role
*/
persons?: Array<DfgProjectPersonRole>;
/**
* All institutions associated with the project, each with their role
*/
institutions?: Array<DfgProjectInstitutionRole>;
/**
* Flat, de-duplicated list of all person full names (convenience view)
*/
associated_persons?: Array<string>;
/**
* Flat, de-duplicated list of all institution names (convenience view)
*/
associated_institutions?: Array<string>;
parent_project_id?: number | null;
parent_title_de?: string | null;
parent_title_en?: string | null;
/**
* Sub-projects of this project, if any
*/
subprojects?: Array<DfgProjectSubprojectSummary>;
/**
* Publications resulting from the project
*/
publications?: Array<DfgProjectPublicationSummary>;
topics?: Array<Topic> | null;
export interface DfgProjectDetails {
id?: number | null;
link?: string | null;
page_url?: string | null;
external_link?: string | null;
title_de?: string | null;
title_en?: string | null;
description_de?: string | null;
description_en?: string | null;
final_report_abstract_de?: string | null;
final_report_abstract_en?: string | null;
project_identifier_de?: string | null;
project_identifier_en?: string | null;
funding_start?: number | null;
funding_end?: number | null;
funding_period_de?: string | null;
funding_period_en?: string | null;
funding_type_de?: string | null;
funding_type_en?: string | null;
funding_type_key?: string | null;
dfg_procedure?: string | null;
is_transfer_project?: boolean | null;
website_html_de?: string | null;
website_html_en?: string | null;
equipment_group?: string | null;
equipment_name?: string | null;
subject_area_de?: string | null;
subject_area_en?: string | null;
/**
* Detailed DFG subject-area classification entries (Fachsystematik)
*/
subject_classifications?: Array<DFGProjectFachgebieteInner>;
international_relation_de?: string | null;
international_relation_en?: string | null;
/**
* All persons associated with the project, each with their role
*/
persons?: Array<DfgProjectPersonRole>;
/**
* All institutions associated with the project, each with their role
*/
institutions?: Array<DfgProjectInstitutionRole>;
/**
* Flat, de-duplicated list of all person full names (convenience view)
*/
associated_persons?: Array<string>;
/**
* Flat, de-duplicated list of all institution names (convenience view)
*/
associated_institutions?: Array<string>;
parent_project_id?: number | null;
parent_title_de?: string | null;
parent_title_en?: string | null;
/**
* Sub-projects of this project, if any
*/
subprojects?: Array<DfgProjectSubprojectSummary>;
/**
* Publications resulting from the project
*/
publications?: Array<DfgProjectPublicationSummary>;
topics?: Array<Topic> | null;
}
@@ -1,23 +0,0 @@
/**
* Innovation Search Engine API
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DfgSubjectClassificationHighlight } from './dfgSubjectClassificationHighlight';
/**
* Highlighted fragments returned for a DFG project.
*/
export interface DfgProjectHighlight {
title_de?: Array<string>;
title_en?: Array<string>;
abstract_de?: Array<string>;
abstract_en?: Array<string>;
subject_classifications?: Array<DfgSubjectClassificationHighlight>;
}
@@ -1,23 +1,25 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* An institution associated with the project, together with its role.
*/
export interface DfgProjectInstitutionRole {
institute_id?: number | null;
name_de?: string | null;
name_en?: string | null;
role_key?: string | null;
role_label_de?: string | null;
role_label_en?: string | null;
is_dissolved?: boolean | null;
is_head?: boolean | null;
export interface DfgProjectInstitutionRole {
institute_id?: number | null;
name_de?: string | null;
name_en?: string | null;
role_key?: string | null;
role_label_de?: string | null;
role_label_en?: string | null;
is_dissolved?: boolean | null;
is_head?: boolean | null;
}
@@ -1,14 +1,16 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 DfgProjectKeyword {
name: string;
project_count: number;
export interface DfgProjectKeyword {
name: string;
project_count: number;
}
@@ -1,25 +1,27 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* A person associated with the project, together with their role.
*/
export interface DfgProjectPersonRole {
person_id?: number | null;
full_name?: string | null;
orcid_id?: string | null;
role_key?: string | null;
role_label_de?: string | null;
role_label_en?: string | null;
affiliation_de?: string | null;
affiliation_en?: string | null;
is_deceased?: boolean | null;
is_head?: boolean | null;
export interface DfgProjectPersonRole {
person_id?: number | null;
full_name?: string | null;
orcid_id?: string | null;
role_key?: string | null;
role_label_de?: string | null;
role_label_en?: string | null;
affiliation_de?: string | null;
affiliation_en?: string | null;
is_deceased?: boolean | null;
is_head?: boolean | null;
}
@@ -1,20 +1,22 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* A lightweight reference to a publication resulting from the project.
*/
export interface DfgProjectPublicationSummary {
publication_id?: number | null;
title?: string | null;
authors_editors?: string | null;
doi?: string | null;
publication_year?: number | null;
export interface DfgProjectPublicationSummary {
publication_id?: number | null;
title?: string | null;
authors_editors?: string | null;
doi?: string | null;
publication_year?: number | null;
}
@@ -1,17 +1,19 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 DfgProjectStatusStatistics {
institution_id: string;
organization_name: string;
ongoing: number;
upcoming: number;
completed: number;
export interface DfgProjectStatusStatistics {
institution_id: string;
organization_name: string;
ongoing: number;
upcoming: number;
completed: number;
}
@@ -1,24 +1,26 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* A lightweight reference to a sub-project of this project.
*/
export interface DfgProjectSubprojectSummary {
subproject_id?: number | null;
title_de?: string | null;
title_en?: string | null;
short_title?: string | null;
role_label_de?: string | null;
person_full_name?: string | null;
status_de?: string | null;
funding_start?: number | null;
funding_end?: number | null;
export interface DfgProjectSubprojectSummary {
subproject_id?: number | null;
title_de?: string | null;
title_en?: string | null;
short_title?: string | null;
role_label_de?: string | null;
person_full_name?: string | null;
status_de?: string | null;
funding_start?: number | null;
funding_end?: number | null;
}
@@ -9,7 +9,6 @@
*/
import { DfgInstitutionSummary } from './dfgInstitutionSummary';
import { DFGProjectFachgebieteInner } from './dFGProjectFachgebieteInner';
import { DfgProjectHighlight } from './dfgProjectHighlight';
import { Topic } from './topic';
import { DfgPersonSummary } from './dfgPersonSummary';
@@ -20,11 +19,8 @@ export interface DfgProjectSummary {
*/
id: string;
link?: string | null;
title_de?: string | null;
title_en?: string | null;
subject_classifications_raw?: string | null;
abstract_de?: string | null;
abstract_en?: string | null;
title?: string | null;
professional_classification?: string | null;
funding_start?: string | null;
funding_end?: string | null;
/**
@@ -41,6 +37,5 @@ export interface DfgProjectSummary {
persons?: Array<DfgPersonSummary>;
subject_classifications?: Array<DFGProjectFachgebieteInner> | null;
topics?: Array<Topic> | null;
highlight?: DfgProjectHighlight | null;
}
+9 -10
View File
@@ -9,14 +9,13 @@
*/
import { DfgProjectKeyword } from './dfgProjectKeyword';
export interface DfgProjectTopic {
id: string;
name: string;
subfield?: string | null;
field?: string | null;
domain?: string | null;
project_count: number;
field_project_count: number;
subfield_project_count: number;
keywords: Array<DfgProjectKeyword>;
export interface DfgProjectTopic {
id: string;
name: string;
subfield?: string | null;
field?: string | null;
domain?: string | null;
project_count: number;
keywords: Array<DfgProjectKeyword>;
}
+9 -7
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,10 +9,12 @@
*/
import { DfgProjectTopic } from './dfgProjectTopic';
export interface DfgProjectTopics {
institution_id: string;
organization_name: string;
project_count: number;
matched_project_count: number;
topics: Array<DfgProjectTopic>;
export interface DfgProjectTopics {
institution_id: string;
organization_name: string;
project_count: number;
matched_project_count: number;
topics: Array<DfgProjectTopic>;
}
@@ -1,27 +0,0 @@
/**
* Innovation Search Engine API
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* A highlighted nested subject classification.
*/
export interface DfgSubjectClassificationHighlight {
/**
* The keyword/inner_hits group which produced this match.
*/
query: string;
offset?: number | null;
fach?: Array<string>;
fachkollegium?: Array<string>;
fachgebiet?: Array<string>;
fachgebiet_de?: Array<string>;
wissenschaftsbereich?: Array<string>;
}
+6 -4
View File
@@ -1,14 +1,16 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 DockerHealth {
reachable: boolean;
detail: string;
export interface DockerHealth {
reachable: boolean;
detail: string;
}
+16 -14
View File
@@ -1,24 +1,26 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 Edge {
/**
* The ID of the source node.
*/
source: string;
/**
* The ID of the target node.
*/
target: string;
/**
* The weight of the edge.
*/
weight: number;
export interface Edge {
/**
* The ID of the source node.
*/
source: string;
/**
* The ID of the target node.
*/
target: string;
/**
* The weight of the edge.
*/
weight: number;
}
@@ -1,25 +0,0 @@
/**
* Innovation Search Engine API
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Highlighted fragments returned by Elasticsearch.
*/
export interface EuCordisProjectHighlight {
title?: Array<string>;
acronym?: Array<string>;
objective?: Array<string>;
keywords?: Array<string>;
/**
* Highlighted fragments from the CORDIS topics text field.
*/
cordis_topic_text?: Array<string>;
}
@@ -9,7 +9,6 @@
*/
import { EuCordisTopicSummary } from './euCordisTopicSummary';
import { AuthorPage } from './authorPage';
import { EuCordisProjectHighlight } from './euCordisProjectHighlight';
import { EuCordisEurosciVocSummary } from './euCordisEurosciVocSummary';
import { Topic } from './topic';
import { EuCordisOrganizationSummary } from './euCordisOrganizationSummary';
@@ -38,8 +37,6 @@ export interface EuCordisProjectSummary {
* Mapped OpenAlex topics.
*/
topics?: Array<Topic>;
cordis_topic_text?: string | null;
highlight?: EuCordisProjectHighlight | null;
}
export namespace EuCordisProjectSummary {
}
+45 -43
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -25,49 +25,51 @@ import { HEUReportSummary } from './hEUReportSummary';
import { Topic } from './topic';
import { HEUProjectDetails } from './hEUProjectDetails';
/**
* The project data
*/
export interface EuProjectData {
acronym?: string;
contentUpdateDate?: string;
ecMaxContribution?: number;
ecSignatureDate?: string;
endDate?: string;
frameworkProgramme?: string;
fundingScheme?: string;
grantDoi?: string;
humanValidated?: boolean;
id?: string;
keywords?: string;
legalBasis?: string;
masterCall?: string;
nature?: string;
objective?: string;
rcn?: string;
startDate?: string;
status?: string;
subCall?: string;
title?: string;
topics?: string;
totalCost?: number;
organizations?: Array<HEUOrganization>;
publications?: Array<HEUPublication>;
iprs?: Array<Fp7ProjectIPR>;
report_summaries?: Array<Fp7ReportSummary>;
topicsList?: Array<HEUTopic>;
web_links?: Array<Fp7WebLink>;
eurosciVoc?: Array<HEUEurosciVoc>;
legalBasisList?: Array<HEULegalBasis>;
organizationCount?: number;
publicationCount?: number;
iprCount?: number;
oaTopics?: Array<Topic>;
oaAuthors?: AuthorPage;
deliverables?: Array<HEUDeliverable>;
reportSummaries?: Array<HEUReportSummary>;
webLinks?: Array<HEUWebLink>;
ercPrincipalInvestigators?: Array<H2020ErcPI>;
deliverableCount?: number;
ercPiCount?: number;
export interface EuProjectData {
acronym?: string;
contentUpdateDate?: string;
ecMaxContribution?: number;
ecSignatureDate?: string;
endDate?: string;
frameworkProgramme?: string;
fundingScheme?: string;
grantDoi?: string;
humanValidated?: boolean;
id?: string;
keywords?: string;
legalBasis?: string;
masterCall?: string;
nature?: string;
objective?: string;
rcn?: string;
startDate?: string;
status?: string;
subCall?: string;
title?: string;
topics?: string;
totalCost?: number;
organizations?: Array<HEUOrganization>;
publications?: Array<HEUPublication>;
iprs?: Array<Fp7ProjectIPR>;
report_summaries?: Array<Fp7ReportSummary>;
topicsList?: Array<HEUTopic>;
web_links?: Array<Fp7WebLink>;
eurosciVoc?: Array<HEUEurosciVoc>;
legalBasisList?: Array<HEULegalBasis>;
organizationCount?: number;
publicationCount?: number;
iprCount?: number;
oaTopics?: Array<Topic>;
oaAuthors?: AuthorPage;
deliverables?: Array<HEUDeliverable>;
reportSummaries?: Array<HEUReportSummary>;
webLinks?: Array<HEUWebLink>;
ercPrincipalInvestigators?: Array<H2020ErcPI>;
deliverableCount?: number;
ercPiCount?: number;
}
@@ -1,17 +1,19 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 EuProjectStatusStatistics {
institution_id: string;
organization_name: string;
ongoing: number;
upcoming: number;
completed: number;
export interface EuProjectStatusStatistics {
institution_id: string;
organization_name: string;
ongoing: number;
upcoming: number;
completed: number;
}
@@ -1,20 +0,0 @@
/**
* Innovation Search Engine API
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { DfgProjectTopic } from './dfgProjectTopic';
export interface EuProjectTopics {
institution_id: string;
organization_name: string;
project_count: number;
matched_project_count: number;
topics: Array<DfgProjectTopic>;
}
+16 -14
View File
@@ -1,24 +1,26 @@
/**
* Innovation Search Engine API
*
*
*
*
* 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 FileUpload {
/**
* The name of the uploaded file.
*/
filename: string;
/**
* The base64-encoded content of the uploaded file.
*/
content_base64: string;
/**
* The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc.
*/
mime_type: string;
export interface FileUpload {
/**
* The name of the uploaded file.
*/
filename: string;
/**
* The base64-encoded content of the uploaded file.
*/
content_base64: string;
/**
* The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc.
*/
mime_type: string;
}
+39 -37
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -18,43 +18,45 @@ import { Topic } from './topic';
import { Fp7Organization } from './fp7Organization';
import { Fp7LegalBasis } from './fp7LegalBasis';
/**
* Comprehensive FP7 Project model combining all related entities. This model extends the base Fp7Project with all associated data.
*/
export interface Fp7ProjectDetails {
acronym?: string | null;
contentUpdateDate?: string | null;
ecMaxContribution?: number | null;
ecSignatureDate?: string | null;
endDate?: string | null;
frameworkProgramme?: string | null;
fundingScheme?: string | null;
grantDoi?: string | null;
humanValidated?: boolean | null;
id?: string | null;
keywords?: string | null;
legalBasis?: string | null;
masterCall?: string | null;
nature?: string | null;
objective?: string | null;
rcn?: string | null;
startDate?: string | null;
status?: string | null;
subCall?: string | null;
title?: string | null;
topics?: string | null;
totalCost?: number | null;
organizations?: Array<Fp7Organization> | null;
publications?: Array<Fp7Publication> | null;
iprs?: Array<Fp7ProjectIPR> | null;
report_summaries?: Array<Fp7ReportSummary> | null;
topicsList?: Array<Fp7Topic> | null;
web_links?: Array<Fp7WebLink> | null;
eurosciVoc?: Array<Fp7EurosciVoc> | null;
legalBasisList?: Array<Fp7LegalBasis> | null;
organizationCount?: number | null;
publicationCount?: number | null;
iprCount?: number | null;
oaTopics?: Array<Topic> | null;
oaAuthors?: AuthorPage | null;
export interface Fp7ProjectDetails {
acronym?: string | null;
contentUpdateDate?: string | null;
ecMaxContribution?: number | null;
ecSignatureDate?: string | null;
endDate?: string | null;
frameworkProgramme?: string | null;
fundingScheme?: string | null;
grantDoi?: string | null;
humanValidated?: boolean | null;
id?: string | null;
keywords?: string | null;
legalBasis?: string | null;
masterCall?: string | null;
nature?: string | null;
objective?: string | null;
rcn?: string | null;
startDate?: string | null;
status?: string | null;
subCall?: string | null;
title?: string | null;
topics?: string | null;
totalCost?: number | null;
organizations?: Array<Fp7Organization> | null;
publications?: Array<Fp7Publication> | null;
iprs?: Array<Fp7ProjectIPR> | null;
report_summaries?: Array<Fp7ReportSummary> | null;
topicsList?: Array<Fp7Topic> | null;
web_links?: Array<Fp7WebLink> | null;
eurosciVoc?: Array<Fp7EurosciVoc> | null;
legalBasisList?: Array<Fp7LegalBasis> | null;
organizationCount?: number | null;
publicationCount?: number | null;
iprCount?: number | null;
oaTopics?: Array<Topic> | null;
oaAuthors?: AuthorPage | null;
}
+23 -21
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,27 +9,29 @@
*/
import { Author } from './author';
/**
* Fp7Publication
*/
export interface Fp7Publication {
authors?: string | null;
oaAuthors?: Array<Author> | null;
collection?: string | null;
contentUpdateDate?: string | null;
doi?: string | null;
id?: string | null;
isPublishedAs?: string | null;
journalNumber?: string | null;
journalTitle?: string | null;
projectAcronym?: string | null;
projectID?: string | null;
publishedPages?: string | null;
publishedYear?: number | null;
publisher?: string | null;
qaProcessedDoi?: string | null;
rcn?: string | null;
repositoryUrl?: string | null;
title?: string | null;
volume?: string | null;
export interface Fp7Publication {
authors?: string | null;
oaAuthors?: Array<Author> | null;
collection?: string | null;
contentUpdateDate?: string | null;
doi?: string | null;
id?: string | null;
isPublishedAs?: string | null;
journalNumber?: string | null;
journalTitle?: string | null;
projectAcronym?: string | null;
projectID?: string | null;
publishedPages?: string | null;
publishedYear?: number | null;
publisher?: string | null;
qaProcessedDoi?: string | null;
rcn?: string | null;
repositoryUrl?: string | null;
title?: string | null;
volume?: string | null;
}

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