Added institution based finding of bund and eu projects
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
UNIVERSITAET DUISBURG-ESSEN
|
||||
UNIVERSITAET DUISBURG-ESSEN - STANDORT DUISBURG
|
||||
UNIVERSITÄT DUISBURG-ESSEN
|
||||
UNIVERSITAET DUISBURG-ESSEN - STANDORT ESSEN
|
||||
UNIVERSITAET DUISBURG-ESSEN (UNIVERSITY OF DUISBURG-ESSEN)
|
||||
UNIVERSITAT DUISBURG-ESSEN
|
||||
UNIVERSITY OF DUISBURG-ESSEN
|
||||
UNIVERSITÄT DUISBURG ESSEN
|
||||
@@ -3,4 +3,7 @@ ELASTICSEARCH_API_KEY=am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ
|
||||
|
||||
LLM_API_URL=https://project.nes.uni-due.de/llm2/v1/
|
||||
LLM_API_KEY=c2d5e7ccf7a4760dd3d19bed2caed9d85ff7437400e0ea82a6d6f912ebc2f212
|
||||
LLM_MODEL=gemma4-e4b
|
||||
LLM_MODEL=gemma4-e4b
|
||||
|
||||
ELASTICSEARCH_INSE_URL=https://inse.nes.uni-due.de/elastic
|
||||
ELASTICSEARCH_INSE_API_KEY=bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
|
||||
@@ -56,6 +56,9 @@ class Settings(BaseSettings):
|
||||
{"url": "http://localhost:8000", "description": "Local development server"},
|
||||
]
|
||||
|
||||
elasticsearch_inse_url: Optional[str] = None
|
||||
elasticsearch_inse_api_key: Optional[str] = None
|
||||
|
||||
|
||||
settings = Settings()
|
||||
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
import logging
|
||||
from typing import List, Set
|
||||
|
||||
import httpx
|
||||
|
||||
from inse.models.institution import Institution
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class InstitutionsSearchClient:
|
||||
def __init__(
|
||||
self,
|
||||
base_url: str,
|
||||
api_key: str,
|
||||
):
|
||||
self.base_url = base_url
|
||||
self.api_key = api_key
|
||||
self.headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"ApiKey {self.api_key}",
|
||||
}
|
||||
|
||||
async def get_institution_by_id(self, raw_institution_id: str) -> Institution:
|
||||
query = {
|
||||
"query": {
|
||||
"match": {
|
||||
"id": f"https://openalex.org/{raw_institution_id.upper()}",
|
||||
}
|
||||
},
|
||||
"size": 1,
|
||||
}
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.post(
|
||||
f"{self.base_url}/openalex-institutions/_search",
|
||||
json=query,
|
||||
headers=self.headers,
|
||||
)
|
||||
response.raise_for_status()
|
||||
hits = response.json().get("hits", {}).get("hits", [])
|
||||
if not hits:
|
||||
raise ValueError(
|
||||
f"Institution with ID '{raw_institution_id}' not found."
|
||||
)
|
||||
return Institution.from_dict(hits[0]["_source"])
|
||||
|
||||
async def get_institution_aliases_by_id(self, raw_institution_id: str) -> List[str]:
|
||||
"""Get a list of institution aliases for a given institution ID, including both display name alternatives and predefined aliases.
|
||||
|
||||
Args:
|
||||
raw_institution_id (str): The raw institution ID for which to retrieve aliases.
|
||||
|
||||
Returns:
|
||||
List[str]: A list of aliases for the given institution ID.
|
||||
"""
|
||||
institution = await self.get_institution_by_id(raw_institution_id)
|
||||
aliases = list(
|
||||
self.augment_aliases(set(institution.display_name_alternatives or []))
|
||||
| self.get_predefined_institution_aliases(raw_institution_id)
|
||||
)
|
||||
logger.debug(
|
||||
"Retrieved aliases for institution_id=%s: %s", raw_institution_id, aliases
|
||||
)
|
||||
return aliases
|
||||
|
||||
def get_predefined_institution_aliases(self, raw_institution_id: str) -> Set[str]:
|
||||
"""Get predefined aliases for a given institution ID.
|
||||
|
||||
Args:
|
||||
raw_institution_id (str): The raw institution ID for which to retrieve predefined aliases.
|
||||
|
||||
Returns:
|
||||
Set[str]: A set of predefined aliases for the given institution ID.
|
||||
"""
|
||||
raw_institution_id = raw_institution_id.upper()
|
||||
predefined_aliases = {
|
||||
"I62318514": [
|
||||
"universität duisburg-essen",
|
||||
"university of duisburg-essen",
|
||||
"universitaet duisburg-essen",
|
||||
"universität duisburg-essen",
|
||||
"universitat duisburg-essen",
|
||||
],
|
||||
}
|
||||
|
||||
return self.augment_aliases(set(predefined_aliases.get(raw_institution_id, [])))
|
||||
|
||||
def augment_aliases(self, aliases: Set[str]) -> Set[str]:
|
||||
"""Augment a set of aliases by applying the augment_alias function to each alias.
|
||||
|
||||
Args:
|
||||
aliases (Set[str]): A set of aliases to augment.
|
||||
|
||||
Returns:
|
||||
Set[str]: A set of augmented aliases.
|
||||
"""
|
||||
augmented_aliases = set()
|
||||
for alias in aliases:
|
||||
augmented_aliases.update(self.augment_alias(alias))
|
||||
return augmented_aliases
|
||||
|
||||
def augment_alias(self, alias: str) -> List[str]:
|
||||
"""Augment an alias by replacing German umlauts and ß with their alternative spellings.
|
||||
|
||||
Args:
|
||||
alias (str): The alias to augment.
|
||||
|
||||
Returns:
|
||||
List[str]: A list of augmented aliases.
|
||||
"""
|
||||
alias = alias.lower()
|
||||
aliases = [alias]
|
||||
aliases.append(
|
||||
alias.replace("ä", "ae")
|
||||
.replace("ö", "oe")
|
||||
.replace("ü", "ue")
|
||||
.replace("ß", "ss")
|
||||
)
|
||||
aliases.append(
|
||||
alias.replace("ae", "ä")
|
||||
.replace("oe", "ö")
|
||||
.replace("ue", "ü")
|
||||
.replace("ss", "ß")
|
||||
)
|
||||
aliases.append(
|
||||
alias.replace("ä", "a")
|
||||
.replace("ö", "o")
|
||||
.replace("ü", "u")
|
||||
.replace("ß", "s")
|
||||
)
|
||||
aliases.append(alias.replace("-", " "))
|
||||
return aliases
|
||||
@@ -3,9 +3,10 @@
|
||||
"""
|
||||
Business logic for OpenAlex institutions.
|
||||
"""
|
||||
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
from typing import Any
|
||||
from typing import Any, Optional
|
||||
|
||||
import httpx
|
||||
from fastapi import HTTPException
|
||||
@@ -15,9 +16,13 @@ from starlette.status import HTTP_502_BAD_GATEWAY
|
||||
|
||||
from inse.models.autocomplete_response import AutocompleteResponse
|
||||
from inse.models.autocomplete_response_meta import AutocompleteResponseMeta
|
||||
from inse.models.autocomplete_response_results_inner import AutocompleteResponseResultsInner
|
||||
from inse.models.autocomplete_response_results_inner import (
|
||||
AutocompleteResponseResultsInner,
|
||||
)
|
||||
from inse.models.institutions_list_response import InstitutionsListResponse
|
||||
from inse.models.institution import Institution
|
||||
from .search_client import OpenAlexInstitutionsClient
|
||||
from inse.institutions.institutions_search_client import InstitutionsSearchClient
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -33,6 +38,12 @@ _VALID_INSTITUTION_TYPES = {
|
||||
}
|
||||
|
||||
|
||||
async def get_institution_by_id(
|
||||
raw_institution_id: str, client: InstitutionsSearchClient
|
||||
) -> Institution:
|
||||
return await client.get_institution_by_id(raw_institution_id)
|
||||
|
||||
|
||||
async def list_institutions(
|
||||
*,
|
||||
search: str | None = None,
|
||||
@@ -85,7 +96,10 @@ async def list_institutions(
|
||||
|
||||
try:
|
||||
normalized_data = _normalize_institutions_response(data)
|
||||
return InstitutionsListResponse.from_dict(normalized_data) or InstitutionsListResponse()
|
||||
return (
|
||||
InstitutionsListResponse.from_dict(normalized_data)
|
||||
or InstitutionsListResponse()
|
||||
)
|
||||
except ValidationError as exc:
|
||||
logger.exception("OpenAlex institutions response could not be parsed.")
|
||||
raise HTTPException(
|
||||
@@ -114,10 +128,7 @@ async def autocomplete_institutions(
|
||||
sort="works_count:desc",
|
||||
per_page=limit,
|
||||
page=1,
|
||||
select=(
|
||||
"id,ror,display_name,country_code,type,works_count,"
|
||||
"cited_by_count,geo"
|
||||
),
|
||||
select=("id,ror,display_name,country_code,type,works_count,cited_by_count,geo"),
|
||||
client=client,
|
||||
)
|
||||
|
||||
@@ -165,7 +176,13 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]:
|
||||
|
||||
meta = normalized.get("meta")
|
||||
if isinstance(meta, dict):
|
||||
for field in ["count", "db_response_time_ms", "page", "per_page", "groups_count"]:
|
||||
for field in [
|
||||
"count",
|
||||
"db_response_time_ms",
|
||||
"page",
|
||||
"per_page",
|
||||
"groups_count",
|
||||
]:
|
||||
meta[field] = _int_or_none(meta.get(field))
|
||||
meta["next_cursor"] = _str_or_none(meta.get("next_cursor"))
|
||||
meta["cost_usd"] = _number_or_none(meta.get("cost_usd"))
|
||||
@@ -187,7 +204,10 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]:
|
||||
institution[field] = _str_or_none(institution.get(field))
|
||||
|
||||
institution_type = institution.get("type")
|
||||
if institution_type is not None and institution_type not in _VALID_INSTITUTION_TYPES:
|
||||
if (
|
||||
institution_type is not None
|
||||
and institution_type not in _VALID_INSTITUTION_TYPES
|
||||
):
|
||||
institution["type"] = None
|
||||
else:
|
||||
institution["type"] = _str_or_none(institution_type)
|
||||
@@ -202,7 +222,9 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]:
|
||||
institution["works_count"] = _int_or_none(institution.get("works_count"))
|
||||
institution["cited_by_count"] = _int_or_none(institution.get("cited_by_count"))
|
||||
institution["created_date"] = _date_str_or_none(institution.get("created_date"))
|
||||
institution["updated_date"] = _datetime_str_or_none(institution.get("updated_date"))
|
||||
institution["updated_date"] = _datetime_str_or_none(
|
||||
institution.get("updated_date")
|
||||
)
|
||||
|
||||
summary_stats = institution.get("summary_stats")
|
||||
if isinstance(summary_stats, dict):
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"""
|
||||
HTTP client for OpenAlex institutions.
|
||||
"""
|
||||
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
@@ -19,8 +20,14 @@ class OpenAlexInstitutionsClient:
|
||||
transport: httpx.AsyncBaseTransport | None = None,
|
||||
):
|
||||
self.base_url = (base_url or config.settings.openalex_api_base_url).rstrip("/")
|
||||
self.api_key = api_key if api_key is not None else config.settings.openalex_api_key
|
||||
self.timeout = timeout if timeout is not None else config.settings.openalex_api_timeout_seconds
|
||||
self.api_key = (
|
||||
api_key if api_key is not None else config.settings.openalex_api_key
|
||||
)
|
||||
self.timeout = (
|
||||
timeout
|
||||
if timeout is not None
|
||||
else config.settings.openalex_api_timeout_seconds
|
||||
)
|
||||
self.transport = transport
|
||||
|
||||
def list_institutions_params(
|
||||
|
||||
@@ -3,19 +3,58 @@
|
||||
"""
|
||||
REST API for OpenAlex institutions.
|
||||
"""
|
||||
|
||||
from functools import lru_cache
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi import Query
|
||||
from fastapi import APIRouter, Depends, status, Query
|
||||
|
||||
from inse.models.autocomplete_response import AutocompleteResponse
|
||||
from inse.models.institutions_list_response import InstitutionsListResponse
|
||||
from inse.tags import Tags
|
||||
from inse.models.institution import Institution
|
||||
from inse.config import get_settings
|
||||
from . import logic
|
||||
from inse.institutions.institutions_search_client import InstitutionsSearchClient
|
||||
|
||||
|
||||
router = APIRouter(prefix="/api/institutions", tags=[Tags.INSTITUTIONS])
|
||||
|
||||
@lru_cache
|
||||
def get_institutions_search_client() -> InstitutionsSearchClient:
|
||||
settings = get_settings()
|
||||
if not settings.elasticsearch_url:
|
||||
raise ValueError("Elasticsearch URL is missing in settings.")
|
||||
if not settings.elasticsearch_api_key:
|
||||
raise ValueError("Elasticsearch API key is missing in settings.")
|
||||
|
||||
return InstitutionsSearchClient(
|
||||
api_key=settings.elasticsearch_api_key,
|
||||
base_url=settings.elasticsearch_url,
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/{id}",
|
||||
summary="Returns a single institution by ID.",
|
||||
description="Returns a single institution by its OpenAlex ID.",
|
||||
operation_id="getInstitutionById",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
"description": "Successful Response",
|
||||
"model": Institution,
|
||||
},
|
||||
status.HTTP_404_NOT_FOUND: {"description": "Institution not found"},
|
||||
},
|
||||
)
|
||||
async def get_institution(
|
||||
id: str,
|
||||
client: Annotated[
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
) -> Institution:
|
||||
return await logic.get_institution_by_id(raw_institution_id=id, client=client)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/autocomplete",
|
||||
@@ -27,7 +66,10 @@ router = APIRouter(prefix="/api/institutions", tags=[Tags.INSTITUTIONS])
|
||||
async def autocomplete_institutions(
|
||||
query: Annotated[
|
||||
str,
|
||||
Query(description="Institution search text, for example 'Duisburg Essen'.", min_length=1),
|
||||
Query(
|
||||
description="Institution search text, for example 'Duisburg Essen'.",
|
||||
min_length=1,
|
||||
),
|
||||
],
|
||||
country_code: Annotated[
|
||||
str | None,
|
||||
@@ -64,7 +106,9 @@ async def list_institutions(
|
||||
] = None,
|
||||
filter: Annotated[
|
||||
str | None,
|
||||
Query(description="OpenAlex filter, for example 'country_code:DE,type:education'."),
|
||||
Query(
|
||||
description="OpenAlex filter, for example 'country_code:DE,type:education'."
|
||||
),
|
||||
] = None,
|
||||
sort: Annotated[
|
||||
str | None,
|
||||
@@ -88,7 +132,11 @@ async def list_institutions(
|
||||
] = None,
|
||||
sample: Annotated[
|
||||
int | None,
|
||||
Query(description="Random sample size. Cannot be combined with sort or page.", ge=1, le=10000),
|
||||
Query(
|
||||
description="Random sample size. Cannot be combined with sort or page.",
|
||||
ge=1,
|
||||
le=10000,
|
||||
),
|
||||
] = None,
|
||||
select: Annotated[
|
||||
str | None,
|
||||
|
||||
@@ -16,6 +16,7 @@ from inse.topics.service import router as topics_service_router
|
||||
from inse.works.service import router as works_service_router
|
||||
from inse.persons.service import router as persons_service_router
|
||||
from inse.funders.service import router as funders_service_router
|
||||
from inse.projects.router import router as projects_router
|
||||
|
||||
from . import config
|
||||
from .service import router as service_router
|
||||
@@ -43,6 +44,8 @@ app.include_router(funders_service_router)
|
||||
app.include_router(service_router)
|
||||
app.include_router(account_router)
|
||||
|
||||
app.include_router(projects_router)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=settings.allowed_origins,
|
||||
|
||||
@@ -0,0 +1,226 @@
|
||||
from datetime import datetime, date
|
||||
from typing import Annotated, Optional
|
||||
|
||||
from pydantic import BaseModel, BeforeValidator, ConfigDict, Field
|
||||
|
||||
|
||||
def parse_german_date(value: Optional[str]) -> Optional[date]:
|
||||
if value is None or isinstance(value, date):
|
||||
return value
|
||||
|
||||
return datetime.strptime(value, "%d.%m.%Y").date()
|
||||
|
||||
|
||||
class BundProject(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
extra="ignore",
|
||||
)
|
||||
|
||||
funding_code: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Förderkennzeichen",
|
||||
description="The funding code of the project",
|
||||
examples=["19F2266G"],
|
||||
)
|
||||
|
||||
department: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Ressort",
|
||||
description="The department of the project",
|
||||
examples=["BMDV"],
|
||||
)
|
||||
|
||||
department_fullname: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Ressort_fullname",
|
||||
description="The full name of the department of the project",
|
||||
examples=["Bundesministerium für Digitales und Verkehr"],
|
||||
)
|
||||
|
||||
referat: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Referat",
|
||||
description="The referat of the project",
|
||||
examples=["DP20"],
|
||||
)
|
||||
|
||||
project_sponsor: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Projektträger",
|
||||
description="The project sponsor of the project",
|
||||
examples=["PT-TÜV"],
|
||||
)
|
||||
|
||||
project_sponsor_fullname: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Projektträger_fullname",
|
||||
description="The full name of the project sponsor of the project",
|
||||
examples=["Projektträger TÜV Rheinland"],
|
||||
)
|
||||
|
||||
work_unit: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Arb.-Einh.",
|
||||
description="The work unit of the project",
|
||||
examples=["mFUND"],
|
||||
)
|
||||
|
||||
recipient: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Zuwendungsempfänger",
|
||||
description="The recipient of the project",
|
||||
examples=["Universität Duisburg-Essen"],
|
||||
)
|
||||
|
||||
municipal_code: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Gemeindekennziffer",
|
||||
description="The municipal code of the project",
|
||||
examples=["05113000"],
|
||||
)
|
||||
|
||||
municipality: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Stadt/Gemeinde",
|
||||
description="The municipality of the project",
|
||||
examples=["Essen"],
|
||||
)
|
||||
|
||||
place: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Ort",
|
||||
description="The place of the project",
|
||||
examples=["Essen"],
|
||||
)
|
||||
|
||||
state: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Bundesland",
|
||||
description="The state of the project",
|
||||
examples=["Nordrhein-Westfalen"],
|
||||
)
|
||||
|
||||
country: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Staat",
|
||||
description="The country of the project",
|
||||
examples=["Deutschland"],
|
||||
)
|
||||
|
||||
implementing_agency: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Ausführende Stelle",
|
||||
description="The implementing agency of the project",
|
||||
examples=[
|
||||
"Universität Duisburg-Essen - Fachbereich Allgemeine Informatik - Lehrstuhl Networked Embedded Systems (NES)"
|
||||
],
|
||||
)
|
||||
|
||||
topic: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Thema",
|
||||
description="The topic of the project",
|
||||
examples=[
|
||||
"Verbundprojekt: Multimodaler Mobilitäts-Index - Moby_Dex -, Teilvorhaben: Universität Duisburg-Essen"
|
||||
],
|
||||
)
|
||||
|
||||
performance_plan_system: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Leistungsplansystematik",
|
||||
description="The performance plan system of the project",
|
||||
examples=["GA6011"],
|
||||
)
|
||||
|
||||
performance_plan_system_text: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Klartext Leistungsplansystematik",
|
||||
description="The performance plan system text of the project",
|
||||
examples=["Angewandte Forschung und Experimentelle Entwicklung"],
|
||||
)
|
||||
|
||||
funding_start: Annotated[
|
||||
Optional[date],
|
||||
Field(
|
||||
default=None,
|
||||
validation_alias="Förderbeginn",
|
||||
description="The funding start date of the project",
|
||||
examples=["01.09.2023"],
|
||||
),
|
||||
BeforeValidator(parse_german_date),
|
||||
]
|
||||
|
||||
funding_end: Annotated[
|
||||
Optional[date],
|
||||
Field(
|
||||
default=None,
|
||||
validation_alias="Förderende",
|
||||
description="The funding end date of the project",
|
||||
examples=["31.08.2026"],
|
||||
),
|
||||
BeforeValidator(parse_german_date),
|
||||
]
|
||||
|
||||
grant_amount: Optional[float] = Field(
|
||||
default=None,
|
||||
validation_alias="Fördersumme",
|
||||
description="The grant amount of the project",
|
||||
examples=[367651.00],
|
||||
)
|
||||
|
||||
funding_profile: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Förderprofil",
|
||||
description="The funding profile of the project",
|
||||
examples=["Technologie- und Innovationsförderung"],
|
||||
)
|
||||
|
||||
joint_project: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Verbundprojekt",
|
||||
description="Whether the project is a joint project",
|
||||
examples=["Moby_Dex"],
|
||||
)
|
||||
|
||||
funding_type: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Förderart",
|
||||
description="The funding type of the project",
|
||||
examples=["PDIR"],
|
||||
)
|
||||
|
||||
publication_date: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Publikationsdatum",
|
||||
description="The publication date of the project",
|
||||
examples=["2023"],
|
||||
)
|
||||
|
||||
unix_timestamp: Optional[int] = Field(
|
||||
default=None,
|
||||
validation_alias="Unix-Timestamp",
|
||||
description="The unix timestamp of the project",
|
||||
examples=[1737411518],
|
||||
)
|
||||
|
||||
date: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="datum",
|
||||
description="The date of the project",
|
||||
examples=["20.01.2025"],
|
||||
)
|
||||
|
||||
new: Optional[bool] = Field(
|
||||
default=None,
|
||||
validation_alias="neu",
|
||||
description="Whether the project is new",
|
||||
examples=[False],
|
||||
)
|
||||
|
||||
duration: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="Laufzeit",
|
||||
description="The duration of the project",
|
||||
examples=["von 01.09.2023 bis 31.08.2026"],
|
||||
)
|
||||
@@ -0,0 +1,94 @@
|
||||
from datetime import date
|
||||
from typing import Optional, Set
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class DfgProject(BaseModel):
|
||||
id: str = Field(description="The ID of the DFG project")
|
||||
link: str = Field(description="The link to the DFG project")
|
||||
title: str = Field(description="The title of the DFG project")
|
||||
description: str = Field(description="The description of the DFG project")
|
||||
|
||||
project_identifier: str = Field(
|
||||
description="The project identifier of the DFG project"
|
||||
)
|
||||
|
||||
funding_start_date: str = Field(
|
||||
description="The funding start date of the DFG project"
|
||||
)
|
||||
funding_end_date: str = Field(description="The funding end date of the DFG project")
|
||||
|
||||
associated_persons: list[str] = Field(
|
||||
description="The associated persons of the DFG project"
|
||||
)
|
||||
|
||||
institutions: list[str] = Field(
|
||||
description="The institutions associated with the DFG project"
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def from_elastic_hit(cls, hit: dict):
|
||||
source = hit["_source"]
|
||||
|
||||
associated_persons: Set[str] = set()
|
||||
institutions: Set[str] = set()
|
||||
|
||||
# persons
|
||||
|
||||
if "Antragsteller" in source:
|
||||
associated_persons.update(source["Antragsteller"].split(";"))
|
||||
|
||||
if "Antragstellerin" in source:
|
||||
associated_persons.add(source["Antragstellerin"])
|
||||
|
||||
if "Sprecher" in source:
|
||||
associated_persons.add(source["Sprecher"])
|
||||
|
||||
if "Sprecherin" in source:
|
||||
associated_persons.add(source["Sprecherin"])
|
||||
|
||||
if "Leiter" in source:
|
||||
associated_persons.add(source["Leiter"])
|
||||
|
||||
if "Leiterin" in source:
|
||||
associated_persons.add(source["Leiterin"])
|
||||
|
||||
if "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler" in source:
|
||||
associated_persons.update(
|
||||
source[
|
||||
"beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler"
|
||||
].split(";")
|
||||
)
|
||||
|
||||
if "Beteiligte Personen" in source:
|
||||
associated_persons.update(source["Beteiligte Personen"].split(";"))
|
||||
|
||||
if "Teilprojektleiter" in source:
|
||||
associated_persons.update(source["Teilprojektleiter"].split(";"))
|
||||
|
||||
# institutions
|
||||
|
||||
if "Antragstellende Institution" in source:
|
||||
institutions.add(source["Antragstellende Institution"])
|
||||
|
||||
if "Mitantragstellende Institution" in source:
|
||||
institutions.add(source["Mitantragstellende Institution"])
|
||||
|
||||
if "Beteiligte Institution" in source:
|
||||
institutions.add(source["Beteiligte Institution"])
|
||||
|
||||
if "Beteiligte Hochschule" in source:
|
||||
institutions.add(source["Beteiligte Hochschule"])
|
||||
|
||||
return cls(
|
||||
id=hit["_id"],
|
||||
link=source["link"],
|
||||
title=source["title"],
|
||||
description=source["description"],
|
||||
project_identifier=source["Projektkennzeichen"],
|
||||
funding_start_date=source["funding_start"],
|
||||
funding_end_date=source["funding_end"],
|
||||
associated_persons=list(associated_persons),
|
||||
institutions=list(institutions),
|
||||
)
|
||||
@@ -0,0 +1,192 @@
|
||||
from typing import List, Optional
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class DisplayCodeSplittedNested(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
single_display_code: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="singleDisplayCode",
|
||||
description="A solitary segment or specific component broken out from the main display code.",
|
||||
)
|
||||
|
||||
|
||||
class CategoryNested(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
category: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The descriptive classification title or taxonomy name for the project.",
|
||||
)
|
||||
code: Optional[str] = Field(
|
||||
default=None, description="The system code representing the specific category."
|
||||
)
|
||||
display_code: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="displayCode",
|
||||
description="The alphanumeric code formatted for user interface display purposes.",
|
||||
)
|
||||
# REFINED: Mapped to List[str] because the real data provides an array of strings
|
||||
display_code_splitted: List[str] = Field(
|
||||
default_factory=list,
|
||||
validation_alias="displayCode_splitted",
|
||||
description="A tokenized hierarchy breakdown of the display code represented as an array of strings.",
|
||||
)
|
||||
display_code_splitted_nested: List[DisplayCodeSplittedNested] = Field(
|
||||
default_factory=list,
|
||||
validation_alias="displayCode_splitted_nested",
|
||||
description="Granular, nested breakdowns of the split parts of the display code.",
|
||||
)
|
||||
|
||||
|
||||
class KeywordNested(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
keyword: Optional[str] = Field(
|
||||
default=None,
|
||||
description="An individual standalone keyword or tag used for granular search index filtering.",
|
||||
)
|
||||
|
||||
|
||||
class OrganizationNested(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
ec_contribution: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="ecContribution",
|
||||
description="The gross European Commission financial contribution allocated to this specific participant organization.",
|
||||
)
|
||||
id: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The unique identifier or Participant Identification Code (PIC) of the organization.",
|
||||
)
|
||||
name: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The full legal name of the participating organization or institution.",
|
||||
)
|
||||
net_ec_contribution: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="netEcContribution",
|
||||
description="The net European Commission financial funding provided to the organization after adjustments.",
|
||||
)
|
||||
total_cost: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="totalCost",
|
||||
description="The overall individual budget or total cost declared by this organization for its share of work.",
|
||||
)
|
||||
organization_type: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="type",
|
||||
description="The legal entity type or role of the organization (e.g., coordinator, participant).",
|
||||
)
|
||||
|
||||
|
||||
class ProgrammeNested(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
code: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The structural code identifying the framework or specific funding sub-programme.",
|
||||
)
|
||||
id: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The unique identifier of the funding program within the registry.",
|
||||
)
|
||||
programme: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The official title or description of the EU funding program.",
|
||||
)
|
||||
|
||||
|
||||
class EuProject(BaseModel):
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
acronym: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The official, short acronym chosen to identify the EU project.",
|
||||
)
|
||||
categories_nested: List[CategoryNested] = Field(
|
||||
default_factory=list,
|
||||
description="Structured lists of classification categories and taxonomy mappings assigned to the project.",
|
||||
)
|
||||
doc_number: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The internal administrative document control number or record tracking identifier.",
|
||||
)
|
||||
doi: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The Digital Object Identifier (DOI) linked to the project's official metadata or primary publication.",
|
||||
)
|
||||
ec_max_contribution: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="ecMaxContribution",
|
||||
description="The maximum authorized limit for the European Commission's financial grant contribution to the project.",
|
||||
)
|
||||
end_date: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="endDate",
|
||||
description="The calendar date marking the official structural conclusion of the project execution timeline.",
|
||||
)
|
||||
funding_end: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The exact calendar termination year for the project's financial eligibility period.",
|
||||
)
|
||||
funding_start: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The exact calendar activation year from which project expenses can be billed against the grant.",
|
||||
)
|
||||
id: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The unique global record ID for the project document (typically the Grant Agreement Number).",
|
||||
)
|
||||
keywords: Optional[str] = Field(
|
||||
default=None,
|
||||
description="A general text string or comma-separated list of keywords applied to the project record.",
|
||||
)
|
||||
keywords_nested: List[KeywordNested] = Field(
|
||||
default_factory=list,
|
||||
description="Strictly tokenized and isolated keywords nested for targeted search engine aggregations.",
|
||||
)
|
||||
link: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The web URL linking directly to the project's public profile page on CORDIS or an equivalent registry.",
|
||||
)
|
||||
objective: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The complete, detailed abstract outlining the goals, methodology, and expected impact of the project.",
|
||||
)
|
||||
organization_nested: List[OrganizationNested] = Field(
|
||||
default_factory=list,
|
||||
description="The full roster of academic, public, or private organizations participating in the project consortium.",
|
||||
)
|
||||
programme_nested: List[ProgrammeNested] = Field(
|
||||
default_factory=list,
|
||||
description="The nested historical line of EU funding frameworks and structural grants supporting this project.",
|
||||
)
|
||||
source: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The specific upstream system or database repository from which this document was fetched or synced.",
|
||||
)
|
||||
start_date: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="startDate",
|
||||
description="The official calendar date marking the active kickoff and formal initiation of the project.",
|
||||
)
|
||||
status: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The lifecycle phase of the project (e.g., 'CLOSED', 'ONGOING').",
|
||||
)
|
||||
teaser: Optional[str] = Field(
|
||||
default=None,
|
||||
description="A brief, high-level summary or editorial sentence written for general public consumption.",
|
||||
)
|
||||
title: Optional[str] = Field(
|
||||
default=None,
|
||||
description="The comprehensive, full legal title describing the scope of the project.",
|
||||
)
|
||||
total_cost: Optional[str] = Field(
|
||||
default=None,
|
||||
validation_alias="totalCost",
|
||||
description="The combined sum total budget estimated for the implementation of the entire project.",
|
||||
)
|
||||
@@ -0,0 +1,31 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from inse.models.bund_project import BundProject
|
||||
from inse.models.eu_project import EuProject
|
||||
|
||||
|
||||
class BundProjectPage(BaseModel):
|
||||
elements: List[BundProject] = Field(
|
||||
default_factory=list, description="The bund projects on this page."
|
||||
)
|
||||
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 bund projects.")
|
||||
|
||||
|
||||
class BundProjectList(BaseModel):
|
||||
elements: List[BundProject] = Field(
|
||||
default_factory=list, description="All bund projects."
|
||||
)
|
||||
total: int = Field(default=0, description="The total number of bund projects.")
|
||||
|
||||
|
||||
class EuProjectPage(BaseModel):
|
||||
elements: List[EuProject] = Field(
|
||||
default_factory=list, description="The EU projects on this page."
|
||||
)
|
||||
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 EU projects.")
|
||||
@@ -0,0 +1,297 @@
|
||||
import json
|
||||
import logging
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from inse.config import get_settings
|
||||
from inse.models.bund_project import BundProject
|
||||
from inse.projects.model import BundProjectPage, EuProjectPage
|
||||
from inse.models.eu_project import EuProject
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
|
||||
class ProjectsSearchClient:
|
||||
def __init__(
|
||||
self,
|
||||
base_url: str,
|
||||
index: str,
|
||||
api_key: str,
|
||||
):
|
||||
self.base_url = base_url
|
||||
self.index = index
|
||||
self.api_key = api_key
|
||||
self.headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"ApiKey {self.api_key}",
|
||||
}
|
||||
|
||||
async def make_search_request(self, query: dict) -> dict:
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.post(
|
||||
f"{self.base_url}/{self.index}/_search",
|
||||
json=query,
|
||||
headers=self.headers,
|
||||
)
|
||||
|
||||
try:
|
||||
response.raise_for_status()
|
||||
except httpx.HTTPStatusError as e:
|
||||
logger.exception(
|
||||
f"HTTP error occurred: {e.response.status_code} - {e.response.text}"
|
||||
)
|
||||
raise
|
||||
|
||||
return response.json()
|
||||
|
||||
|
||||
class BundProjectsSearchClient(ProjectsSearchClient):
|
||||
def __init__(self):
|
||||
if not settings.elasticsearch_inse_url:
|
||||
raise ValueError("Elasticsearch INSE URL is missing in settings.")
|
||||
if not settings.elasticsearch_inse_api_key:
|
||||
raise ValueError("Elasticsearch INSE API key is missing in settings.")
|
||||
super().__init__(
|
||||
base_url=settings.elasticsearch_inse_url,
|
||||
index="projects_bund",
|
||||
api_key=settings.elasticsearch_inse_api_key,
|
||||
)
|
||||
|
||||
def bund_projects_query(
|
||||
self,
|
||||
page: int,
|
||||
size: int,
|
||||
id: Optional[str] = None,
|
||||
institution_names: List[str] = [],
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> dict:
|
||||
from_ = (page - 1) * size
|
||||
query = {
|
||||
"size": size,
|
||||
"from": from_,
|
||||
"query": {
|
||||
"match_all": {},
|
||||
},
|
||||
}
|
||||
if id:
|
||||
query["query"] = {"match": {"id": id}}
|
||||
|
||||
if len(institution_names) > 0:
|
||||
query["query"] = {
|
||||
"bool": {
|
||||
"should": [
|
||||
{
|
||||
"match": {
|
||||
"Zuwendungsempfänger": {
|
||||
"query": name,
|
||||
"operator": "and",
|
||||
}
|
||||
}
|
||||
}
|
||||
for name in institution_names
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
}
|
||||
|
||||
sort_by = sort_by.strip()
|
||||
if sort_by == "topic":
|
||||
sort_by = "Thema.keyword"
|
||||
elif sort_by == "department":
|
||||
sort_by = "Ressort_fullname.keyword"
|
||||
elif sort_by == "grant_amount":
|
||||
sort_by = "Fördersumme"
|
||||
|
||||
sort_direction = sort_direction.strip().lower()
|
||||
if sort_direction not in ["asc", "desc"]:
|
||||
sort_direction = "asc"
|
||||
|
||||
query["sort"] = [{f"{sort_by}": {"order": sort_direction}}]
|
||||
|
||||
query_str = json.dumps(query, indent=2)
|
||||
logger.debug(f"Constructed query: {query_str}")
|
||||
return query
|
||||
|
||||
def response_to_bund_project_page(
|
||||
self, response: dict, page: int, size: int
|
||||
) -> BundProjectPage:
|
||||
hits_block = response.get("hits", {})
|
||||
total_hits = hits_block.get("total", {}).get("value", 0)
|
||||
elements = [
|
||||
BundProject.model_validate(hit["_source"])
|
||||
for hit in hits_block.get("hits", [])
|
||||
]
|
||||
return BundProjectPage(
|
||||
elements=elements, total=total_hits, page=page, size=size
|
||||
)
|
||||
|
||||
async def search_bund_projects(
|
||||
self,
|
||||
page: int,
|
||||
size: int,
|
||||
id: Optional[str] = None,
|
||||
institution_names: List[str] = [],
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> BundProjectPage:
|
||||
query = self.bund_projects_query(
|
||||
page, size, id, institution_names, sort_by, sort_direction
|
||||
)
|
||||
response = await self.make_search_request(query)
|
||||
return self.response_to_bund_project_page(response, page, size)
|
||||
|
||||
async def get_bund_projects_by_institution_name(
|
||||
self,
|
||||
institution_names: List[str],
|
||||
page: int,
|
||||
size: int,
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> BundProjectPage:
|
||||
query = self.bund_projects_query(
|
||||
page,
|
||||
size,
|
||||
institution_names=institution_names,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
response = await self.make_search_request(query)
|
||||
return self.response_to_bund_project_page(response, page, size)
|
||||
|
||||
|
||||
class EuProjectsSearchClient(ProjectsSearchClient):
|
||||
def __init__(self):
|
||||
if not settings.elasticsearch_inse_url:
|
||||
raise ValueError("Elasticsearch INSE URL is missing in settings.")
|
||||
if not settings.elasticsearch_inse_api_key:
|
||||
raise ValueError("Elasticsearch INSE API key is missing in settings.")
|
||||
super().__init__(
|
||||
base_url=settings.elasticsearch_inse_url,
|
||||
index="projects_eu_all",
|
||||
api_key=settings.elasticsearch_inse_api_key,
|
||||
)
|
||||
|
||||
def eu_projects_query(
|
||||
self,
|
||||
page: int,
|
||||
size: int,
|
||||
id: Optional[str] = None,
|
||||
institution_names: List[str] = [],
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> dict:
|
||||
from_ = (page - 1) * size
|
||||
query: Dict[str, Any] = {"size": size, "from": from_, "query": {}}
|
||||
|
||||
must_clauses: List[Dict[str, Any]] = []
|
||||
if id:
|
||||
must_clauses.append({"match": {"id": id}})
|
||||
|
||||
if institution_names:
|
||||
must_clauses.append(
|
||||
{
|
||||
"nested": {
|
||||
"path": "organization_nested",
|
||||
"query": {
|
||||
"bool": {
|
||||
"should": [
|
||||
{
|
||||
"match": {
|
||||
"organization_nested.name": {
|
||||
"query": name,
|
||||
"operator": "and",
|
||||
}
|
||||
}
|
||||
}
|
||||
for name in institution_names
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
if must_clauses:
|
||||
query["query"] = {"bool": {"must": must_clauses}}
|
||||
else:
|
||||
query["query"] = {"match_all": {}}
|
||||
|
||||
sort_by = sort_by.strip().lower()
|
||||
sort_direction = sort_direction.strip().lower()
|
||||
if sort_direction not in ["asc", "desc"]:
|
||||
sort_direction = "asc"
|
||||
|
||||
sort_config: Dict[str, Any] = {}
|
||||
|
||||
if sort_by == "topic":
|
||||
sort_config = {"title.keyword": {"order": sort_direction}}
|
||||
|
||||
elif sort_by == "grant_amount":
|
||||
sort_config = {"totalCost.keyword": {"order": sort_direction}}
|
||||
|
||||
elif sort_by == "department":
|
||||
sort_config = {
|
||||
"programme_nested.programme.keyword": {
|
||||
"order": sort_direction,
|
||||
"nested": {"path": "programme_nested"},
|
||||
}
|
||||
}
|
||||
else:
|
||||
sort_config = {"id.keyword": {"order": sort_direction}}
|
||||
|
||||
query["sort"] = [sort_config]
|
||||
|
||||
query_str = json.dumps(query, indent=2)
|
||||
logger.debug(f"Constructed query: {query_str}")
|
||||
|
||||
return query
|
||||
|
||||
def response_to_eu_project_page(
|
||||
self, response: dict, page: int, size: int
|
||||
) -> EuProjectPage:
|
||||
hits_block = response.get("hits", {})
|
||||
total_hits = hits_block.get("total", {}).get("value", 0)
|
||||
elements = [
|
||||
EuProject.model_validate(hit["_source"])
|
||||
for hit in hits_block.get("hits", [])
|
||||
]
|
||||
return EuProjectPage(elements=elements, total=total_hits, page=page, size=size)
|
||||
|
||||
async def search_eu_projects(
|
||||
self,
|
||||
page: int,
|
||||
size: int,
|
||||
id: Optional[str] = None,
|
||||
institution_names: List[str] = [],
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> EuProjectPage:
|
||||
query = self.eu_projects_query(
|
||||
page, size, id, institution_names, sort_by, sort_direction
|
||||
)
|
||||
response = await self.make_search_request(query)
|
||||
return self.response_to_eu_project_page(response, page, size)
|
||||
|
||||
async def get_eu_projects_by_institution_name(
|
||||
self,
|
||||
institution_names: List[str],
|
||||
page: int,
|
||||
size: int,
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> EuProjectPage:
|
||||
query = self.eu_projects_query(
|
||||
page,
|
||||
size,
|
||||
institution_names=institution_names,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
response = await self.make_search_request(query)
|
||||
return self.response_to_eu_project_page(response, page, size)
|
||||
@@ -0,0 +1,135 @@
|
||||
from functools import lru_cache
|
||||
import logging
|
||||
from typing import Annotated
|
||||
|
||||
from fastapi import APIRouter, Depends, Path, Query, status
|
||||
|
||||
from inse.models.bund_project import BundProject
|
||||
from inse.projects.model import BundProjectPage, EuProjectPage
|
||||
from inse.tags import Tags
|
||||
from inse.projects import service as projects_service
|
||||
from inse.projects.projects_search_client import (
|
||||
BundProjectsSearchClient,
|
||||
EuProjectsSearchClient,
|
||||
)
|
||||
from inse.institutions.institutions_search_client import (
|
||||
InstitutionsSearchClient,
|
||||
)
|
||||
from inse.institutions.service import get_institutions_search_client
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
router = APIRouter(prefix="/api/projects", tags=[Tags.PROJECTS])
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_bund_search_client() -> BundProjectsSearchClient:
|
||||
return BundProjectsSearchClient()
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_eu_search_client() -> EuProjectsSearchClient:
|
||||
return EuProjectsSearchClient()
|
||||
|
||||
|
||||
@router.get(
|
||||
"/bund/search",
|
||||
summary="Get bund projects.",
|
||||
description="Returns a page of bund projects based on the provided pagination parameters and optional institution filter.",
|
||||
operation_id="getBundProjects",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
"description": "Successful Response",
|
||||
"model": BundProjectPage,
|
||||
},
|
||||
status.HTTP_404_NOT_FOUND: {"description": "Institution not found"},
|
||||
},
|
||||
response_model_by_alias=False,
|
||||
)
|
||||
async def get_bund_projects(
|
||||
bund_search_client: Annotated[
|
||||
BundProjectsSearchClient, Depends(get_bund_search_client)
|
||||
],
|
||||
institutions_search_client: Annotated[
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
institution_id: Annotated[
|
||||
str, Query(description="The institution ID to filter by.")
|
||||
],
|
||||
page: Annotated[int, Query(description="The page number.", ge=1)] = 1,
|
||||
size: Annotated[int, Query(description="The page size.", ge=1)] = 20,
|
||||
sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic",
|
||||
sort_direction: Annotated[
|
||||
str, Query(description="The sort direction (asc or desc).")
|
||||
] = "asc",
|
||||
) -> BundProjectPage:
|
||||
return await projects_service.get_bund_projects_by_institution_id(
|
||||
bund_search_client=bund_search_client,
|
||||
institutions_search_client=institutions_search_client,
|
||||
institution_id=institution_id,
|
||||
page=page,
|
||||
size=size,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/eu/search",
|
||||
summary="Get EU projects.",
|
||||
description="Returns a page of EU projects based on the provided pagination parameters and optional institution filter.",
|
||||
operation_id="getEuProjects",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
"description": "Successful Response",
|
||||
"model": EuProjectPage,
|
||||
},
|
||||
status.HTTP_404_NOT_FOUND: {"description": "Institution not found"},
|
||||
},
|
||||
response_model_by_alias=False,
|
||||
)
|
||||
async def get_eu_projects(
|
||||
eu_search_client: Annotated[EuProjectsSearchClient, Depends(get_eu_search_client)],
|
||||
institutions_search_client: Annotated[
|
||||
InstitutionsSearchClient, Depends(get_institutions_search_client)
|
||||
],
|
||||
institution_id: Annotated[
|
||||
str, Query(description="The institution ID to filter by.")
|
||||
],
|
||||
page: Annotated[int, Query(description="The page number.", ge=1)] = 1,
|
||||
size: Annotated[int, Query(description="The page size.", ge=1)] = 20,
|
||||
sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic",
|
||||
sort_direction: Annotated[
|
||||
str, Query(description="The sort direction (asc or desc).")
|
||||
] = "asc",
|
||||
) -> EuProjectPage:
|
||||
return await projects_service.get_eu_projects_by_institution_id(
|
||||
eu_search_client=eu_search_client,
|
||||
institutions_search_client=institutions_search_client,
|
||||
institution_id=institution_id,
|
||||
page=page,
|
||||
size=size,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
|
||||
|
||||
@router.get(
|
||||
"/bund/{bund_project_id}",
|
||||
summary="Get a bund project by its project ID.",
|
||||
description="Returns a bund project based on its project ID.",
|
||||
operation_id="getBundProjectById",
|
||||
responses={
|
||||
status.HTTP_200_OK: {
|
||||
"description": "Successful Response",
|
||||
"model": BundProject,
|
||||
},
|
||||
status.HTTP_404_NOT_FOUND: {"description": "Bund project not found"},
|
||||
},
|
||||
)
|
||||
async def get_bund_project_by_id(
|
||||
bund_project_id: Annotated[
|
||||
str, Path(description="The ID of the bund project to retrieve.")
|
||||
],
|
||||
):
|
||||
return {"bund_project_id": bund_project_id}
|
||||
@@ -0,0 +1,95 @@
|
||||
import logging
|
||||
from typing import List
|
||||
|
||||
from inse.projects.projects_search_client import (
|
||||
BundProjectsSearchClient,
|
||||
EuProjectsSearchClient,
|
||||
)
|
||||
from inse.projects.model import BundProjectPage, EuProjectPage
|
||||
from inse.institutions.institutions_search_client import (
|
||||
InstitutionsSearchClient,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def get_bund_projects_by_institution_id(
|
||||
bund_search_client: BundProjectsSearchClient,
|
||||
institutions_search_client: InstitutionsSearchClient,
|
||||
institution_id: str,
|
||||
page: int,
|
||||
size: int,
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> BundProjectPage:
|
||||
logger.info(
|
||||
f"Fetching bund projects for institution_id={institution_id}, page={page}, size={size}"
|
||||
)
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_id(institution_id)
|
||||
)
|
||||
logger.debug(
|
||||
f"Found institution aliases for institution_id={institution_id}: {institution_aliases}"
|
||||
)
|
||||
response = await bund_search_client.search_bund_projects(
|
||||
page=page,
|
||||
size=size,
|
||||
institution_names=institution_aliases,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
logger.debug(f"get_bund_projects_by_institution_id response: {response}")
|
||||
return response
|
||||
|
||||
|
||||
async def get_eu_projects_by_institution_id(
|
||||
eu_search_client: EuProjectsSearchClient,
|
||||
institutions_search_client: InstitutionsSearchClient,
|
||||
institution_id: str,
|
||||
page: int,
|
||||
size: int,
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> EuProjectPage:
|
||||
logger.info(
|
||||
f"Fetching EU projects for institution_id={institution_id}, page={page}, size={size}"
|
||||
)
|
||||
institution_aliases = (
|
||||
await institutions_search_client.get_institution_aliases_by_id(institution_id)
|
||||
)
|
||||
logger.debug(
|
||||
f"Found institution aliases for institution_id={institution_id}: {institution_aliases}"
|
||||
)
|
||||
response = await eu_search_client.search_eu_projects(
|
||||
page=page,
|
||||
size=size,
|
||||
institution_names=institution_aliases,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
logger.debug(f"get_eu_projects_by_institution_id response: {response}")
|
||||
return response
|
||||
|
||||
|
||||
async def get_bund_projects_by_institution_name(
|
||||
bund_search_client: BundProjectsSearchClient,
|
||||
page: int,
|
||||
size: int,
|
||||
institution_names: List[str] = [],
|
||||
sort_by: str = "topic",
|
||||
sort_direction: str = "asc",
|
||||
) -> BundProjectPage:
|
||||
logger.info(
|
||||
f"Fetching bund projects for institution_names={institution_names}, page={page}, size={size}"
|
||||
)
|
||||
response = await bund_search_client.search_bund_projects(
|
||||
page=page,
|
||||
size=size,
|
||||
institution_names=institution_names,
|
||||
sort_by=sort_by,
|
||||
sort_direction=sort_direction,
|
||||
)
|
||||
|
||||
logger.debug(f"get_bund_projects_by_institution_name response: {response}")
|
||||
|
||||
return response
|
||||
@@ -7,3 +7,4 @@ class Tags(Enum):
|
||||
INSTITUTIONS = "Institutions"
|
||||
TOPICS = "Topics"
|
||||
WORKS = "Works"
|
||||
PROJECTS = "Projects"
|
||||
|
||||
+253
-2
@@ -6,12 +6,236 @@ Content-Type: application/json
|
||||
"query": {
|
||||
"query_string": {
|
||||
"default_field": "name",
|
||||
"query": "Tobias Janelt"
|
||||
"query": "Marcus Handte"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
###
|
||||
GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search
|
||||
Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
|
||||
Content-Type: application/json
|
||||
|
||||
# {
|
||||
# "size": 100,
|
||||
# "query": {
|
||||
# "multi_match": {
|
||||
# "query": "Rizk",
|
||||
# "fields": [
|
||||
# "Antragsteller",
|
||||
# "Antragstellerin",
|
||||
# "Sprecher",
|
||||
# "Sprecherin",
|
||||
# "Leiter",
|
||||
# "Leiterin",
|
||||
# "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler",
|
||||
# "Teilprojektleiter"
|
||||
# ]
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
# {
|
||||
# "size": 100,
|
||||
# "query": {
|
||||
# "multi_match": {
|
||||
# "query": "Duisburg-Essen",
|
||||
# "fields": [
|
||||
# "Antragstellende Institution",
|
||||
# "Mitantragstellende Institution",
|
||||
# "Beteiligte Institution"
|
||||
# ]
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
# "aggs": {
|
||||
|
||||
# "antragstellende": {
|
||||
|
||||
# "terms": {
|
||||
|
||||
# "field": "Antragstellende Institution.keyword",
|
||||
|
||||
# "size": 100
|
||||
|
||||
# }
|
||||
|
||||
# },
|
||||
|
||||
# "mitantragstellende": {
|
||||
|
||||
# "terms": {
|
||||
|
||||
# "field": "Mitantragstellende Institution.keyword",
|
||||
|
||||
# "size": 100
|
||||
|
||||
# }
|
||||
|
||||
# },
|
||||
|
||||
# "beteiligte": {
|
||||
|
||||
# "terms": {
|
||||
|
||||
# "field": "Beteiligte Institution.keyword",
|
||||
|
||||
# "size": 100
|
||||
|
||||
# }
|
||||
|
||||
# },
|
||||
|
||||
# "partner": {
|
||||
|
||||
# "terms": {
|
||||
|
||||
# "field": "Partnerorganisation.keyword",
|
||||
|
||||
# "size": 100
|
||||
|
||||
# }
|
||||
|
||||
# }
|
||||
|
||||
# }
|
||||
|
||||
# }
|
||||
|
||||
|
||||
###
|
||||
GET https://inse.nes.uni-due.de/elastic/projects_bund/_mapping
|
||||
Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
|
||||
Content-Type: application/json
|
||||
|
||||
###
|
||||
GET https://inse.nes.uni-due.de/elastic/projects_bund/_search
|
||||
Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
||||
"size": 10,
|
||||
"from": 1000,
|
||||
"query": {
|
||||
"match": {
|
||||
"Zuwendungsempf\u00e4nger": {
|
||||
"query": "Universit\u00e4t Duisburg-Essen",
|
||||
"operator": "and"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sort": [
|
||||
{
|
||||
"Thema.keyword": {
|
||||
"order": "asc"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
#{'size': 10, 'from': 0, 'query': {'match': {'Zuwendungsempfänger': {'query': 'Universität Duisburg-Essen', 'operator': 'and'}}}, 'sort': [{'Thema': {'order': 'asc'}}]}
|
||||
|
||||
# {
|
||||
# "size": 1000,
|
||||
# "query": {
|
||||
# "match": {
|
||||
# "Zuwendungsempfänger": {
|
||||
# "query": "Universität Duisburg-Essen",
|
||||
# "operator": "and"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
###
|
||||
GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_mapping
|
||||
Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
|
||||
Content-Type: application/json
|
||||
|
||||
|
||||
###
|
||||
GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_search
|
||||
Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw==
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
|
||||
"size": 0,
|
||||
|
||||
"query": {
|
||||
|
||||
"nested": {
|
||||
|
||||
"path": "organization_nested",
|
||||
|
||||
"query": {
|
||||
|
||||
"match": {
|
||||
|
||||
"organization_nested.name": "Dortmund"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"aggs": {
|
||||
|
||||
"organizations": {
|
||||
|
||||
"nested": {
|
||||
|
||||
"path": "organization_nested"
|
||||
|
||||
},
|
||||
|
||||
"aggs": {
|
||||
|
||||
"matching": {
|
||||
|
||||
"filter": {
|
||||
|
||||
"match": {
|
||||
|
||||
"organization_nested.name": "Dortmund"
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"aggs": {
|
||||
|
||||
"names": {
|
||||
|
||||
"terms": {
|
||||
|
||||
"field": "organization_nested.name.keyword",
|
||||
|
||||
"size": 100
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
###
|
||||
|
||||
GET https://inse.nes.uni-due.de/elastic/ude_organization_content_august_2025/_search
|
||||
@@ -36,9 +260,36 @@ Content-Type: application/json
|
||||
# "query": "Tobias Janelt"
|
||||
# }
|
||||
# }
|
||||
|
||||
# }
|
||||
|
||||
###
|
||||
|
||||
GET https://project.nes.uni-due.de/elastic/openalex-awards/_mapping
|
||||
Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ==
|
||||
Content-Type: application/json
|
||||
|
||||
###
|
||||
|
||||
GET https://project.nes.uni-due.de/elastic/openalex-awards/_search
|
||||
Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ==
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"size": 1000,
|
||||
"query": {
|
||||
"bool": {
|
||||
"must": [
|
||||
{
|
||||
"prefix": {
|
||||
"landing_page_url": "https://gepris.dfg.de/gepris/projekt/"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
###
|
||||
|
||||
GET https://project.nes.uni-due.de/elastic/openalex-authors/_search
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
{
|
||||
"openapi": "3.1.0",
|
||||
"info": {
|
||||
"title": "Innovation Search Engine API",
|
||||
"description": "API for the Innovation Search Engine (INSE) application.",
|
||||
"version": "0.1.0"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://localhost:8000",
|
||||
"description": "Local development server"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/api/person/network/{raw_user_id}": {
|
||||
"get": {
|
||||
"tags": ["Person Network"],
|
||||
"summary": "Get a person's collaboration network.",
|
||||
"description": "Returns a person's collaboration network based on their works and co-authors.",
|
||||
"operationId": "getCollaborationNetwork",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "raw_user_id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"description": "The raw user ID of the person.",
|
||||
"title": "Raw User Id"
|
||||
},
|
||||
"description": "The raw user ID of the person."
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Successful Response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CollaborationNetwork"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": { "description": "Person not found" },
|
||||
"422": {
|
||||
"description": "Validation Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/HTTPValidationError" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"CollaborationNetwork": {
|
||||
"properties": {
|
||||
"raw_person_id": {
|
||||
"type": "string",
|
||||
"title": "Raw Person ID",
|
||||
"description": "The raw person ID of the person whose collaboration network this is."
|
||||
},
|
||||
"nodes": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/CollaborationNetworkNode"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Collaboration Network Nodes",
|
||||
"description": "The nodes in the collaboration network."
|
||||
},
|
||||
"edges": {
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/CollaborationNetworkEdge"
|
||||
},
|
||||
"type": "array",
|
||||
"title": "Collaboration Network Edges",
|
||||
"description": "The edges in the collaboration network."
|
||||
},
|
||||
"works": {
|
||||
"items": { "$ref": "#/components/schemas/CollaborationWork" },
|
||||
"type": "array",
|
||||
"title": "Collaboration Works",
|
||||
"description": "The works that represent the collaborations in the collaboration network."
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["raw_person_id", "nodes", "edges", "works"],
|
||||
"title": "CollaborationNetwork"
|
||||
},
|
||||
"CollaborationNetworkEdge": {
|
||||
"properties": {
|
||||
"raw_source_person_id": {
|
||||
"type": "string",
|
||||
"title": "Source Raw Person ID",
|
||||
"description": "The raw person ID of the source person."
|
||||
},
|
||||
"raw_target_person_id": {
|
||||
"type": "string",
|
||||
"title": "Target Raw Person ID",
|
||||
"description": "The raw person ID of the target person."
|
||||
},
|
||||
"raw_work_ids": {
|
||||
"items": { "type": "string" },
|
||||
"type": "array",
|
||||
"title": "Work IDs",
|
||||
"description": "The list of work IDs that represent the collaborations between the two persons."
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"raw_source_person_id",
|
||||
"raw_target_person_id",
|
||||
"raw_work_ids"
|
||||
],
|
||||
"title": "CollaborationNetworkEdge"
|
||||
},
|
||||
"CollaborationNetworkNode": {
|
||||
"properties": {
|
||||
"raw_person_id": {
|
||||
"type": "string",
|
||||
"title": "Raw Person ID",
|
||||
"description": "The raw person ID of the person."
|
||||
},
|
||||
"display_name": {
|
||||
"type": "string",
|
||||
"title": "Display Name",
|
||||
"description": "The display name of the person."
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["raw_person_id", "display_name"],
|
||||
"title": "CollaborationNetworkNode"
|
||||
},
|
||||
"CollaborationWork": {
|
||||
"properties": {
|
||||
"raw_work_id": {
|
||||
"type": "string",
|
||||
"title": "Raw Work ID",
|
||||
"description": "The raw work ID of the work."
|
||||
},
|
||||
"display_title": {
|
||||
"type": "string",
|
||||
"title": "Display Title",
|
||||
"description": "The display title of the work."
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["raw_work_id", "display_title"],
|
||||
"title": "CollaborationWork"
|
||||
},
|
||||
"HTTPValidationError": {
|
||||
"properties": {
|
||||
"detail": {
|
||||
"items": { "$ref": "#/components/schemas/ValidationError" },
|
||||
"type": "array",
|
||||
"title": "Detail"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"title": "HTTPValidationError"
|
||||
},
|
||||
"ValidationError": {
|
||||
"properties": {
|
||||
"loc": {
|
||||
"items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] },
|
||||
"type": "array",
|
||||
"title": "Location"
|
||||
},
|
||||
"msg": { "type": "string", "title": "Message" },
|
||||
"type": { "type": "string", "title": "Error Type" }
|
||||
},
|
||||
"type": "object",
|
||||
"required": ["loc", "msg", "type"],
|
||||
"title": "ValidationError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,117 +1,120 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
README.md
|
||||
api.base.service.ts
|
||||
api.module.ts
|
||||
api/api.ts
|
||||
api/funding.service.ts
|
||||
api/funding.serviceInterface.ts
|
||||
api/inse-account-service.service.ts
|
||||
api/inse-account-service.serviceInterface.ts
|
||||
api/inse-service.service.ts
|
||||
api/inse-service.serviceInterface.ts
|
||||
api/iNSEAccountService.service.ts
|
||||
api/iNSEService.service.ts
|
||||
api/institutions.service.ts
|
||||
api/institutions.serviceInterface.ts
|
||||
api/items.service.ts
|
||||
api/items.serviceInterface.ts
|
||||
api/person-network.service.ts
|
||||
api/person-network.serviceInterface.ts
|
||||
api/personNetwork.service.ts
|
||||
api/persons.service.ts
|
||||
api/persons.serviceInterface.ts
|
||||
api/projects.service.ts
|
||||
api/topics.service.ts
|
||||
api/topics.serviceInterface.ts
|
||||
api/works.service.ts
|
||||
api/works.serviceInterface.ts
|
||||
configuration.ts
|
||||
encoder.ts
|
||||
git_push.sh
|
||||
index.ts
|
||||
model/access-grant.ts
|
||||
model/auth-account.ts
|
||||
model/auth-scope.ts
|
||||
model/author-affiliations-inner.ts
|
||||
model/author-counts-by-year-inner.ts
|
||||
model/author-ids.ts
|
||||
model/author-network-node.ts
|
||||
model/author-parsed-longest-name.ts
|
||||
model/author-position-count.ts
|
||||
model/author-summary-stats.ts
|
||||
model/accessGrant.ts
|
||||
model/authAccount.ts
|
||||
model/authScope.ts
|
||||
model/author.ts
|
||||
model/authors-filter-properties.ts
|
||||
model/authors-list-response.ts
|
||||
model/authorAffiliationsInner.ts
|
||||
model/authorCountsByYearInner.ts
|
||||
model/authorIds.ts
|
||||
model/authorNetworkNode.ts
|
||||
model/authorParsedLongestName.ts
|
||||
model/authorPositionCount.ts
|
||||
model/authorSummaryStats.ts
|
||||
model/authorsFilterProperties.ts
|
||||
model/authorsListResponse.ts
|
||||
model/authorship.ts
|
||||
model/autocomplete-response-meta.ts
|
||||
model/autocomplete-response-results-inner.ts
|
||||
model/autocomplete-response.ts
|
||||
model/autocompleteResponse.ts
|
||||
model/autocompleteResponseMeta.ts
|
||||
model/autocompleteResponseResultsInner.ts
|
||||
model/award.ts
|
||||
model/collaboration-network-edge.ts
|
||||
model/collaboration-network-node-type.ts
|
||||
model/collaboration-network.ts
|
||||
model/cost-usd.ts
|
||||
model/custom-author.ts
|
||||
model/custom-authors-list-response.ts
|
||||
model/dehydrated-author.ts
|
||||
model/dehydrated-funder.ts
|
||||
model/dehydrated-institution.ts
|
||||
model/dehydrated-source.ts
|
||||
model/filter-information.ts
|
||||
model/filter-properties.ts
|
||||
model/funder-by-author.ts
|
||||
model/funders-by-author-response.ts
|
||||
model/bundProject.ts
|
||||
model/bundProjectPage.ts
|
||||
model/categoryNested.ts
|
||||
model/collaborationNetwork.ts
|
||||
model/collaborationNetworkEdge.ts
|
||||
model/collaborationNetworkNodeType.ts
|
||||
model/costUsd.ts
|
||||
model/customAuthor.ts
|
||||
model/customAuthorsListResponse.ts
|
||||
model/dehydratedAuthor.ts
|
||||
model/dehydratedFunder.ts
|
||||
model/dehydratedInstitution.ts
|
||||
model/dehydratedSource.ts
|
||||
model/displayCodeSplittedNested.ts
|
||||
model/euProject.ts
|
||||
model/euProjectPage.ts
|
||||
model/filterInformation.ts
|
||||
model/filterProperties.ts
|
||||
model/funderByAuthor.ts
|
||||
model/fundersByAuthorResponse.ts
|
||||
model/fwci.ts
|
||||
model/group-by-result.ts
|
||||
model/http-validation-error.ts
|
||||
model/identity-grant.ts
|
||||
model/institution-geo.ts
|
||||
model/institution-ids.ts
|
||||
model/institution-information.ts
|
||||
model/institution-network-node.ts
|
||||
model/groupByResult.ts
|
||||
model/hTTPValidationError.ts
|
||||
model/identityGrant.ts
|
||||
model/institution.ts
|
||||
model/institutions-list-response.ts
|
||||
model/item-create.ts
|
||||
model/item-page.ts
|
||||
model/institutionGeo.ts
|
||||
model/institutionIds.ts
|
||||
model/institutionInformation.ts
|
||||
model/institutionNetworkNode.ts
|
||||
model/institutionsListResponse.ts
|
||||
model/item.ts
|
||||
model/itemCreate.ts
|
||||
model/itemPage.ts
|
||||
model/keywordNested.ts
|
||||
model/latitude.ts
|
||||
model/location.ts
|
||||
model/longitude.ts
|
||||
model/meta.ts
|
||||
model/model2-yr-mean-citedness.ts
|
||||
model/model2YrMeanCitedness.ts
|
||||
model/models.ts
|
||||
model/open-access.ts
|
||||
model/person-bio.ts
|
||||
model/publication-ids-by-author-position.ts
|
||||
model/publications-by-author-response.ts
|
||||
model/openAccess.ts
|
||||
model/organizationNested.ts
|
||||
model/personBio.ts
|
||||
model/programmeNested.ts
|
||||
model/publicationDetailByFunder.ts
|
||||
model/publicationIdsByAuthorPosition.ts
|
||||
model/publicationsByAuthorResponse.ts
|
||||
model/score.ts
|
||||
model/topic-count.ts
|
||||
model/topic-domain.ts
|
||||
model/topic-field.ts
|
||||
model/topic-ids.ts
|
||||
model/topic-subfield.ts
|
||||
model/topic.ts
|
||||
model/topics-by-time.ts
|
||||
model/topics-by-year.ts
|
||||
model/topics-list-response.ts
|
||||
model/validation-error-loc-inner.ts
|
||||
model/validation-error.ts
|
||||
model/topicCount.ts
|
||||
model/topicDomain.ts
|
||||
model/topicField.ts
|
||||
model/topicIds.ts
|
||||
model/topicSubfield.ts
|
||||
model/topicsByTime.ts
|
||||
model/topicsByYear.ts
|
||||
model/topicsListResponse.ts
|
||||
model/validationError.ts
|
||||
model/validationErrorLocInner.ts
|
||||
model/value.ts
|
||||
model/work-biblio.ts
|
||||
model/work-citation-normalized-percentile.ts
|
||||
model/work-cited-by-percentile-year.ts
|
||||
model/work-counts-by-year-inner.ts
|
||||
model/work-has-content.ts
|
||||
model/work-ids.ts
|
||||
model/work-keyword.ts
|
||||
model/work-mesh-inner.ts
|
||||
model/work-network-node.ts
|
||||
model/work-page.ts
|
||||
model/work-sustainable-development-goals-inner.ts
|
||||
model/work-topic-domain.ts
|
||||
model/work-topic-field.ts
|
||||
model/work-topic-information.ts
|
||||
model/work-topic-subfield.ts
|
||||
model/work-topic.ts
|
||||
model/work.ts
|
||||
model/works-filter-properties.ts
|
||||
model/works-list-response.ts
|
||||
model/workBiblio.ts
|
||||
model/workCitationNormalizedPercentile.ts
|
||||
model/workCitedByPercentileYear.ts
|
||||
model/workCountsByYearInner.ts
|
||||
model/workHasContent.ts
|
||||
model/workIds.ts
|
||||
model/workKeyword.ts
|
||||
model/workMeshInner.ts
|
||||
model/workNetworkNode.ts
|
||||
model/workPage.ts
|
||||
model/workSustainableDevelopmentGoalsInner.ts
|
||||
model/workTopic.ts
|
||||
model/workTopicDomain.ts
|
||||
model/workTopicField.ts
|
||||
model/workTopicInformation.ts
|
||||
model/workTopicSubfield.ts
|
||||
model/worksFilterProperties.ts
|
||||
model/worksListResponse.ts
|
||||
param.ts
|
||||
provide-api.ts
|
||||
variables.ts
|
||||
|
||||
@@ -46,10 +46,10 @@ npm link
|
||||
In your project:
|
||||
|
||||
```console
|
||||
npm link
|
||||
npm link
|
||||
```
|
||||
|
||||
**Note for Windows users:** The Angular CLI has troubles to use linked npm packages.
|
||||
__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
|
||||
Please refer to this issue <https://github.com/angular/angular-cli/issues/8284> for a solution / workaround.
|
||||
Published packages are not effected by this issue.
|
||||
|
||||
@@ -58,22 +58,22 @@ Published packages are not effected by this issue.
|
||||
In your Angular project:
|
||||
|
||||
```typescript
|
||||
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideApi(),
|
||||
],
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideApi()
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
**NOTE**
|
||||
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
|
||||
|
||||
```typescript
|
||||
import { ApiModule } from '';
|
||||
```
|
||||
@@ -86,11 +86,11 @@ import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideApi('http://localhost:9999'),
|
||||
],
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideApi('http://localhost:9999')
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
@@ -101,15 +101,15 @@ import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideApi({
|
||||
withCredentials: true,
|
||||
username: 'user',
|
||||
password: 'password',
|
||||
}),
|
||||
],
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideApi({
|
||||
withCredentials: true,
|
||||
username: 'user',
|
||||
password: 'password'
|
||||
})
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
@@ -120,22 +120,21 @@ import { provideHttpClient } from '@angular/common/http';
|
||||
import { provideApi, Configuration } from '';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
{
|
||||
provide: Configuration,
|
||||
useFactory: (authService: AuthService) =>
|
||||
new Configuration({
|
||||
basePath: 'http://localhost:9999',
|
||||
withCredentials: true,
|
||||
username: authService.getUsername(),
|
||||
password: authService.getPassword(),
|
||||
}),
|
||||
deps: [AuthService],
|
||||
multi: false,
|
||||
},
|
||||
],
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
{
|
||||
provide: Configuration,
|
||||
useFactory: (authService: AuthService) => new Configuration({
|
||||
basePath: 'http://localhost:9999',
|
||||
withCredentials: true,
|
||||
username: authService.getUsername(),
|
||||
password: authService.getPassword(),
|
||||
}),
|
||||
deps: [AuthService],
|
||||
multi: false
|
||||
}
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
@@ -152,12 +151,12 @@ import { HttpClientModule } from '@angular/common/http';
|
||||
import { environment } from '../environments/environment';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideUserApi(environment.basePath),
|
||||
provideAdminApi(environment.basePath),
|
||||
],
|
||||
providers: [
|
||||
// ...
|
||||
provideHttpClient(),
|
||||
provideUserApi(environment.basePath),
|
||||
provideAdminApi(environment.basePath),
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
@@ -177,8 +176,8 @@ Example value for use in your Configuration-Provider:
|
||||
|
||||
```typescript
|
||||
new Configuration({
|
||||
encodeParam: (param: Param) => myFancyParamEncoder(param),
|
||||
});
|
||||
encodeParam: (param: Param) => myFancyParamEncoder(param),
|
||||
})
|
||||
```
|
||||
|
||||
[parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations
|
||||
|
||||
@@ -1,109 +1,83 @@
|
||||
/**
|
||||
* 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 {
|
||||
HttpHeaders,
|
||||
HttpParams,
|
||||
HttpParameterCodec,
|
||||
} from '@angular/common/http';
|
||||
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
|
||||
import { CustomHttpParameterCodec } from './encoder';
|
||||
import { Configuration } from './configuration';
|
||||
|
||||
export class BaseService {
|
||||
protected basePath = 'http://localhost:8000';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration: Configuration;
|
||||
public encoder: HttpParameterCodec;
|
||||
protected basePath = 'http://localhost:8000';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration: Configuration;
|
||||
public encoder: HttpParameterCodec;
|
||||
|
||||
constructor(basePath?: string | string[], configuration?: Configuration) {
|
||||
this.configuration = configuration || new Configuration();
|
||||
if (typeof this.configuration.basePath !== 'string') {
|
||||
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
|
||||
if (firstBasePath != undefined) {
|
||||
basePath = firstBasePath;
|
||||
}
|
||||
constructor(basePath?: string|string[], configuration?: Configuration) {
|
||||
this.configuration = configuration || new Configuration();
|
||||
if (typeof this.configuration.basePath !== 'string') {
|
||||
const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
|
||||
if (firstBasePath != undefined) {
|
||||
basePath = firstBasePath;
|
||||
}
|
||||
|
||||
if (typeof basePath !== 'string') {
|
||||
basePath = this.basePath;
|
||||
}
|
||||
this.configuration.basePath = basePath;
|
||||
}
|
||||
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
||||
}
|
||||
|
||||
protected canConsumeForm(consumes: string[]): boolean {
|
||||
return consumes.indexOf('multipart/form-data') !== -1;
|
||||
}
|
||||
|
||||
protected addToHttpParams(
|
||||
httpParams: HttpParams,
|
||||
value: any,
|
||||
key?: string,
|
||||
isDeep: boolean = false,
|
||||
): HttpParams {
|
||||
// If the value is an object (but not a Date), recursively add its keys.
|
||||
if (typeof value === 'object' && !(value instanceof Date)) {
|
||||
return this.addToHttpParamsRecursive(
|
||||
httpParams,
|
||||
value,
|
||||
isDeep ? key : undefined,
|
||||
isDeep,
|
||||
);
|
||||
}
|
||||
return this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
}
|
||||
|
||||
protected addToHttpParamsRecursive(
|
||||
httpParams: HttpParams,
|
||||
value?: any,
|
||||
key?: string,
|
||||
isDeep: boolean = false,
|
||||
): HttpParams {
|
||||
if (value === null || value === undefined) {
|
||||
return httpParams;
|
||||
}
|
||||
if (typeof value === 'object') {
|
||||
// If JSON format is preferred, key must be provided.
|
||||
if (key != null) {
|
||||
return isDeep
|
||||
? Object.keys(value as Record<string, any>).reduce(
|
||||
(hp, k) => hp.append(`${key}[${k}]`, value[k]),
|
||||
httpParams,
|
||||
)
|
||||
: httpParams.append(key, JSON.stringify(value));
|
||||
}
|
||||
// Otherwise, if it's an array, add each element.
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(
|
||||
(elem) =>
|
||||
(httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)),
|
||||
);
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, value.toISOString());
|
||||
} else {
|
||||
throw Error('key may not be null if value is Date');
|
||||
if (typeof basePath !== 'string') {
|
||||
basePath = this.basePath;
|
||||
}
|
||||
this.configuration.basePath = basePath;
|
||||
}
|
||||
} else {
|
||||
Object.keys(value).forEach((k) => {
|
||||
const paramKey = key ? `${key}.${k}` : k;
|
||||
httpParams = this.addToHttpParamsRecursive(
|
||||
httpParams,
|
||||
value[k],
|
||||
paramKey,
|
||||
);
|
||||
});
|
||||
}
|
||||
return httpParams;
|
||||
} else if (key != null) {
|
||||
return httpParams.append(key, value);
|
||||
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
||||
}
|
||||
|
||||
protected canConsumeForm(consumes: string[]): boolean {
|
||||
return consumes.indexOf('multipart/form-data') !== -1;
|
||||
}
|
||||
|
||||
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
|
||||
// If the value is an object (but not a Date), recursively add its keys.
|
||||
if (typeof value === 'object' && !(value instanceof Date)) {
|
||||
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
|
||||
}
|
||||
return this.addToHttpParamsRecursive(httpParams, value, key);
|
||||
}
|
||||
|
||||
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
|
||||
if (value === null || value === undefined) {
|
||||
return httpParams;
|
||||
}
|
||||
if (typeof value === 'object') {
|
||||
// If JSON format is preferred, key must be provided.
|
||||
if (key != null) {
|
||||
return isDeep
|
||||
? Object.keys(value as Record<string, any>).reduce(
|
||||
(hp, k) => hp.append(`${key}[${k}]`, value[k]),
|
||||
httpParams,
|
||||
)
|
||||
: httpParams.append(key, JSON.stringify(value));
|
||||
}
|
||||
// Otherwise, if it's an array, add each element.
|
||||
if (Array.isArray(value)) {
|
||||
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
||||
} else if (value instanceof Date) {
|
||||
if (key != null) {
|
||||
httpParams = httpParams.append(key, value.toISOString());
|
||||
} else {
|
||||
throw Error("key may not be null if value is Date");
|
||||
}
|
||||
} else {
|
||||
Object.keys(value).forEach(k => {
|
||||
const paramKey = key ? `${key}.${k}` : k;
|
||||
httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey);
|
||||
});
|
||||
}
|
||||
return httpParams;
|
||||
} else if (key != null) {
|
||||
return httpParams.append(key, value);
|
||||
}
|
||||
throw Error("key may not be null if value is not object or array");
|
||||
}
|
||||
throw Error('key may not be null if value is not object or array');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,30 @@
|
||||
import {
|
||||
NgModule,
|
||||
ModuleWithProviders,
|
||||
SkipSelf,
|
||||
Optional,
|
||||
} from '@angular/core';
|
||||
import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
|
||||
import { Configuration } from './configuration';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
imports: [],
|
||||
declarations: [],
|
||||
exports: [],
|
||||
providers: [],
|
||||
exports: [],
|
||||
providers: []
|
||||
})
|
||||
export class ApiModule {
|
||||
public static forRoot(
|
||||
configurationFactory: () => Configuration,
|
||||
): ModuleWithProviders<ApiModule> {
|
||||
return {
|
||||
ngModule: ApiModule,
|
||||
providers: [{ provide: Configuration, useFactory: configurationFactory }],
|
||||
};
|
||||
}
|
||||
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
|
||||
return {
|
||||
ngModule: ApiModule,
|
||||
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
|
||||
};
|
||||
}
|
||||
|
||||
constructor(
|
||||
@Optional() @SkipSelf() parentModule: ApiModule,
|
||||
@Optional() http: HttpClient,
|
||||
) {
|
||||
if (parentModule) {
|
||||
throw new Error(
|
||||
'ApiModule is already loaded. Import in your base AppModule only.',
|
||||
);
|
||||
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
|
||||
@Optional() http: HttpClient) {
|
||||
if (parentModule) {
|
||||
throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
|
||||
}
|
||||
if (!http) {
|
||||
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
|
||||
'See also https://github.com/angular/angular/issues/20575');
|
||||
}
|
||||
}
|
||||
if (!http) {
|
||||
throw new Error(
|
||||
'You need to import the HttpClientModule in your AppModule! \n' +
|
||||
'See also https://github.com/angular/angular/issues/20575',
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +1,21 @@
|
||||
export * from './funding.service';
|
||||
import { FundingService } from './funding.service';
|
||||
export * from './funding.serviceInterface';
|
||||
export * from './inse-account-service.service';
|
||||
import { INSEAccountServiceService } from './inse-account-service.service';
|
||||
export * from './inse-account-service.serviceInterface';
|
||||
export * from './inse-service.service';
|
||||
import { INSEServiceService } from './inse-service.service';
|
||||
export * from './inse-service.serviceInterface';
|
||||
export * from './iNSEAccountService.service';
|
||||
import { INSEAccountServiceService } from './iNSEAccountService.service';
|
||||
export * from './iNSEService.service';
|
||||
import { INSEServiceService } from './iNSEService.service';
|
||||
export * from './institutions.service';
|
||||
import { InstitutionsService } from './institutions.service';
|
||||
export * from './institutions.serviceInterface';
|
||||
export * from './items.service';
|
||||
import { ItemsService } from './items.service';
|
||||
export * from './items.serviceInterface';
|
||||
export * from './person-network.service';
|
||||
import { PersonNetworkService } from './person-network.service';
|
||||
export * from './person-network.serviceInterface';
|
||||
export * from './personNetwork.service';
|
||||
import { PersonNetworkService } from './personNetwork.service';
|
||||
export * from './persons.service';
|
||||
import { PersonsService } from './persons.service';
|
||||
export * from './persons.serviceInterface';
|
||||
export * from './projects.service';
|
||||
import { ProjectsService } from './projects.service';
|
||||
export * from './topics.service';
|
||||
import { TopicsService } from './topics.service';
|
||||
export * from './topics.serviceInterface';
|
||||
export * from './works.service';
|
||||
import { WorksService } from './works.service';
|
||||
export * from './works.serviceInterface';
|
||||
export const APIS = [
|
||||
FundingService,
|
||||
INSEAccountServiceService,
|
||||
INSEServiceService,
|
||||
InstitutionsService,
|
||||
ItemsService,
|
||||
PersonNetworkService,
|
||||
PersonsService,
|
||||
TopicsService,
|
||||
WorksService,
|
||||
];
|
||||
export const APIS = [FundingService, INSEAccountServiceService, INSEServiceService, InstitutionsService, ItemsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, WorksService];
|
||||
|
||||
@@ -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,271 +9,153 @@
|
||||
*/
|
||||
/* 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 { FundersByAuthorResponse } from '../model/funders-by-author-response';
|
||||
import { FundersByAuthorResponse } from '../model/fundersByAuthorResponse';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/http-validation-error';
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
// @ts-ignore
|
||||
import { PublicationsByAuthorResponse } from '../model/publications-by-author-response';
|
||||
import { PublicationsByAuthorResponse } from '../model/publicationsByAuthorResponse';
|
||||
|
||||
// @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';
|
||||
import { FundingServiceInterface } from './funding.serviceInterface';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FundingService
|
||||
extends BaseService
|
||||
implements FundingServiceInterface
|
||||
{
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
export class FundingService extends BaseService {
|
||||
|
||||
/**
|
||||
* Get funding organizations by author.
|
||||
* @endpoint get /api/inse-service/authors/{author_id}/funders
|
||||
* @param authorId
|
||||
* @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 getFundersByAuthor(
|
||||
authorId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<FundersByAuthorResponse>;
|
||||
public getFundersByAuthor(
|
||||
authorId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<FundersByAuthorResponse>>;
|
||||
public getFundersByAuthor(
|
||||
authorId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<FundersByAuthorResponse>>;
|
||||
public getFundersByAuthor(
|
||||
authorId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (authorId === null || authorId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter authorId was null or undefined when calling getFundersByAuthor.',
|
||||
);
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
/**
|
||||
* Get funding organizations by author.
|
||||
* @endpoint get /api/inse-service/authors/{author_id}/funders
|
||||
* @param authorId
|
||||
* @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 getFundersByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<FundersByAuthorResponse>;
|
||||
public getFundersByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<FundersByAuthorResponse>>;
|
||||
public getFundersByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<FundersByAuthorResponse>>;
|
||||
public getFundersByAuthor(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (authorId === null || authorId === undefined) {
|
||||
throw new Error('Required parameter authorId was null or undefined when calling getFundersByAuthor.');
|
||||
}
|
||||
|
||||
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/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/funders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<FundersByAuthorResponse>('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 funded publications by author.
|
||||
* @endpoint get /api/inse-service/authors/{author_id}/publications
|
||||
* @param authorId
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @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 getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PublicationsByAuthorResponse>;
|
||||
public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PublicationsByAuthorResponse>>;
|
||||
public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PublicationsByAuthorResponse>>;
|
||||
public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, 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 getPublicationsByAuthor.');
|
||||
}
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>page, 'page');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>pageSize, 'page_size');
|
||||
|
||||
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/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/publications`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<PublicationsByAuthorResponse>('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/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/funders`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<FundersByAuthorResponse>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get funded publications by author.
|
||||
* @endpoint get /api/inse-service/authors/{author_id}/publications
|
||||
* @param authorId
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @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 getPublicationsByAuthor(
|
||||
authorId: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<PublicationsByAuthorResponse>;
|
||||
public getPublicationsByAuthor(
|
||||
authorId: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<PublicationsByAuthorResponse>>;
|
||||
public getPublicationsByAuthor(
|
||||
authorId: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<PublicationsByAuthorResponse>>;
|
||||
public getPublicationsByAuthor(
|
||||
authorId: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
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 getPublicationsByAuthor.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>page,
|
||||
'page',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>pageSize,
|
||||
'page_size',
|
||||
);
|
||||
|
||||
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/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/publications`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<PublicationsByAuthorResponse>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,49 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { FundersByAuthorResponse } from '../model/models';
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { PublicationsByAuthorResponse } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface FundingServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Get funding organizations by author.
|
||||
*
|
||||
* @endpoint get /api/inse-service/authors/{author_id}/funders
|
||||
* @param authorId
|
||||
*/
|
||||
getFundersByAuthor(
|
||||
authorId: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<FundersByAuthorResponse>;
|
||||
|
||||
/**
|
||||
* Get funded publications by author.
|
||||
*
|
||||
* @endpoint get /api/inse-service/authors/{author_id}/publications
|
||||
* @param authorId
|
||||
* @param page
|
||||
* @param pageSize
|
||||
*/
|
||||
getPublicationsByAuthor(
|
||||
authorId: string,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<PublicationsByAuthorResponse>;
|
||||
}
|
||||
@@ -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 { AccessGrant } from '../model/accessGrant';
|
||||
@@ -30,314 +24,190 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
import { IdentityGrant } from '../model/identityGrant';
|
||||
|
||||
// @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 INSEAccountServiceService extends BaseService {
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Access Grant
|
||||
* @endpoint post /inse-account/auth/access
|
||||
* @param secret
|
||||
* @param account
|
||||
* @param organization
|
||||
* @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 getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<AccessGrant>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<AccessGrant>>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<AccessGrant>>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (secret === null || secret === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
|
||||
);
|
||||
}
|
||||
if (account === null || account === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
|
||||
);
|
||||
}
|
||||
if (organization === null || organization === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
|
||||
);
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
/**
|
||||
* Get Access Grant
|
||||
* @endpoint post /inse-account/auth/access
|
||||
* @param secret
|
||||
* @param account
|
||||
* @param organization
|
||||
* @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 getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AccessGrant>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AccessGrant>>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AccessGrant>>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (secret === null || secret === undefined) {
|
||||
throw new Error('Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.');
|
||||
}
|
||||
if (account === null || account === undefined) {
|
||||
throw new Error('Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.');
|
||||
}
|
||||
if (organization === null || organization === undefined) {
|
||||
throw new Error('Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.');
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/x-www-form-urlencoded'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let localVarFormParams: { append(param: string, value: any): any; };
|
||||
let localVarUseForm = false;
|
||||
let localVarConvertFormParamsToString = false;
|
||||
if (localVarUseForm) {
|
||||
localVarFormParams = new FormData();
|
||||
} else {
|
||||
localVarFormParams = new HttpParams({encoder: this.encoder});
|
||||
}
|
||||
|
||||
if (secret !== undefined) {
|
||||
localVarFormParams = localVarFormParams.append('secret', <any>secret) as any || localVarFormParams;
|
||||
}
|
||||
if (account !== undefined) {
|
||||
localVarFormParams = localVarFormParams.append('account', <any>account) as any || localVarFormParams;
|
||||
}
|
||||
if (organization !== undefined) {
|
||||
localVarFormParams = localVarFormParams.append('organization', <any>organization) as any || localVarFormParams;
|
||||
}
|
||||
|
||||
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 = `/inse-account/auth/access`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<AccessGrant>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
/**
|
||||
* Get Identity Grant
|
||||
* @endpoint post /inse-account/auth/id
|
||||
* @param username
|
||||
* @param password
|
||||
* @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 getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<IdentityGrant>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<IdentityGrant>>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<IdentityGrant>>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (username === null || username === undefined) {
|
||||
throw new Error('Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.');
|
||||
}
|
||||
if (password === null || password === undefined) {
|
||||
throw new Error('Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.');
|
||||
}
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/x-www-form-urlencoded'];
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
let localVarFormParams: { append(param: string, value: any): any };
|
||||
let localVarUseForm = false;
|
||||
let localVarConvertFormParamsToString = false;
|
||||
if (localVarUseForm) {
|
||||
localVarFormParams = new FormData();
|
||||
} else {
|
||||
localVarFormParams = new HttpParams({ encoder: this.encoder });
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/x-www-form-urlencoded'
|
||||
];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let localVarFormParams: { append(param: string, value: any): any; };
|
||||
let localVarUseForm = false;
|
||||
let localVarConvertFormParamsToString = false;
|
||||
if (localVarUseForm) {
|
||||
localVarFormParams = new FormData();
|
||||
} else {
|
||||
localVarFormParams = new HttpParams({encoder: this.encoder});
|
||||
}
|
||||
|
||||
if (username !== undefined) {
|
||||
localVarFormParams = localVarFormParams.append('username', <any>username) as any || localVarFormParams;
|
||||
}
|
||||
if (password !== undefined) {
|
||||
localVarFormParams = localVarFormParams.append('password', <any>password) as any || localVarFormParams;
|
||||
}
|
||||
|
||||
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 = `/inse-account/auth/id`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<IdentityGrant>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (secret !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('secret', <any>secret) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
if (account !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('account', <any>account) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
if (organization !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('organization', <any>organization) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
|
||||
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 = `/inse-account/auth/access`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<AccessGrant>(
|
||||
'post',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: localVarConvertFormParamsToString
|
||||
? localVarFormParams.toString()
|
||||
: localVarFormParams,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Identity Grant
|
||||
* @endpoint post /inse-account/auth/id
|
||||
* @param username
|
||||
* @param password
|
||||
* @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 getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<IdentityGrant>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<IdentityGrant>>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<IdentityGrant>>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (username === null || username === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.',
|
||||
);
|
||||
}
|
||||
if (password === null || password === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.',
|
||||
);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/x-www-form-urlencoded'];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let localVarFormParams: { append(param: string, value: any): any };
|
||||
let localVarUseForm = false;
|
||||
let localVarConvertFormParamsToString = false;
|
||||
if (localVarUseForm) {
|
||||
localVarFormParams = new FormData();
|
||||
} else {
|
||||
localVarFormParams = new HttpParams({ encoder: this.encoder });
|
||||
}
|
||||
|
||||
if (username !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('username', <any>username) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
if (password !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('password', <any>password) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
|
||||
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 = `/inse-account/auth/id`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<IdentityGrant>(
|
||||
'post',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: localVarConvertFormParamsToString
|
||||
? localVarFormParams.toString()
|
||||
: localVarFormParams,
|
||||
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
@@ -1,347 +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.
|
||||
*/
|
||||
/* 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';
|
||||
|
||||
// @ts-ignore
|
||||
import { AccessGrant } from '../model/access-grant';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/http-validation-error';
|
||||
// @ts-ignore
|
||||
import { IdentityGrant } from '../model/identity-grant';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
import { INSEAccountServiceServiceInterface } from './inse-account-service.serviceInterface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class INSEAccountServiceService
|
||||
extends BaseService
|
||||
implements INSEAccountServiceServiceInterface
|
||||
{
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Access Grant
|
||||
* @endpoint post /inse-account/auth/access
|
||||
* @param secret
|
||||
* @param account
|
||||
* @param organization
|
||||
* @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 getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<AccessGrant>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<AccessGrant>>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<AccessGrant>>;
|
||||
public getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (secret === null || secret === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
|
||||
);
|
||||
}
|
||||
if (account === null || account === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
|
||||
);
|
||||
}
|
||||
if (organization === null || organization === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.',
|
||||
);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/x-www-form-urlencoded'];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let localVarFormParams: { append(param: string, value: any): any };
|
||||
let localVarUseForm = false;
|
||||
let localVarConvertFormParamsToString = false;
|
||||
if (localVarUseForm) {
|
||||
localVarFormParams = new FormData();
|
||||
} else {
|
||||
localVarFormParams = new HttpParams({ encoder: this.encoder });
|
||||
}
|
||||
|
||||
if (secret !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('secret', <any>secret) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
if (account !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('account', <any>account) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
if (organization !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('organization', <any>organization) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
|
||||
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 = `/inse-account/auth/access`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<AccessGrant>(
|
||||
'post',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: localVarConvertFormParamsToString
|
||||
? localVarFormParams.toString()
|
||||
: localVarFormParams,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Identity Grant
|
||||
* @endpoint post /inse-account/auth/id
|
||||
* @param username
|
||||
* @param password
|
||||
* @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 getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<IdentityGrant>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<IdentityGrant>>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<IdentityGrant>>;
|
||||
public getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (username === null || username === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.',
|
||||
);
|
||||
}
|
||||
if (password === null || password === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.',
|
||||
);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/x-www-form-urlencoded'];
|
||||
|
||||
const canConsumeForm = this.canConsumeForm(consumes);
|
||||
|
||||
let localVarFormParams: { append(param: string, value: any): any };
|
||||
let localVarUseForm = false;
|
||||
let localVarConvertFormParamsToString = false;
|
||||
if (localVarUseForm) {
|
||||
localVarFormParams = new FormData();
|
||||
} else {
|
||||
localVarFormParams = new HttpParams({ encoder: this.encoder });
|
||||
}
|
||||
|
||||
if (username !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('username', <any>username) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
if (password !== undefined) {
|
||||
localVarFormParams =
|
||||
(localVarFormParams.append('password', <any>password) as any) ||
|
||||
localVarFormParams;
|
||||
}
|
||||
|
||||
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 = `/inse-account/auth/id`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<IdentityGrant>(
|
||||
'post',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: localVarConvertFormParamsToString
|
||||
? localVarFormParams.toString()
|
||||
: localVarFormParams,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,51 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AccessGrant } from '../model/models';
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { IdentityGrant } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface INSEAccountServiceServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Get Access Grant
|
||||
*
|
||||
* @endpoint post /inse-account/auth/access
|
||||
* @param secret
|
||||
* @param account
|
||||
* @param organization
|
||||
*/
|
||||
getAccessGrantInseAccountAuthAccessPost(
|
||||
secret: string,
|
||||
account: number,
|
||||
organization: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AccessGrant>;
|
||||
|
||||
/**
|
||||
* Get Identity Grant
|
||||
*
|
||||
* @endpoint post /inse-account/auth/id
|
||||
* @param username
|
||||
* @param password
|
||||
*/
|
||||
getIdentityGrantInseAccountAuthIdPost(
|
||||
username: string,
|
||||
password: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<IdentityGrant>;
|
||||
}
|
||||
@@ -1,957 +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.
|
||||
*/
|
||||
/* 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';
|
||||
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/http-validation-error';
|
||||
// @ts-ignore
|
||||
import { Item } from '../model/item';
|
||||
// @ts-ignore
|
||||
import { ItemCreate } from '../model/item-create';
|
||||
// @ts-ignore
|
||||
import { ItemPage } from '../model/item-page';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
import { INSEServiceServiceInterface } from './inse-service.serviceInterface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class INSEServiceService
|
||||
extends BaseService
|
||||
implements INSEServiceServiceInterface
|
||||
{
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new item.
|
||||
* @endpoint post /api/inse-service/items
|
||||
* @param itemCreate
|
||||
* @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 addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<Item>;
|
||||
public addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<Item>>;
|
||||
public addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<Item>>;
|
||||
public addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (itemCreate === null || itemCreate === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter itemCreate was null or undefined when calling addItem.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
// 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/inse-service/items`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('post', `${basePath}${localVarPath}`, {
|
||||
context: localVarHttpContext,
|
||||
body: itemCreate,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the topic hierarchy cache.
|
||||
* @endpoint get /api/inse-service/topics/cache
|
||||
* @param pageSize Page size for each search page.
|
||||
* @param saveJson Persist cache JSON to data folder.
|
||||
* @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 buildTopicCache(
|
||||
pageSize?: number,
|
||||
saveJson?: boolean,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<object>;
|
||||
public buildTopicCache(
|
||||
pageSize?: number,
|
||||
saveJson?: boolean,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<object>>;
|
||||
public buildTopicCache(
|
||||
pageSize?: number,
|
||||
saveJson?: boolean,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<object>>;
|
||||
public buildTopicCache(
|
||||
pageSize?: number,
|
||||
saveJson?: boolean,
|
||||
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>pageSize,
|
||||
'page_size',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>saveJson,
|
||||
'save_json',
|
||||
);
|
||||
|
||||
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/inse-service/topics/cache`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<object>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Counts topic hierarchy occurrences from cache.
|
||||
* @endpoint get /api/inse-service/topics/count
|
||||
* @param topic Topic names (repeat parameter).
|
||||
* @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 countTopicHierarchy(
|
||||
topic: Array<string>,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<object>;
|
||||
public countTopicHierarchy(
|
||||
topic: Array<string>,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<object>>;
|
||||
public countTopicHierarchy(
|
||||
topic: Array<string>,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<object>>;
|
||||
public countTopicHierarchy(
|
||||
topic: Array<string>,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (topic === null || topic === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter topic was null or undefined when calling countTopicHierarchy.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
||||
if (topic) {
|
||||
topic.forEach((element) => {
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>element,
|
||||
'topic',
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
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/inse-service/topics/count`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<object>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the item with the id.
|
||||
* @endpoint delete /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @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 deleteItem(
|
||||
id: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any>;
|
||||
public deleteItem(
|
||||
id: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<any>>;
|
||||
public deleteItem(
|
||||
id: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<any>>;
|
||||
public deleteItem(
|
||||
id: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter id was null or undefined when calling deleteItem.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (
|
||||
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
||||
) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', 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,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the item with the id.
|
||||
* @endpoint get /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @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 getItem(
|
||||
id: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<Item>;
|
||||
public getItem(
|
||||
id: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<Item>>;
|
||||
public getItem(
|
||||
id: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<Item>>;
|
||||
public getItem(
|
||||
id: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter id was null or undefined when calling getItem.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (
|
||||
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
||||
) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('get', `${basePath}${localVarPath}`, {
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a page of items.
|
||||
* @endpoint get /api/inse-service/items
|
||||
* @param pageOffset The page offset.
|
||||
* @param pageSize The page size.
|
||||
* @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 getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<ItemPage>;
|
||||
public getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<ItemPage>>;
|
||||
public getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<ItemPage>>;
|
||||
public getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
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>pageOffset,
|
||||
'pageOffset',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>pageSize,
|
||||
'pageSize',
|
||||
);
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (
|
||||
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
||||
) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<ItemPage>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics).
|
||||
* @endpoint get /api/inse-service/topics/hierarchy
|
||||
* @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 getTopicHierarchy(
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<object>;
|
||||
public getTopicHierarchy(
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<object>>;
|
||||
public getTopicHierarchy(
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<object>>;
|
||||
public getTopicHierarchy(
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
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/inse-service/topics/hierarchy`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<object>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the item with the id.
|
||||
* @endpoint put /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @param itemCreate
|
||||
* @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 updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<Item>;
|
||||
public updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<Item>>;
|
||||
public updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<Item>>;
|
||||
public updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter id was null or undefined when calling updateItem.',
|
||||
);
|
||||
}
|
||||
if (itemCreate === null || itemCreate === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter itemCreate was null or undefined when calling updateItem.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
// 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/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('put', `${basePath}${localVarPath}`, {
|
||||
context: localVarHttpContext,
|
||||
body: itemCreate,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,108 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { Item } from '../model/models';
|
||||
import { ItemCreate } from '../model/models';
|
||||
import { ItemPage } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface INSEServiceServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Adds a new item.
|
||||
*
|
||||
* @endpoint post /api/inse-service/items
|
||||
* @param itemCreate
|
||||
*/
|
||||
addItem(
|
||||
itemCreate: ItemCreate,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<Item>;
|
||||
|
||||
/**
|
||||
* Builds the topic hierarchy cache.
|
||||
*
|
||||
* @endpoint get /api/inse-service/topics/cache
|
||||
* @param pageSize Page size for each search page.
|
||||
* @param saveJson Persist cache JSON to data folder.
|
||||
*/
|
||||
buildTopicCache(
|
||||
pageSize?: number,
|
||||
saveJson?: boolean,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<object>;
|
||||
|
||||
/**
|
||||
* Counts topic hierarchy occurrences from cache.
|
||||
*
|
||||
* @endpoint get /api/inse-service/topics/count
|
||||
* @param topic Topic names (repeat parameter).
|
||||
*/
|
||||
countTopicHierarchy(
|
||||
topic: Array<string>,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<object>;
|
||||
|
||||
/**
|
||||
* Deletes the item with the id.
|
||||
*
|
||||
* @endpoint delete /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
*/
|
||||
deleteItem(id: number, extraHttpRequestParams?: any): Observable<any>;
|
||||
|
||||
/**
|
||||
* Returns the item with the id.
|
||||
*
|
||||
* @endpoint get /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
*/
|
||||
getItem(id: number, extraHttpRequestParams?: any): Observable<Item>;
|
||||
|
||||
/**
|
||||
* Returns a page of items.
|
||||
*
|
||||
* @endpoint get /api/inse-service/items
|
||||
* @param pageOffset The page offset.
|
||||
* @param pageSize The page size.
|
||||
*/
|
||||
getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<ItemPage>;
|
||||
|
||||
/**
|
||||
* Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics).
|
||||
*
|
||||
* @endpoint get /api/inse-service/topics/hierarchy
|
||||
*/
|
||||
getTopicHierarchy(extraHttpRequestParams?: any): Observable<object>;
|
||||
|
||||
/**
|
||||
* Updates the item with the id.
|
||||
*
|
||||
* @endpoint put /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @param itemCreate
|
||||
*/
|
||||
updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<Item>;
|
||||
}
|
||||
@@ -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,368 +9,242 @@
|
||||
*/
|
||||
/* 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 { AutocompleteResponse } from '../model/autocomplete-response';
|
||||
import { AutocompleteResponse } from '../model/autocompleteResponse';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/http-validation-error';
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
// @ts-ignore
|
||||
import { InstitutionsListResponse } from '../model/institutions-list-response';
|
||||
import { Institution } from '../model/institution';
|
||||
// @ts-ignore
|
||||
import { InstitutionsListResponse } from '../model/institutionsListResponse';
|
||||
|
||||
// @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';
|
||||
import { InstitutionsServiceInterface } from './institutions.serviceInterface';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class InstitutionsService
|
||||
extends BaseService
|
||||
implements InstitutionsServiceInterface
|
||||
{
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
export class InstitutionsService extends BaseService {
|
||||
|
||||
/**
|
||||
* Returns institution options for autocomplete inputs.
|
||||
* @endpoint get /api/institutions/autocomplete
|
||||
* @param query Institution search text, for example \'Duisburg Essen\'.
|
||||
* @param countryCode Optional ISO country code filter.
|
||||
* @param type Optional institution type filter.
|
||||
* @param limit Maximum number of autocomplete options.
|
||||
* @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 autocompleteInstitutions(
|
||||
query: string,
|
||||
countryCode?: string,
|
||||
type?: string,
|
||||
limit?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<AutocompleteResponse>;
|
||||
public autocompleteInstitutions(
|
||||
query: string,
|
||||
countryCode?: string,
|
||||
type?: string,
|
||||
limit?: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<AutocompleteResponse>>;
|
||||
public autocompleteInstitutions(
|
||||
query: string,
|
||||
countryCode?: string,
|
||||
type?: string,
|
||||
limit?: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<AutocompleteResponse>>;
|
||||
public autocompleteInstitutions(
|
||||
query: string,
|
||||
countryCode?: string,
|
||||
type?: string,
|
||||
limit?: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (query === null || query === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter query was null or undefined when calling autocompleteInstitutions.',
|
||||
);
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>query,
|
||||
'query',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>countryCode,
|
||||
'countryCode',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>type,
|
||||
'type',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>limit,
|
||||
'limit',
|
||||
);
|
||||
/**
|
||||
* Returns institution options for autocomplete inputs.
|
||||
* @endpoint get /api/institutions/autocomplete
|
||||
* @param query Institution search text, for example \'Duisburg Essen\'.
|
||||
* @param countryCode Optional ISO country code filter.
|
||||
* @param type Optional institution type filter.
|
||||
* @param limit Maximum number of autocomplete options.
|
||||
* @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 autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AutocompleteResponse>;
|
||||
public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AutocompleteResponse>>;
|
||||
public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AutocompleteResponse>>;
|
||||
public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (query === null || query === undefined) {
|
||||
throw new Error('Required parameter query was null or undefined when calling autocompleteInstitutions.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>query, 'query');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>countryCode, 'countryCode');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>type, 'type');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>limit, 'limit');
|
||||
|
||||
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/autocomplete`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<AutocompleteResponse>('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();
|
||||
/**
|
||||
* Returns a single institution by ID.
|
||||
* Returns a single institution by its OpenAlex ID.
|
||||
* @endpoint get /api/institutions/{id}
|
||||
* @param id
|
||||
* @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 getInstitutionById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Institution>;
|
||||
public getInstitutionById(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Institution>>;
|
||||
public getInstitutionById(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Institution>>;
|
||||
public getInstitutionById(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getInstitutionById.');
|
||||
}
|
||||
|
||||
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';
|
||||
}
|
||||
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/${this.configuration.encodeParam({name: "id", value: id, 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
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
let localVarPath = `/api/institutions/autocomplete`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<AutocompleteResponse>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Returns a list of OpenAlex institutions.
|
||||
* @endpoint get /api/institutions
|
||||
* @param search Full-text search, for example \'Duisburg Essen\'.
|
||||
* @param filter OpenAlex filter, for example \'country_code:DE,type:education\'.
|
||||
* @param sort Sort field, for example \'works_count:desc\'.
|
||||
* @param groupBy OpenAlex group_by field, for example \'country_code\'.
|
||||
* @param perPage Results per page.
|
||||
* @param page Page number. Use cursor for deep pagination.
|
||||
* @param cursor Cursor pagination token. Use \'*\' to start.
|
||||
* @param sample Random sample size. Cannot be combined with sort or page.
|
||||
* @param select Comma-separated fields to return.
|
||||
* @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 listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionsListResponse>;
|
||||
public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionsListResponse>>;
|
||||
public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionsListResponse>>;
|
||||
public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
/**
|
||||
* Returns a list of OpenAlex institutions.
|
||||
* @endpoint get /api/institutions
|
||||
* @param search Full-text search, for example \'Duisburg Essen\'.
|
||||
* @param filter OpenAlex filter, for example \'country_code:DE,type:education\'.
|
||||
* @param sort Sort field, for example \'works_count:desc\'.
|
||||
* @param groupBy OpenAlex group_by field, for example \'country_code\'.
|
||||
* @param perPage Results per page.
|
||||
* @param page Page number. Use cursor for deep pagination.
|
||||
* @param cursor Cursor pagination token. Use \'*\' to start.
|
||||
* @param sample Random sample size. Cannot be combined with sort or page.
|
||||
* @param select Comma-separated fields to return.
|
||||
* @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 listInstitutions(
|
||||
search?: string,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
groupBy?: string,
|
||||
perPage?: number,
|
||||
page?: number,
|
||||
cursor?: string,
|
||||
sample?: number,
|
||||
select?: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<InstitutionsListResponse>;
|
||||
public listInstitutions(
|
||||
search?: string,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
groupBy?: string,
|
||||
perPage?: number,
|
||||
page?: number,
|
||||
cursor?: string,
|
||||
sample?: number,
|
||||
select?: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<InstitutionsListResponse>>;
|
||||
public listInstitutions(
|
||||
search?: string,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
groupBy?: string,
|
||||
perPage?: number,
|
||||
page?: number,
|
||||
cursor?: string,
|
||||
sample?: number,
|
||||
select?: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<InstitutionsListResponse>>;
|
||||
public listInstitutions(
|
||||
search?: string,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
groupBy?: string,
|
||||
perPage?: number,
|
||||
page?: number,
|
||||
cursor?: string,
|
||||
sample?: number,
|
||||
select?: 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>search,
|
||||
'search',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>filter,
|
||||
'filter',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>sort,
|
||||
'sort',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>groupBy,
|
||||
'group_by',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>perPage,
|
||||
'per_page',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>page,
|
||||
'page',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>cursor,
|
||||
'cursor',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>sample,
|
||||
'sample',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>select,
|
||||
'select',
|
||||
);
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>search, 'search');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>filter, 'filter');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>sort, 'sort');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>groupBy, 'group_by');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>perPage, 'per_page');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>page, 'page');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>cursor, 'cursor');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>sample, 'sample');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>select, 'select');
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
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`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<InstitutionsListResponse>('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/institutions`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<InstitutionsListResponse>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,67 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AutocompleteResponse } from '../model/models';
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { InstitutionsListResponse } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface InstitutionsServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Returns institution options for autocomplete inputs.
|
||||
*
|
||||
* @endpoint get /api/institutions/autocomplete
|
||||
* @param query Institution search text, for example \'Duisburg Essen\'.
|
||||
* @param countryCode Optional ISO country code filter.
|
||||
* @param type Optional institution type filter.
|
||||
* @param limit Maximum number of autocomplete options.
|
||||
*/
|
||||
autocompleteInstitutions(
|
||||
query: string,
|
||||
countryCode?: string,
|
||||
type?: string,
|
||||
limit?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AutocompleteResponse>;
|
||||
|
||||
/**
|
||||
* Returns a list of OpenAlex institutions.
|
||||
*
|
||||
* @endpoint get /api/institutions
|
||||
* @param search Full-text search, for example \'Duisburg Essen\'.
|
||||
* @param filter OpenAlex filter, for example \'country_code:DE,type:education\'.
|
||||
* @param sort Sort field, for example \'works_count:desc\'.
|
||||
* @param groupBy OpenAlex group_by field, for example \'country_code\'.
|
||||
* @param perPage Results per page.
|
||||
* @param page Page number. Use cursor for deep pagination.
|
||||
* @param cursor Cursor pagination token. Use \'*\' to start.
|
||||
* @param sample Random sample size. Cannot be combined with sort or page.
|
||||
* @param select Comma-separated fields to return.
|
||||
*/
|
||||
listInstitutions(
|
||||
search?: string,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
groupBy?: string,
|
||||
perPage?: number,
|
||||
page?: number,
|
||||
cursor?: string,
|
||||
sample?: number,
|
||||
select?: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<InstitutionsListResponse>;
|
||||
}
|
||||
@@ -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,627 +9,355 @@
|
||||
*/
|
||||
/* 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/http-validation-error';
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
// @ts-ignore
|
||||
import { Item } from '../model/item';
|
||||
// @ts-ignore
|
||||
import { ItemCreate } from '../model/item-create';
|
||||
import { ItemCreate } from '../model/itemCreate';
|
||||
// @ts-ignore
|
||||
import { ItemPage } from '../model/item-page';
|
||||
import { ItemPage } from '../model/itemPage';
|
||||
|
||||
// @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';
|
||||
import { ItemsServiceInterface } from './items.serviceInterface';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ItemsService extends BaseService implements ItemsServiceInterface {
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
export class ItemsService extends BaseService {
|
||||
|
||||
/**
|
||||
* Adds a new item.
|
||||
* @endpoint post /api/inse-service/items
|
||||
* @param itemCreate
|
||||
* @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 addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<Item>;
|
||||
public addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<Item>>;
|
||||
public addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<Item>>;
|
||||
public addItem(
|
||||
itemCreate: ItemCreate,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (itemCreate === null || itemCreate === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter itemCreate was null or undefined when calling addItem.',
|
||||
);
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
/**
|
||||
* Adds a new item.
|
||||
* @endpoint post /api/inse-service/items
|
||||
* @param itemCreate
|
||||
* @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 addItem(itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Item>;
|
||||
public addItem(itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Item>>;
|
||||
public addItem(itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Item>>;
|
||||
public addItem(itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (itemCreate === null || itemCreate === undefined) {
|
||||
throw new Error('Required parameter itemCreate was null or undefined when calling addItem.');
|
||||
}
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'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 (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
// 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/inse-service/items`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: itemCreate,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
/**
|
||||
* Deletes the item with the id.
|
||||
* @endpoint delete /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @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 deleteItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
||||
public deleteItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
||||
public deleteItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
||||
public deleteItem(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling deleteItem.');
|
||||
}
|
||||
|
||||
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 (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", 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 responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (
|
||||
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
||||
) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
/**
|
||||
* Returns the item with the id.
|
||||
* @endpoint get /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @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 getItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Item>;
|
||||
public getItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Item>>;
|
||||
public getItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Item>>;
|
||||
public getItem(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getItem.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('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/items`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('post', `${basePath}${localVarPath}`, {
|
||||
context: localVarHttpContext,
|
||||
body: itemCreate,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Returns a page of items.
|
||||
* @endpoint get /api/inse-service/items
|
||||
* @param pageOffset The page offset.
|
||||
* @param pageSize The page size.
|
||||
* @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 getItems(pageOffset?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ItemPage>;
|
||||
public getItems(pageOffset?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ItemPage>>;
|
||||
public getItems(pageOffset?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ItemPage>>;
|
||||
public getItems(pageOffset?: number, pageSize?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
/**
|
||||
* Deletes the item with the id.
|
||||
* @endpoint delete /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @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 deleteItem(
|
||||
id: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any>;
|
||||
public deleteItem(
|
||||
id: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<any>>;
|
||||
public deleteItem(
|
||||
id: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<any>>;
|
||||
public deleteItem(
|
||||
id: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter id was null or undefined when calling deleteItem.',
|
||||
);
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>pageOffset, 'pageOffset');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>pageSize, 'pageSize');
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<ItemPage>('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;
|
||||
/**
|
||||
* Updates the item with the id.
|
||||
* @endpoint put /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @param itemCreate
|
||||
* @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 updateItem(id: number, itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Item>;
|
||||
public updateItem(id: number, itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Item>>;
|
||||
public updateItem(id: number, itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Item>>;
|
||||
public updateItem(id: number, itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling updateItem.');
|
||||
}
|
||||
if (itemCreate === null || itemCreate === undefined) {
|
||||
throw new Error('Required parameter itemCreate was null or undefined when calling updateItem.');
|
||||
}
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'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 (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
// 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/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('put', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: itemCreate,
|
||||
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/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', 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,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the item with the id.
|
||||
* @endpoint get /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @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 getItem(
|
||||
id: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<Item>;
|
||||
public getItem(
|
||||
id: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<Item>>;
|
||||
public getItem(
|
||||
id: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<Item>>;
|
||||
public getItem(
|
||||
id: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter id was null or undefined when calling getItem.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (
|
||||
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
||||
) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('get', `${basePath}${localVarPath}`, {
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a page of items.
|
||||
* @endpoint get /api/inse-service/items
|
||||
* @param pageOffset The page offset.
|
||||
* @param pageSize The page size.
|
||||
* @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 getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<ItemPage>;
|
||||
public getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<ItemPage>>;
|
||||
public getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<ItemPage>>;
|
||||
public getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
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>pageOffset,
|
||||
'pageOffset',
|
||||
);
|
||||
localVarQueryParameters = this.addToHttpParams(
|
||||
localVarQueryParameters,
|
||||
<any>pageSize,
|
||||
'pageSize',
|
||||
);
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (
|
||||
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
||||
) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/inse-service/items`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<ItemPage>(
|
||||
'get',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the item with the id.
|
||||
* @endpoint put /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @param itemCreate
|
||||
* @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 updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<Item>;
|
||||
public updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<Item>>;
|
||||
public updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<Item>>;
|
||||
public updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter id was null or undefined when calling updateItem.',
|
||||
);
|
||||
}
|
||||
if (itemCreate === null || itemCreate === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter itemCreate was null or undefined when calling updateItem.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (bearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders(
|
||||
'bearer',
|
||||
'Authorization',
|
||||
localVarHeaders,
|
||||
'Bearer ',
|
||||
);
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined =
|
||||
options?.httpHeaderAccept ??
|
||||
this.configuration.selectHeaderAccept(['application/json']);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set(
|
||||
'Accept',
|
||||
localVarHttpHeaderAcceptSelected,
|
||||
);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext =
|
||||
options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
// 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/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Item>('put', `${basePath}${localVarPath}`, {
|
||||
context: localVarHttpContext,
|
||||
body: itemCreate,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,77 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { Item } from '../model/models';
|
||||
import { ItemCreate } from '../model/models';
|
||||
import { ItemPage } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface ItemsServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Adds a new item.
|
||||
*
|
||||
* @endpoint post /api/inse-service/items
|
||||
* @param itemCreate
|
||||
*/
|
||||
addItem(
|
||||
itemCreate: ItemCreate,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<Item>;
|
||||
|
||||
/**
|
||||
* Deletes the item with the id.
|
||||
*
|
||||
* @endpoint delete /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
*/
|
||||
deleteItem(id: number, extraHttpRequestParams?: any): Observable<any>;
|
||||
|
||||
/**
|
||||
* Returns the item with the id.
|
||||
*
|
||||
* @endpoint get /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
*/
|
||||
getItem(id: number, extraHttpRequestParams?: any): Observable<Item>;
|
||||
|
||||
/**
|
||||
* Returns a page of items.
|
||||
*
|
||||
* @endpoint get /api/inse-service/items
|
||||
* @param pageOffset The page offset.
|
||||
* @param pageSize The page size.
|
||||
*/
|
||||
getItems(
|
||||
pageOffset?: number,
|
||||
pageSize?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<ItemPage>;
|
||||
|
||||
/**
|
||||
* Updates the item with the id.
|
||||
*
|
||||
* @endpoint put /api/inse-service/items/{id}
|
||||
* @param id The item id.
|
||||
* @param itemCreate
|
||||
*/
|
||||
updateItem(
|
||||
id: number,
|
||||
itemCreate: ItemCreate,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<Item>;
|
||||
}
|
||||
@@ -1,172 +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.
|
||||
*/
|
||||
/* 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';
|
||||
|
||||
// @ts-ignore
|
||||
import { CollaborationNetwork } from '../model/collaboration-network';
|
||||
// @ts-ignore
|
||||
import { FilterProperties } from '../model/filter-properties';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/http-validation-error';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
import { PersonNetworkServiceInterface } from './person-network.serviceInterface';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class PersonNetworkService
|
||||
extends BaseService
|
||||
implements PersonNetworkServiceInterface
|
||||
{
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a person\'s collaboration network.
|
||||
* Returns a person\'s collaboration network based on their works and co-authors.
|
||||
* @endpoint post /api/person/network/{raw_user_id}
|
||||
* @param rawUserId The raw user ID of the person.
|
||||
* @param filterProperties
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<CollaborationNetwork>;
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (rawUserId === null || rawUserId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.',
|
||||
);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
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/person/network/${this.configuration.encodeParam({ name: 'rawUserId', value: rawUserId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<CollaborationNetwork>(
|
||||
'post',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: filterProperties,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined
|
||||
? { transferCache: localVarTransferCache }
|
||||
: {}),
|
||||
reportProgress: reportProgress,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { CollaborationNetwork } from '../model/models';
|
||||
import { FilterProperties } from '../model/models';
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface PersonNetworkServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Get a person\'s collaboration network.
|
||||
* Returns a person\'s collaboration network based on their works and co-authors.
|
||||
* @endpoint post /api/person/network/{raw_user_id}
|
||||
* @param rawUserId The raw user ID of the person.
|
||||
* @param filterProperties
|
||||
*/
|
||||
getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<CollaborationNetwork>;
|
||||
}
|
||||
@@ -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 { CollaborationNetwork } from '../model/collaborationNetwork';
|
||||
@@ -30,139 +24,86 @@ import { FilterProperties } from '../model/filterProperties';
|
||||
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 PersonNetworkService extends BaseService {
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
||||
@Optional() configuration?: Configuration,
|
||||
) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a person\'s collaboration network.
|
||||
* Returns a person\'s collaboration network based on their works and co-authors.
|
||||
* @endpoint post /api/person/network/{raw_user_id}
|
||||
* @param rawUserId The raw user ID of the person.
|
||||
* @param filterProperties
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<CollaborationNetwork>;
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpResponse<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<HttpEvent<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(
|
||||
rawUserId: string,
|
||||
filterProperties?: FilterProperties,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false,
|
||||
options?: {
|
||||
httpHeaderAccept?: 'application/json';
|
||||
context?: HttpContext;
|
||||
transferCache?: boolean;
|
||||
},
|
||||
): Observable<any> {
|
||||
if (rawUserId === null || rawUserId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.',
|
||||
);
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
/**
|
||||
* Get a person\'s collaboration network.
|
||||
* Returns a person\'s collaboration network based on their works and co-authors.
|
||||
* @endpoint post /api/person/network/{raw_user_id}
|
||||
* @param rawUserId The raw user ID of the person.
|
||||
* @param filterProperties
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CollaborationNetwork>;
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CollaborationNetwork>>;
|
||||
public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (rawUserId === null || rawUserId === undefined) {
|
||||
throw new Error('Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.');
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
||||
// 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/person/network/${this.configuration.encodeParam({name: "rawUserId", value: rawUserId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<CollaborationNetwork>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: filterProperties,
|
||||
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;
|
||||
|
||||
// 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/person/network/${this.configuration.encodeParam({ name: 'rawUserId', value: rawUserId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<CollaborationNetwork>(
|
||||
'post',
|
||||
`${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: filterProperties,
|
||||
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
@@ -1,226 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AuthorsListResponse } from '../model/models';
|
||||
import { CustomAuthorsListResponse } from '../model/models';
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { PersonBio } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface PersonsServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Generates a bio for a person by author ID.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/bio
|
||||
* @param authorId OpenAlex author ID (e.g., A5093075883)
|
||||
* @param include Comma-separated list to include tags
|
||||
*/
|
||||
generatePersonBio(
|
||||
authorId: string,
|
||||
include?: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<PersonBio>;
|
||||
|
||||
/**
|
||||
* Searches for person by ID.
|
||||
*
|
||||
* @endpoint get /api/inse-service/person/{id}
|
||||
* @param id OpenAlex author ID
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
*/
|
||||
getPersonByID(
|
||||
id: string,
|
||||
include: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for person by ID.
|
||||
*
|
||||
* @endpoint get /api/inse-service/person/{id}
|
||||
* @param id OpenAlex author ID
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
*/
|
||||
getPersonByID_1(
|
||||
id: string,
|
||||
include: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for persons by ID or name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/search
|
||||
* @param authorId OpenAlex author ID (e.g., A5093075883)
|
||||
* @param query Search query (e.g., Arman AND Arzani)
|
||||
* @param include Comma-separated include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, sources, counts_by_year, works_api_url, dates, cited_by_count_boost
|
||||
*/
|
||||
searchPersons(
|
||||
authorId?: string,
|
||||
query?: string,
|
||||
include?: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for person by name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/autocomplete
|
||||
* @param authorName Authors name (e.g., Arman Arzani)
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
*/
|
||||
searchPersonsAutocomplete(
|
||||
authorName: string,
|
||||
include: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for person by name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/autocomplete
|
||||
* @param authorName Authors name (e.g., Arman Arzani)
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
*/
|
||||
searchPersonsAutocomplete_2(
|
||||
authorName: string,
|
||||
include: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for persons by institution name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/searchByInstitution
|
||||
* @param institutionName Institution name (e.g., MIT, Oxford University)
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
* @param limit Limit of search page results
|
||||
* @param pageOffset Offset of the result page
|
||||
*/
|
||||
searchPersonsByInstitution(
|
||||
institutionName: string,
|
||||
include: string,
|
||||
limit?: number,
|
||||
pageOffset?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for persons by institution name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/searchByInstitution
|
||||
* @param institutionName Institution name (e.g., MIT, Oxford University)
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
* @param limit Limit of search page results
|
||||
* @param pageOffset Offset of the result page
|
||||
*/
|
||||
searchPersonsByInstitution_3(
|
||||
institutionName: string,
|
||||
include: string,
|
||||
limit?: number,
|
||||
pageOffset?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for person by name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/searchByName
|
||||
* @param authorName Authors name (e.g., Arman Arzani)
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
* @param limit Limit of search page results
|
||||
* @param pageOffset Offset of the result page
|
||||
*/
|
||||
searchPersonsByName(
|
||||
authorName: string,
|
||||
include: string,
|
||||
limit?: number,
|
||||
pageOffset?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for person by name.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/searchByName
|
||||
* @param authorName Authors name (e.g., Arman Arzani)
|
||||
* @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ...
|
||||
* @param limit Limit of search page results
|
||||
* @param pageOffset Offset of the result page
|
||||
*/
|
||||
searchPersonsByName_4(
|
||||
authorName: string,
|
||||
include: string,
|
||||
limit?: number,
|
||||
pageOffset?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for persons with advanced filters (Topic & Institution) and pagination.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/search-list
|
||||
* @param query Search query (e.g., Arman AND Arzani)
|
||||
* @param institutionName Filter by institution name
|
||||
* @param topic Filter by topic display names
|
||||
* @param page Page number (1-indexed)
|
||||
* @param pageSize Results per page
|
||||
* @param include Comma-separated include tags
|
||||
* @param strict Strict institution search by target year
|
||||
* @param filterMode Filter mode: \'in\' or \'from\'
|
||||
* @param filterYear Filter year
|
||||
*/
|
||||
searchPersonsList(
|
||||
query?: string,
|
||||
institutionName?: string,
|
||||
topic?: Array<string>,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
include?: string,
|
||||
strict?: boolean,
|
||||
filterMode?: string,
|
||||
filterYear?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<CustomAuthorsListResponse>;
|
||||
|
||||
/**
|
||||
* Searches for persons with advanced filters (Topic & Institution) and pagination.
|
||||
*
|
||||
* @endpoint get /api/inse-service/persons/search-list
|
||||
* @param query Search query (e.g., Arman AND Arzani)
|
||||
* @param institutionName Filter by institution name
|
||||
* @param topic Filter by topic display names
|
||||
* @param page Page number (1-indexed)
|
||||
* @param pageSize Results per page
|
||||
* @param include Comma-separated include tags
|
||||
* @param strict Strict institution search by target year
|
||||
* @param filterMode Filter mode: \'in\' or \'from\'
|
||||
* @param filterYear Filter year
|
||||
*/
|
||||
searchPersonsList_5(
|
||||
query?: string,
|
||||
institutionName?: string,
|
||||
topic?: Array<string>,
|
||||
page?: number,
|
||||
pageSize?: number,
|
||||
include?: string,
|
||||
strict?: boolean,
|
||||
filterMode?: string,
|
||||
filterYear?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<CustomAuthorsListResponse>;
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
/* 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';
|
||||
|
||||
// @ts-ignore
|
||||
import { BundProject } from '../model/bundProject';
|
||||
// @ts-ignore
|
||||
import { BundProjectPage } from '../model/bundProjectPage';
|
||||
// @ts-ignore
|
||||
import { EuProjectPage } from '../model/euProjectPage';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProjectsService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a bund project by its project ID.
|
||||
* Returns a bund project based on its project ID.
|
||||
* @endpoint get /api/projects/bund/{bund_project_id}
|
||||
* @param bundProjectId The ID of the bund project 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 getBundProjectById(bundProjectId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<BundProject>;
|
||||
public getBundProjectById(bundProjectId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<BundProject>>;
|
||||
public getBundProjectById(bundProjectId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<BundProject>>;
|
||||
public getBundProjectById(bundProjectId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (bundProjectId === null || bundProjectId === undefined) {
|
||||
throw new Error('Required parameter bundProjectId was null or undefined when calling getBundProjectById.');
|
||||
}
|
||||
|
||||
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/projects/bund/${this.configuration.encodeParam({name: "bundProjectId", value: bundProjectId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<BundProject>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bund projects.
|
||||
* Returns a page of bund projects based on the provided pagination parameters and optional institution filter.
|
||||
* @endpoint get /api/projects/bund/search
|
||||
* @param institutionId The institution ID to filter by.
|
||||
* @param page The page number.
|
||||
* @param size The page size.
|
||||
* @param sortBy The field to sort by.
|
||||
* @param sortDirection The sort direction (asc or desc).
|
||||
* @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 getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<BundProjectPage>;
|
||||
public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<BundProjectPage>>;
|
||||
public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<BundProjectPage>>;
|
||||
public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: 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 getBundProjects.');
|
||||
}
|
||||
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>institutionId, 'institution_id');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>page, 'page');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>size, 'size');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>sortBy, 'sort_by');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>sortDirection, 'sort_direction');
|
||||
|
||||
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/projects/bund/search`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<BundProjectPage>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get EU projects.
|
||||
* Returns a page of EU projects based on the provided pagination parameters and optional institution filter.
|
||||
* @endpoint get /api/projects/eu/search
|
||||
* @param institutionId The institution ID to filter by.
|
||||
* @param page The page number.
|
||||
* @param size The page size.
|
||||
* @param sortBy The field to sort by.
|
||||
* @param sortDirection The sort direction (asc or desc).
|
||||
* @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 getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<EuProjectPage>;
|
||||
public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<EuProjectPage>>;
|
||||
public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<EuProjectPage>>;
|
||||
public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: 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 getEuProjects.');
|
||||
}
|
||||
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>institutionId, 'institution_id');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>page, 'page');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>size, 'size');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>sortBy, 'sort_by');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>sortDirection, 'sort_direction');
|
||||
|
||||
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/projects/eu/search`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<EuProjectPage>('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
@@ -1,100 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { AutocompleteResponse } from '../model/models';
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { TopicsListResponse } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface TopicsServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Returns topic options for autocomplete inputs.
|
||||
*
|
||||
* @endpoint get /api/topics/autocomplete
|
||||
* @param query Topic search text, for example \'machine learning\'.
|
||||
* @param domainId Optional OpenAlex domain id filter.
|
||||
* @param fieldId Optional OpenAlex field id filter.
|
||||
* @param subfieldId Optional OpenAlex subfield id filter.
|
||||
* @param limit Maximum number of autocomplete options.
|
||||
*/
|
||||
autocompleteTopics(
|
||||
query: string,
|
||||
domainId?: string,
|
||||
fieldId?: string,
|
||||
subfieldId?: string,
|
||||
limit?: number,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<AutocompleteResponse>;
|
||||
|
||||
/**
|
||||
* Builds the topic hierarchy cache.
|
||||
*
|
||||
* @endpoint get /api/inse-service/topics/cache
|
||||
* @param pageSize Page size for each search page.
|
||||
* @param saveJson Persist cache JSON to data folder.
|
||||
*/
|
||||
buildTopicCache(
|
||||
pageSize?: number,
|
||||
saveJson?: boolean,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<object>;
|
||||
|
||||
/**
|
||||
* Counts topic hierarchy occurrences from cache.
|
||||
*
|
||||
* @endpoint get /api/inse-service/topics/count
|
||||
* @param topic Topic names (repeat parameter).
|
||||
*/
|
||||
countTopicHierarchy(
|
||||
topic: Array<string>,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<object>;
|
||||
|
||||
/**
|
||||
* Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics).
|
||||
*
|
||||
* @endpoint get /api/inse-service/topics/hierarchy
|
||||
*/
|
||||
getTopicHierarchy(extraHttpRequestParams?: any): Observable<object>;
|
||||
|
||||
/**
|
||||
* Returns a list of OpenAlex topics.
|
||||
*
|
||||
* @endpoint get /api/topics
|
||||
* @param search Full-text search, for example \'machine learning\'.
|
||||
* @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'.
|
||||
* @param sort Sort field, for example \'works_count:desc\'.
|
||||
* @param groupBy OpenAlex group_by field, for example \'domain.id\'.
|
||||
* @param perPage Results per page.
|
||||
* @param page Page number. Use cursor for deep pagination.
|
||||
* @param cursor Cursor pagination token. Use \'*\' to start.
|
||||
* @param sample Random sample size. Cannot be combined with sort or page.
|
||||
* @param select Comma-separated fields to return.
|
||||
*/
|
||||
listTopics(
|
||||
search?: string,
|
||||
filter?: string,
|
||||
sort?: string,
|
||||
groupBy?: string,
|
||||
perPage?: number,
|
||||
page?: number,
|
||||
cursor?: string,
|
||||
sample?: number,
|
||||
select?: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<TopicsListResponse>;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,98 +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 { HttpHeaders } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { HTTPValidationError } from '../model/models';
|
||||
import { TopicCount } from '../model/models';
|
||||
import { TopicsByTime } from '../model/models';
|
||||
import { Work } from '../model/models';
|
||||
import { WorkPage } from '../model/models';
|
||||
import { WorksListResponse } from '../model/models';
|
||||
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
export interface WorksServiceInterface {
|
||||
defaultHeaders: HttpHeaders;
|
||||
configuration: Configuration;
|
||||
|
||||
/**
|
||||
* Returns all works for an author.
|
||||
*
|
||||
* @endpoint get /api/works/{author_id}/all
|
||||
* @param authorId The author id, for example A5023888391.
|
||||
*/
|
||||
getAllAuthorWorks(
|
||||
authorId: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<WorksListResponse>;
|
||||
|
||||
/**
|
||||
* Returns a page of works for an author.
|
||||
*
|
||||
* @endpoint get /api/works/{author_id}
|
||||
* @param authorId The author id, for example A5023888391.
|
||||
* @param page The page number.
|
||||
* @param size The page size.
|
||||
* @param publicationYear Filter by publication year. Can be repeated.
|
||||
* @param type Filter by publication type. Can be repeated.
|
||||
* @param language Filter by language code. Can be repeated.
|
||||
* @param institutionId Filter by OpenAlex institution id. Can be repeated.
|
||||
* @param topicId Filter by OpenAlex topic id. Can be repeated.
|
||||
*/
|
||||
getAuthorWorks(
|
||||
authorId: string,
|
||||
page?: number,
|
||||
size?: number,
|
||||
publicationYear?: Array<number>,
|
||||
type?: Array<string>,
|
||||
language?: Array<string>,
|
||||
institutionId?: Array<string>,
|
||||
topicId?: Array<string>,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<WorkPage>;
|
||||
|
||||
/**
|
||||
* Returns work counts per primary topic for an author.
|
||||
*
|
||||
* @endpoint get /api/works/{author_id}/primary-topic-counts
|
||||
* @param authorId The author id, for example A5023888391.
|
||||
*/
|
||||
getPrimaryTopicCountsByAuthor(
|
||||
authorId: string,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<Array<TopicCount>>;
|
||||
|
||||
/**
|
||||
* Returns topics grouped by publication year for an author.
|
||||
*
|
||||
* @endpoint get /api/works/{author_id}/topics-by-time
|
||||
* @param authorId The author id, for example A5023888391.
|
||||
* @param maxTopicsPerYear The maximum number of topics per year.
|
||||
* @param targetPublications Target number of publications used for the timeline. Complete years are always included.
|
||||
* @param includeAll If true, all publications are used for the timeline.
|
||||
*/
|
||||
getTopicsByTimeByAuthor(
|
||||
authorId: string,
|
||||
maxTopicsPerYear?: number,
|
||||
targetPublications?: number,
|
||||
includeAll?: boolean,
|
||||
extraHttpRequestParams?: any,
|
||||
): Observable<TopicsByTime>;
|
||||
|
||||
/**
|
||||
* Returns one publication.
|
||||
*
|
||||
* @endpoint get /api/works/detail/{work_id}
|
||||
* @param workId The OpenAlex work id, for example W2741809807.
|
||||
*/
|
||||
getWork(workId: string, extraHttpRequestParams?: any): Observable<Work>;
|
||||
}
|
||||
+171
-197
@@ -1,219 +1,193 @@
|
||||
import {
|
||||
HttpHeaders,
|
||||
HttpParams,
|
||||
HttpParameterCodec,
|
||||
} from '@angular/common/http';
|
||||
import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http';
|
||||
import { Param } from './param';
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
apiKeys?: { [key: string]: string };
|
||||
username?: string;
|
||||
password?: string;
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
/**
|
||||
* Takes care of encoding query- and form-parameters.
|
||||
*/
|
||||
encoder?: HttpParameterCodec;
|
||||
/**
|
||||
* Override the default method for encoding path parameters in various
|
||||
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
|
||||
* <p>
|
||||
* See {@link README.md} for more details
|
||||
* </p>
|
||||
*/
|
||||
encodeParam?: (param: Param) => string;
|
||||
/**
|
||||
* The keys are the names in the securitySchemes section of the OpenAPI
|
||||
* document. They should map to the value used for authentication
|
||||
* minus any standard prefixes such as 'Basic' or 'Bearer'.
|
||||
*/
|
||||
credentials?: { [key: string]: string | (() => string | undefined) };
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
apiKeys?: {[ key: string ]: string};
|
||||
username?: string;
|
||||
password?: string;
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
/**
|
||||
* Takes care of encoding query- and form-parameters.
|
||||
*/
|
||||
encoder?: HttpParameterCodec;
|
||||
/**
|
||||
* Override the default method for encoding path parameters in various
|
||||
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
|
||||
* <p>
|
||||
* See {@link README.md} for more details
|
||||
* </p>
|
||||
*/
|
||||
encodeParam?: (param: Param) => string;
|
||||
/**
|
||||
* The keys are the names in the securitySchemes section of the OpenAPI
|
||||
* document. They should map to the value used for authentication
|
||||
* minus any standard prefixes such as 'Basic' or 'Bearer'.
|
||||
*/
|
||||
credentials?: {[ key: string ]: string | (() => string | undefined)};
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
apiKeys?: { [key: string]: string };
|
||||
username?: string;
|
||||
password?: string;
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
/**
|
||||
* Takes care of encoding query- and form-parameters.
|
||||
*/
|
||||
encoder?: HttpParameterCodec;
|
||||
/**
|
||||
* Encoding of various path parameter
|
||||
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
|
||||
* <p>
|
||||
* See {@link README.md} for more details
|
||||
* </p>
|
||||
*/
|
||||
encodeParam: (param: Param) => string;
|
||||
/**
|
||||
* The keys are the names in the securitySchemes section of the OpenAPI
|
||||
* document. They should map to the value used for authentication
|
||||
* minus any standard prefixes such as 'Basic' or 'Bearer'.
|
||||
*/
|
||||
credentials: { [key: string]: string | (() => string | undefined) };
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
apiKeys?: {[ key: string ]: string};
|
||||
username?: string;
|
||||
password?: string;
|
||||
/**
|
||||
* @deprecated Since 5.0. Use credentials instead
|
||||
*/
|
||||
accessToken?: string | (() => string);
|
||||
basePath?: string;
|
||||
withCredentials?: boolean;
|
||||
/**
|
||||
* Takes care of encoding query- and form-parameters.
|
||||
*/
|
||||
encoder?: HttpParameterCodec;
|
||||
/**
|
||||
* Encoding of various path parameter
|
||||
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
|
||||
* <p>
|
||||
* See {@link README.md} for more details
|
||||
* </p>
|
||||
*/
|
||||
encodeParam: (param: Param) => string;
|
||||
/**
|
||||
* The keys are the names in the securitySchemes section of the OpenAPI
|
||||
* document. They should map to the value used for authentication
|
||||
* minus any standard prefixes such as 'Basic' or 'Bearer'.
|
||||
*/
|
||||
credentials: {[ key: string ]: string | (() => string | undefined)};
|
||||
|
||||
constructor({
|
||||
accessToken,
|
||||
apiKeys,
|
||||
basePath,
|
||||
credentials,
|
||||
encodeParam,
|
||||
encoder,
|
||||
password,
|
||||
username,
|
||||
withCredentials,
|
||||
}: ConfigurationParameters = {}) {
|
||||
if (apiKeys) {
|
||||
this.apiKeys = apiKeys;
|
||||
}
|
||||
if (username !== undefined) {
|
||||
this.username = username;
|
||||
}
|
||||
if (password !== undefined) {
|
||||
this.password = password;
|
||||
}
|
||||
if (accessToken !== undefined) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
if (basePath !== undefined) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (withCredentials !== undefined) {
|
||||
this.withCredentials = withCredentials;
|
||||
}
|
||||
if (encoder) {
|
||||
this.encoder = encoder;
|
||||
}
|
||||
this.encodeParam =
|
||||
encodeParam ?? ((param) => this.defaultEncodeParam(param));
|
||||
this.credentials = credentials ?? {};
|
||||
constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) {
|
||||
if (apiKeys) {
|
||||
this.apiKeys = apiKeys;
|
||||
}
|
||||
if (username !== undefined) {
|
||||
this.username = username;
|
||||
}
|
||||
if (password !== undefined) {
|
||||
this.password = password;
|
||||
}
|
||||
if (accessToken !== undefined) {
|
||||
this.accessToken = accessToken;
|
||||
}
|
||||
if (basePath !== undefined) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
if (withCredentials !== undefined) {
|
||||
this.withCredentials = withCredentials;
|
||||
}
|
||||
if (encoder) {
|
||||
this.encoder = encoder;
|
||||
}
|
||||
this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
|
||||
this.credentials = credentials ?? {};
|
||||
|
||||
// init default bearer credential
|
||||
if (!this.credentials['bearer']) {
|
||||
this.credentials['bearer'] = () => {
|
||||
return typeof this.accessToken === 'function'
|
||||
? this.accessToken()
|
||||
: this.accessToken;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the correct content-type to use for a request.
|
||||
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
||||
* If no content type is found return the first found type if the contentTypes is not empty
|
||||
* @param contentTypes - the array of content types that are available for selection
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType(contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
// init default bearer credential
|
||||
if (!this.credentials['bearer']) {
|
||||
this.credentials['bearer'] = () => {
|
||||
return typeof this.accessToken === 'function'
|
||||
? this.accessToken()
|
||||
: this.accessToken;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const type = contentTypes.find((x: string) => this.isJsonMime(x));
|
||||
if (type === undefined) {
|
||||
return contentTypes[0];
|
||||
}
|
||||
return type;
|
||||
}
|
||||
/**
|
||||
* Select the correct content-type to use for a request.
|
||||
* Uses {@link Configuration#isJsonMime} to determine the correct content-type.
|
||||
* If no content type is found return the first found type if the contentTypes is not empty
|
||||
* @param contentTypes - the array of content types that are available for selection
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderContentType (contentTypes: string[]): string | undefined {
|
||||
if (contentTypes.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Select the correct accept content-type to use for a request.
|
||||
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
||||
* If no content type is found return the first found type if the contentTypes is not empty
|
||||
* @param accepts - the array of content types that are available for selection.
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
const type = contentTypes.find((x: string) => this.isJsonMime(x));
|
||||
if (type === undefined) {
|
||||
return contentTypes[0];
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
const type = accepts.find((x: string) => this.isJsonMime(x));
|
||||
if (type === undefined) {
|
||||
return accepts[0];
|
||||
/**
|
||||
* Select the correct accept content-type to use for a request.
|
||||
* Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
|
||||
* If no content type is found return the first found type if the contentTypes is not empty
|
||||
* @param accepts - the array of content types that are available for selection.
|
||||
* @returns the selected content-type or <code>undefined</code> if no selection could be made.
|
||||
*/
|
||||
public selectHeaderAccept(accepts: string[]): string | undefined {
|
||||
if (accepts.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const type = accepts.find((x: string) => this.isJsonMime(x));
|
||||
if (type === undefined) {
|
||||
return accepts[0];
|
||||
}
|
||||
return type;
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp(
|
||||
'^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$',
|
||||
'i',
|
||||
);
|
||||
return (
|
||||
mime !== null &&
|
||||
(jsonMime.test(mime) ||
|
||||
mime.toLowerCase() === 'application/json-patch+json')
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Check if the given MIME is a JSON MIME.
|
||||
* JSON MIME examples:
|
||||
* application/json
|
||||
* application/json; charset=UTF8
|
||||
* APPLICATION/JSON
|
||||
* application/vnd.company+json
|
||||
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
||||
* @return True if the given MIME is JSON, false otherwise.
|
||||
*/
|
||||
public isJsonMime(mime: string): boolean {
|
||||
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
||||
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
||||
}
|
||||
|
||||
public lookupCredential(key: string): string | undefined {
|
||||
const value = this.credentials[key];
|
||||
return typeof value === 'function' ? value() : value;
|
||||
}
|
||||
public lookupCredential(key: string): string | undefined {
|
||||
const value = this.credentials[key];
|
||||
return typeof value === 'function'
|
||||
? value()
|
||||
: value;
|
||||
}
|
||||
|
||||
public addCredentialToHeaders(
|
||||
credentialKey: string,
|
||||
headerName: string,
|
||||
headers: HttpHeaders,
|
||||
prefix?: string,
|
||||
): HttpHeaders {
|
||||
const value = this.lookupCredential(credentialKey);
|
||||
return value ? headers.set(headerName, (prefix ?? '') + value) : headers;
|
||||
}
|
||||
public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders {
|
||||
const value = this.lookupCredential(credentialKey);
|
||||
return value
|
||||
? headers.set(headerName, (prefix ?? '') + value)
|
||||
: headers;
|
||||
}
|
||||
|
||||
public addCredentialToQuery(
|
||||
credentialKey: string,
|
||||
paramName: string,
|
||||
query: HttpParams,
|
||||
): HttpParams {
|
||||
const value = this.lookupCredential(credentialKey);
|
||||
return value ? query.set(paramName, value) : query;
|
||||
}
|
||||
public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams {
|
||||
const value = this.lookupCredential(credentialKey);
|
||||
return value
|
||||
? query.set(paramName, value)
|
||||
: query;
|
||||
}
|
||||
|
||||
private defaultEncodeParam(param: Param): string {
|
||||
// This implementation exists as fallback for missing configuration
|
||||
// and for backwards compatibility to older typescript-angular generator versions.
|
||||
// It only works for the 'simple' parameter style.
|
||||
// Date-handling only works for the 'date-time' format.
|
||||
// All other styles and Date-formats are probably handled incorrectly.
|
||||
//
|
||||
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
||||
private defaultEncodeParam(param: Param): string {
|
||||
// This implementation exists as fallback for missing configuration
|
||||
// and for backwards compatibility to older typescript-angular generator versions.
|
||||
// It only works for the 'simple' parameter style.
|
||||
// Date-handling only works for the 'date-time' format.
|
||||
// All other styles and Date-formats are probably handled incorrectly.
|
||||
//
|
||||
// But: if that's all you need (i.e.: the most common use-case): no need for customization!
|
||||
|
||||
const value =
|
||||
param.dataFormat === 'date-time' && param.value instanceof Date
|
||||
? (param.value as Date).toISOString()
|
||||
: param.value;
|
||||
const value = param.dataFormat === 'date-time' && param.value instanceof Date
|
||||
? (param.value as Date).toISOString()
|
||||
: param.value;
|
||||
|
||||
return encodeURIComponent(String(value));
|
||||
}
|
||||
return encodeURIComponent(String(value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,16 +5,16 @@ import { HttpParameterCodec } from '@angular/common/http';
|
||||
* Workaround for https://github.com/angular/angular/issues/18261
|
||||
*/
|
||||
export class CustomHttpParameterCodec implements HttpParameterCodec {
|
||||
encodeKey(k: string): string {
|
||||
return encodeURIComponent(k);
|
||||
}
|
||||
encodeValue(v: string): string {
|
||||
return encodeURIComponent(v);
|
||||
}
|
||||
decodeKey(k: string): string {
|
||||
return decodeURIComponent(k);
|
||||
}
|
||||
decodeValue(v: string): string {
|
||||
return decodeURIComponent(v);
|
||||
}
|
||||
encodeKey(k: string): string {
|
||||
return encodeURIComponent(k);
|
||||
}
|
||||
encodeValue(v: string): string {
|
||||
return encodeURIComponent(v);
|
||||
}
|
||||
decodeKey(k: string): string {
|
||||
return decodeURIComponent(k);
|
||||
}
|
||||
decodeValue(v: string): string {
|
||||
return decodeURIComponent(v);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +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 { AuthScope } from './auth-scope';
|
||||
|
||||
export interface AccessGrant {
|
||||
token_type: string;
|
||||
access_token: string;
|
||||
expires_in: number;
|
||||
scope: AuthScope;
|
||||
refresh_token: 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,10 +9,12 @@
|
||||
*/
|
||||
import { AuthScope } from './authScope';
|
||||
|
||||
export interface AccessGrant {
|
||||
token_type: string;
|
||||
access_token: string;
|
||||
expires_in: number;
|
||||
scope: AuthScope;
|
||||
refresh_token: string;
|
||||
|
||||
export interface AccessGrant {
|
||||
token_type: string;
|
||||
access_token: string;
|
||||
expires_in: number;
|
||||
scope: AuthScope;
|
||||
refresh_token: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +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 { AuthAccount } from './auth-account';
|
||||
|
||||
export interface AuthScope {
|
||||
t: string;
|
||||
a: AuthAccount;
|
||||
d?: number | null;
|
||||
r?: Array<string>;
|
||||
}
|
||||
@@ -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 AuthAccount {
|
||||
i: number;
|
||||
l: string;
|
||||
o: number;
|
||||
|
||||
export interface AuthAccount {
|
||||
i: number;
|
||||
l: string;
|
||||
o: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,9 +9,11 @@
|
||||
*/
|
||||
import { AuthAccount } from './authAccount';
|
||||
|
||||
export interface AuthScope {
|
||||
t: string;
|
||||
a: AuthAccount;
|
||||
d?: number | null;
|
||||
r?: Array<string>;
|
||||
|
||||
export interface AuthScope {
|
||||
t: string;
|
||||
a: AuthAccount;
|
||||
d?: number | null;
|
||||
r?: Array<string>;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +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 { DehydratedInstitution } from './dehydrated-institution';
|
||||
|
||||
/**
|
||||
* AuthorAffiliationsInner
|
||||
*/
|
||||
export interface AuthorAffiliationsInner {
|
||||
institution?: DehydratedInstitution | null;
|
||||
years?: Array<number> | null;
|
||||
}
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AuthorCountsByYearInner
|
||||
*/
|
||||
export interface AuthorCountsByYearInner {
|
||||
year?: number | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
}
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* External identifiers:
|
||||
*/
|
||||
export interface AuthorIds {
|
||||
openalex?: string | null;
|
||||
orcid?: string | null;
|
||||
scopus?: string | null;
|
||||
}
|
||||
@@ -1,26 +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 { CollaborationNetworkNodeType } from './collaboration-network-node-type';
|
||||
|
||||
export interface AuthorNetworkNode {
|
||||
/**
|
||||
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the node.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The category of the node, either \'author\', \'institution\', or \'work\'.
|
||||
*/
|
||||
category: CollaborationNetworkNodeType;
|
||||
}
|
||||
export namespace AuthorNetworkNode {}
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The longest name parsed into its component parts.
|
||||
*/
|
||||
export interface AuthorParsedLongestName {
|
||||
first?: string | null;
|
||||
middle?: string | null;
|
||||
last?: string | null;
|
||||
suffix?: string | null;
|
||||
nickname?: string | null;
|
||||
}
|
||||
@@ -1,16 +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.
|
||||
*/
|
||||
|
||||
export interface AuthorPositionCount {
|
||||
first?: number;
|
||||
middle?: number;
|
||||
last?: number;
|
||||
unknown?: number;
|
||||
}
|
||||
@@ -1,19 +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 { Model2YrMeanCitedness } from './model2-yr-mean-citedness';
|
||||
|
||||
/**
|
||||
* Citation metrics:
|
||||
*/
|
||||
export interface AuthorSummaryStats {
|
||||
'2yr_mean_citedness'?: Model2YrMeanCitedness | null;
|
||||
h_index?: number | null;
|
||||
i10_index?: number | null;
|
||||
}
|
||||
@@ -1,39 +1,41 @@
|
||||
/**
|
||||
* 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 { AuthorAffiliationsInner } from './author-affiliations-inner';
|
||||
import { AuthorParsedLongestName } from './author-parsed-longest-name';
|
||||
import { DehydratedInstitution } from './dehydrated-institution';
|
||||
import { AuthorCountsByYearInner } from './author-counts-by-year-inner';
|
||||
import { AuthorIds } from './author-ids';
|
||||
import { AuthorSummaryStats } from './author-summary-stats';
|
||||
import { WorkTopic } from './work-topic';
|
||||
import { AuthorAffiliationsInner } from './authorAffiliationsInner';
|
||||
import { AuthorParsedLongestName } from './authorParsedLongestName';
|
||||
import { DehydratedInstitution } from './dehydratedInstitution';
|
||||
import { AuthorCountsByYearInner } from './authorCountsByYearInner';
|
||||
import { AuthorIds } from './authorIds';
|
||||
import { AuthorSummaryStats } from './authorSummaryStats';
|
||||
import { WorkTopic } from './workTopic';
|
||||
|
||||
|
||||
/**
|
||||
* A person who creates scholarly works
|
||||
*/
|
||||
export interface Author {
|
||||
id?: string | null;
|
||||
orcid?: string | null;
|
||||
display_name?: string | null;
|
||||
display_name_alternatives?: Array<string> | null;
|
||||
longest_name?: string | null;
|
||||
parsed_longest_name?: AuthorParsedLongestName | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
summary_stats?: AuthorSummaryStats | null;
|
||||
affiliations?: Array<AuthorAffiliationsInner> | null;
|
||||
last_known_institutions?: Array<DehydratedInstitution> | null;
|
||||
topics?: Array<WorkTopic> | null;
|
||||
counts_by_year?: Array<AuthorCountsByYearInner> | null;
|
||||
ids?: AuthorIds | null;
|
||||
works_api_url?: string | null;
|
||||
created_date?: string | null;
|
||||
updated_date?: string | null;
|
||||
export interface Author {
|
||||
id?: string | null;
|
||||
orcid?: string | null;
|
||||
display_name?: string | null;
|
||||
display_name_alternatives?: Array<string> | null;
|
||||
longest_name?: string | null;
|
||||
parsed_longest_name?: AuthorParsedLongestName | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
summary_stats?: AuthorSummaryStats | null;
|
||||
affiliations?: Array<AuthorAffiliationsInner> | null;
|
||||
last_known_institutions?: Array<DehydratedInstitution> | null;
|
||||
topics?: Array<WorkTopic> | null;
|
||||
counts_by_year?: Array<AuthorCountsByYearInner> | null;
|
||||
ids?: AuthorIds | null;
|
||||
works_api_url?: string | null;
|
||||
created_date?: string | null;
|
||||
updated_date?: 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,10 +9,12 @@
|
||||
*/
|
||||
import { DehydratedInstitution } from './dehydratedInstitution';
|
||||
|
||||
|
||||
/**
|
||||
* AuthorAffiliationsInner
|
||||
*/
|
||||
export interface AuthorAffiliationsInner {
|
||||
institution?: DehydratedInstitution | null;
|
||||
years?: Array<number> | null;
|
||||
export interface AuthorAffiliationsInner {
|
||||
institution?: DehydratedInstitution | null;
|
||||
years?: Array<number> | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AuthorCountsByYearInner
|
||||
*/
|
||||
export interface AuthorCountsByYearInner {
|
||||
year?: number | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
export interface AuthorCountsByYearInner {
|
||||
year?: number | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* External identifiers:
|
||||
*/
|
||||
export interface AuthorIds {
|
||||
openalex?: string | null;
|
||||
orcid?: string | null;
|
||||
scopus?: string | null;
|
||||
export interface AuthorIds {
|
||||
openalex?: string | null;
|
||||
orcid?: string | null;
|
||||
scopus?: 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,18 +9,22 @@
|
||||
*/
|
||||
import { CollaborationNetworkNodeType } from './collaborationNetworkNodeType';
|
||||
|
||||
export interface AuthorNetworkNode {
|
||||
/**
|
||||
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the node.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The category of the node, either \'author\', \'institution\', or \'work\'.
|
||||
*/
|
||||
category: CollaborationNetworkNodeType;
|
||||
|
||||
export interface AuthorNetworkNode {
|
||||
/**
|
||||
* The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID.
|
||||
*/
|
||||
raw_id: string;
|
||||
/**
|
||||
* The display name of the node.
|
||||
*/
|
||||
display_name: string;
|
||||
/**
|
||||
* The category of the node, either \'author\', \'institution\', or \'work\'.
|
||||
*/
|
||||
category: CollaborationNetworkNodeType;
|
||||
}
|
||||
export namespace AuthorNetworkNode {}
|
||||
export namespace AuthorNetworkNode {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* The longest name parsed into its component parts.
|
||||
*/
|
||||
export interface AuthorParsedLongestName {
|
||||
first?: string | null;
|
||||
middle?: string | null;
|
||||
last?: string | null;
|
||||
suffix?: string | null;
|
||||
nickname?: string | null;
|
||||
export interface AuthorParsedLongestName {
|
||||
first?: string | null;
|
||||
middle?: string | null;
|
||||
last?: string | null;
|
||||
suffix?: string | null;
|
||||
nickname?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +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 interface AuthorPositionCount {
|
||||
first?: number;
|
||||
middle?: number;
|
||||
last?: number;
|
||||
unknown?: number;
|
||||
|
||||
export interface AuthorPositionCount {
|
||||
first?: number;
|
||||
middle?: number;
|
||||
last?: number;
|
||||
unknown?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 { Model2YrMeanCitedness } from './model2YrMeanCitedness';
|
||||
|
||||
|
||||
/**
|
||||
* Citation metrics:
|
||||
*/
|
||||
export interface AuthorSummaryStats {
|
||||
'2yr_mean_citedness'?: Model2YrMeanCitedness | null;
|
||||
h_index?: number | null;
|
||||
i10_index?: number | null;
|
||||
export interface AuthorSummaryStats {
|
||||
'2yr_mean_citedness'?: Model2YrMeanCitedness | null;
|
||||
h_index?: number | null;
|
||||
i10_index?: number | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +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.
|
||||
*/
|
||||
|
||||
export interface AuthorsFilterProperties {
|
||||
/**
|
||||
* The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included.
|
||||
*/
|
||||
allowed_institutions?: Array<string>;
|
||||
/**
|
||||
* The minimum number of collaborations required for an author to be included in the collaboration network.
|
||||
*/
|
||||
min_collaborations?: number;
|
||||
/**
|
||||
* The maximum number of collaborations allowed for an author to be included in the collaboration network.
|
||||
*/
|
||||
max_collaborations?: number;
|
||||
}
|
||||
@@ -1,21 +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 { Meta } from './meta';
|
||||
import { Author } from './author';
|
||||
import { GroupByResult } from './group-by-result';
|
||||
|
||||
/**
|
||||
* AuthorsListResponse
|
||||
*/
|
||||
export interface AuthorsListResponse {
|
||||
meta?: Meta | null;
|
||||
results?: Array<Author> | null;
|
||||
group_by?: Array<GroupByResult> | null;
|
||||
}
|
||||
@@ -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 AuthorsFilterProperties {
|
||||
/**
|
||||
* The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included.
|
||||
*/
|
||||
allowed_institutions?: Array<string>;
|
||||
/**
|
||||
* The minimum number of collaborations required for an author to be included in the collaboration network.
|
||||
*/
|
||||
min_collaborations?: number;
|
||||
/**
|
||||
* The maximum number of collaborations allowed for an author to be included in the collaboration network.
|
||||
*/
|
||||
max_collaborations?: number;
|
||||
|
||||
export interface AuthorsFilterProperties {
|
||||
/**
|
||||
* The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included.
|
||||
*/
|
||||
allowed_institutions?: Array<string>;
|
||||
/**
|
||||
* The minimum number of collaborations required for an author to be included in the collaboration network.
|
||||
*/
|
||||
min_collaborations?: number;
|
||||
/**
|
||||
* The maximum number of collaborations allowed for an author to be included in the collaboration network.
|
||||
*/
|
||||
max_collaborations?: number;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -11,11 +11,13 @@ import { Meta } from './meta';
|
||||
import { Author } from './author';
|
||||
import { GroupByResult } from './groupByResult';
|
||||
|
||||
|
||||
/**
|
||||
* AuthorsListResponse
|
||||
*/
|
||||
export interface AuthorsListResponse {
|
||||
meta?: Meta | null;
|
||||
results?: Array<Author> | null;
|
||||
group_by?: Array<GroupByResult> | null;
|
||||
export interface AuthorsListResponse {
|
||||
meta?: Meta | null;
|
||||
results?: Array<Author> | null;
|
||||
group_by?: Array<GroupByResult> | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
import { DehydratedInstitution } from './dehydrated-institution';
|
||||
import { DehydratedAuthor } from './dehydrated-author';
|
||||
import { DehydratedInstitution } from './dehydratedInstitution';
|
||||
import { DehydratedAuthor } from './dehydratedAuthor';
|
||||
|
||||
|
||||
/**
|
||||
* Author and their affiliation for a work
|
||||
*/
|
||||
export interface Authorship {
|
||||
author_position?: string | null;
|
||||
author?: DehydratedAuthor | null;
|
||||
institutions?: Array<DehydratedInstitution> | null;
|
||||
countries?: Array<string> | null;
|
||||
is_corresponding?: boolean | null;
|
||||
raw_author_name?: string | null;
|
||||
raw_affiliation_strings?: Array<string> | null;
|
||||
export interface Authorship {
|
||||
author_position?: string | null;
|
||||
author?: DehydratedAuthor | null;
|
||||
institutions?: Array<DehydratedInstitution> | null;
|
||||
countries?: Array<string> | null;
|
||||
is_corresponding?: boolean | null;
|
||||
raw_author_name?: string | null;
|
||||
raw_affiliation_strings?: Array<string> | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AutocompleteResponseMeta
|
||||
*/
|
||||
export interface AutocompleteResponseMeta {
|
||||
count?: number | null;
|
||||
db_response_time_ms?: number | null;
|
||||
}
|
||||
@@ -1,22 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* AutocompleteResponseResultsInner
|
||||
*/
|
||||
export interface AutocompleteResponseResultsInner {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
hint?: string | null;
|
||||
cited_by_count?: number | null;
|
||||
works_count?: number | null;
|
||||
entity_type?: string | null;
|
||||
external_id?: string | null;
|
||||
}
|
||||
@@ -1,19 +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 { AutocompleteResponseMeta } from './autocomplete-response-meta';
|
||||
import { AutocompleteResponseResultsInner } from './autocomplete-response-results-inner';
|
||||
|
||||
/**
|
||||
* AutocompleteResponse
|
||||
*/
|
||||
export interface AutocompleteResponse {
|
||||
meta?: AutocompleteResponseMeta | null;
|
||||
results?: Array<AutocompleteResponseResultsInner> | 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
|
||||
@@ -10,10 +10,12 @@
|
||||
import { AutocompleteResponseMeta } from './autocompleteResponseMeta';
|
||||
import { AutocompleteResponseResultsInner } from './autocompleteResponseResultsInner';
|
||||
|
||||
|
||||
/**
|
||||
* AutocompleteResponse
|
||||
*/
|
||||
export interface AutocompleteResponse {
|
||||
meta?: AutocompleteResponseMeta | null;
|
||||
results?: Array<AutocompleteResponseResultsInner> | null;
|
||||
export interface AutocompleteResponse {
|
||||
meta?: AutocompleteResponseMeta | null;
|
||||
results?: Array<AutocompleteResponseResultsInner> | 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AutocompleteResponseMeta
|
||||
*/
|
||||
export interface AutocompleteResponseMeta {
|
||||
count?: number | null;
|
||||
db_response_time_ms?: number | null;
|
||||
export interface AutocompleteResponseMeta {
|
||||
count?: number | null;
|
||||
db_response_time_ms?: number | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* AutocompleteResponseResultsInner
|
||||
*/
|
||||
export interface AutocompleteResponseResultsInner {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
hint?: string | null;
|
||||
cited_by_count?: number | null;
|
||||
works_count?: number | null;
|
||||
entity_type?: string | null;
|
||||
external_id?: string | null;
|
||||
export interface AutocompleteResponseResultsInner {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
hint?: string | null;
|
||||
cited_by_count?: number | null;
|
||||
works_count?: number | null;
|
||||
entity_type?: string | null;
|
||||
external_id?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Award
|
||||
*/
|
||||
export interface Award {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
funder_award_id?: string | null;
|
||||
funder_id?: string | null;
|
||||
funder_display_name?: string | null;
|
||||
doi?: string | null;
|
||||
export interface Award {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
funder_award_id?: string | null;
|
||||
funder_id?: string | null;
|
||||
funder_display_name?: string | null;
|
||||
doi?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* 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 BundProject {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* 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 { BundProject } from './bundProject';
|
||||
|
||||
|
||||
export interface BundProjectPage {
|
||||
/**
|
||||
* The bund projects on this page.
|
||||
*/
|
||||
elements?: Array<BundProject>;
|
||||
/**
|
||||
* The current page number.
|
||||
*/
|
||||
page?: number;
|
||||
/**
|
||||
* The requested page size.
|
||||
*/
|
||||
size?: number;
|
||||
/**
|
||||
* The total number of bund projects.
|
||||
*/
|
||||
total?: number;
|
||||
}
|
||||
|
||||
@@ -0,0 +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.
|
||||
*/
|
||||
import { DisplayCodeSplittedNested } from './displayCodeSplittedNested';
|
||||
|
||||
|
||||
export interface CategoryNested {
|
||||
category?: string | null;
|
||||
code?: string | null;
|
||||
display_code?: string | null;
|
||||
/**
|
||||
* A tokenized hierarchy breakdown of the display code represented as an array of strings.
|
||||
*/
|
||||
display_code_splitted?: Array<string>;
|
||||
/**
|
||||
* Granular, nested breakdowns of the split parts of the display code.
|
||||
*/
|
||||
display_code_splitted_nested?: Array<DisplayCodeSplittedNested>;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
export interface CollaborationNetworkEdge {
|
||||
/**
|
||||
* The raw ID of the source node.
|
||||
*/
|
||||
raw_source_id: string;
|
||||
/**
|
||||
* The raw ID of the target node.
|
||||
*/
|
||||
raw_target_id: string;
|
||||
}
|
||||
@@ -1,17 +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.
|
||||
*/
|
||||
|
||||
export const CollaborationNetworkNodeType = {
|
||||
author: 'author',
|
||||
institution: 'institution',
|
||||
work: 'work',
|
||||
} as const;
|
||||
export type CollaborationNetworkNodeType =
|
||||
(typeof CollaborationNetworkNodeType)[keyof typeof CollaborationNetworkNodeType];
|
||||
@@ -1,41 +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 { FilterInformation } from './filter-information';
|
||||
import { WorkNetworkNode } from './work-network-node';
|
||||
import { CollaborationNetworkEdge } from './collaboration-network-edge';
|
||||
import { InstitutionNetworkNode } from './institution-network-node';
|
||||
import { AuthorNetworkNode } from './author-network-node';
|
||||
|
||||
export interface CollaborationNetwork {
|
||||
/**
|
||||
* The raw person ID of the person whose collaboration network this is.
|
||||
*/
|
||||
raw_person_id: string;
|
||||
/**
|
||||
* The work nodes in the collaboration network.
|
||||
*/
|
||||
work_nodes: Array<WorkNetworkNode>;
|
||||
/**
|
||||
* The author nodes in the collaboration network.
|
||||
*/
|
||||
author_nodes: Array<AuthorNetworkNode>;
|
||||
/**
|
||||
* The institution nodes in the collaboration network.
|
||||
*/
|
||||
institution_nodes: Array<InstitutionNetworkNode>;
|
||||
/**
|
||||
* The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I
|
||||
*/
|
||||
collaboration_edges: Array<CollaborationNetworkEdge>;
|
||||
/**
|
||||
* The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network.
|
||||
*/
|
||||
filter_information: FilterInformation;
|
||||
}
|
||||
@@ -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
|
||||
@@ -13,29 +13,31 @@ import { CollaborationNetworkEdge } from './collaborationNetworkEdge';
|
||||
import { InstitutionNetworkNode } from './institutionNetworkNode';
|
||||
import { AuthorNetworkNode } from './authorNetworkNode';
|
||||
|
||||
export interface CollaborationNetwork {
|
||||
/**
|
||||
* The raw person ID of the person whose collaboration network this is.
|
||||
*/
|
||||
raw_person_id: string;
|
||||
/**
|
||||
* The work nodes in the collaboration network.
|
||||
*/
|
||||
work_nodes: Array<WorkNetworkNode>;
|
||||
/**
|
||||
* The author nodes in the collaboration network.
|
||||
*/
|
||||
author_nodes: Array<AuthorNetworkNode>;
|
||||
/**
|
||||
* The institution nodes in the collaboration network.
|
||||
*/
|
||||
institution_nodes: Array<InstitutionNetworkNode>;
|
||||
/**
|
||||
* The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I
|
||||
*/
|
||||
collaboration_edges: Array<CollaborationNetworkEdge>;
|
||||
/**
|
||||
* The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network.
|
||||
*/
|
||||
filter_information: FilterInformation;
|
||||
|
||||
export interface CollaborationNetwork {
|
||||
/**
|
||||
* The raw person ID of the person whose collaboration network this is.
|
||||
*/
|
||||
raw_person_id: string;
|
||||
/**
|
||||
* The work nodes in the collaboration network.
|
||||
*/
|
||||
work_nodes: Array<WorkNetworkNode>;
|
||||
/**
|
||||
* The author nodes in the collaboration network.
|
||||
*/
|
||||
author_nodes: Array<AuthorNetworkNode>;
|
||||
/**
|
||||
* The institution nodes in the collaboration network.
|
||||
*/
|
||||
institution_nodes: Array<InstitutionNetworkNode>;
|
||||
/**
|
||||
* The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I
|
||||
*/
|
||||
collaboration_edges: Array<CollaborationNetworkEdge>;
|
||||
/**
|
||||
* The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network.
|
||||
*/
|
||||
filter_information: FilterInformation;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 CollaborationNetworkEdge {
|
||||
/**
|
||||
* The raw ID of the source node.
|
||||
*/
|
||||
raw_source_id: string;
|
||||
/**
|
||||
* The raw ID of the target node.
|
||||
*/
|
||||
raw_target_id: string;
|
||||
|
||||
export interface CollaborationNetworkEdge {
|
||||
/**
|
||||
* The raw ID of the source node.
|
||||
*/
|
||||
raw_source_id: string;
|
||||
/**
|
||||
* The raw ID of the target node.
|
||||
*/
|
||||
raw_target_id: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 CollaborationNetworkNodeType = {
|
||||
Author: 'author',
|
||||
Institution: 'institution',
|
||||
Work: 'work',
|
||||
Author: 'author',
|
||||
Institution: 'institution',
|
||||
Work: 'work'
|
||||
} as const;
|
||||
export type CollaborationNetworkNodeType =
|
||||
(typeof CollaborationNetworkNodeType)[keyof typeof CollaborationNetworkNodeType];
|
||||
export type CollaborationNetworkNodeType = typeof CollaborationNetworkNodeType[keyof typeof CollaborationNetworkNodeType];
|
||||
|
||||
|
||||
@@ -1,14 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Cost of this request in USD
|
||||
*/
|
||||
export interface CostUsd {}
|
||||
@@ -1,14 +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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Cost of this request in USD
|
||||
*/
|
||||
export interface CostUsd {}
|
||||
export interface CostUsd {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,37 +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 { AuthorAffiliationsInner } from './author-affiliations-inner';
|
||||
import { AuthorParsedLongestName } from './author-parsed-longest-name';
|
||||
import { DehydratedInstitution } from './dehydrated-institution';
|
||||
import { AuthorCountsByYearInner } from './author-counts-by-year-inner';
|
||||
import { AuthorIds } from './author-ids';
|
||||
import { AuthorSummaryStats } from './author-summary-stats';
|
||||
import { WorkTopic } from './work-topic';
|
||||
|
||||
export interface CustomAuthor {
|
||||
id?: string | null;
|
||||
orcid?: string | null;
|
||||
display_name?: string | null;
|
||||
display_name_alternatives?: Array<string> | null;
|
||||
longest_name?: string | null;
|
||||
parsed_longest_name?: AuthorParsedLongestName | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
summary_stats?: AuthorSummaryStats | null;
|
||||
affiliations?: Array<AuthorAffiliationsInner> | null;
|
||||
last_known_institutions?: Array<DehydratedInstitution> | null;
|
||||
topics?: Array<WorkTopic> | null;
|
||||
counts_by_year?: Array<AuthorCountsByYearInner> | null;
|
||||
ids?: AuthorIds | null;
|
||||
works_api_url?: string | null;
|
||||
created_date?: string | null;
|
||||
updated_date?: string | null;
|
||||
relevance_rating?: string | 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 { Meta } from './meta';
|
||||
import { CustomAuthor } from './custom-author';
|
||||
import { Author } from './author';
|
||||
import { GroupByResult } from './group-by-result';
|
||||
|
||||
export interface CustomAuthorsListResponse {
|
||||
meta?: Meta | null;
|
||||
results?: Array<Author> | null;
|
||||
group_by?: Array<GroupByResult> | null;
|
||||
placeholder?: CustomAuthor | 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
|
||||
@@ -15,23 +15,25 @@ import { AuthorIds } from './authorIds';
|
||||
import { AuthorSummaryStats } from './authorSummaryStats';
|
||||
import { WorkTopic } from './workTopic';
|
||||
|
||||
export interface CustomAuthor {
|
||||
id?: string | null;
|
||||
orcid?: string | null;
|
||||
display_name?: string | null;
|
||||
display_name_alternatives?: Array<string> | null;
|
||||
longest_name?: string | null;
|
||||
parsed_longest_name?: AuthorParsedLongestName | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
summary_stats?: AuthorSummaryStats | null;
|
||||
affiliations?: Array<AuthorAffiliationsInner> | null;
|
||||
last_known_institutions?: Array<DehydratedInstitution> | null;
|
||||
topics?: Array<WorkTopic> | null;
|
||||
counts_by_year?: Array<AuthorCountsByYearInner> | null;
|
||||
ids?: AuthorIds | null;
|
||||
works_api_url?: string | null;
|
||||
created_date?: string | null;
|
||||
updated_date?: string | null;
|
||||
relevance_rating?: string | null;
|
||||
|
||||
export interface CustomAuthor {
|
||||
id?: string | null;
|
||||
orcid?: string | null;
|
||||
display_name?: string | null;
|
||||
display_name_alternatives?: Array<string> | null;
|
||||
longest_name?: string | null;
|
||||
parsed_longest_name?: AuthorParsedLongestName | null;
|
||||
works_count?: number | null;
|
||||
cited_by_count?: number | null;
|
||||
summary_stats?: AuthorSummaryStats | null;
|
||||
affiliations?: Array<AuthorAffiliationsInner> | null;
|
||||
last_known_institutions?: Array<DehydratedInstitution> | null;
|
||||
topics?: Array<WorkTopic> | null;
|
||||
counts_by_year?: Array<AuthorCountsByYearInner> | null;
|
||||
ids?: AuthorIds | null;
|
||||
works_api_url?: string | null;
|
||||
created_date?: string | null;
|
||||
updated_date?: string | null;
|
||||
relevance_rating?: 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
|
||||
@@ -12,9 +12,11 @@ import { CustomAuthor } from './customAuthor';
|
||||
import { Author } from './author';
|
||||
import { GroupByResult } from './groupByResult';
|
||||
|
||||
export interface CustomAuthorsListResponse {
|
||||
meta?: Meta | null;
|
||||
results?: Array<Author> | null;
|
||||
group_by?: Array<GroupByResult> | null;
|
||||
placeholder?: CustomAuthor | null;
|
||||
|
||||
export interface CustomAuthorsListResponse {
|
||||
meta?: Meta | null;
|
||||
results?: Array<Author> | null;
|
||||
group_by?: Array<GroupByResult> | null;
|
||||
placeholder?: CustomAuthor | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts
|
||||
*/
|
||||
export interface DehydratedAuthor {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
orcid?: string | null;
|
||||
}
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts
|
||||
*/
|
||||
export interface DehydratedFunder {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
ror?: string | null;
|
||||
}
|
||||
@@ -1,21 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Dehydrated Institution](/api-reference/institutions#the-dehydratedinstitution-object) — reduced-field version used in nested contexts
|
||||
*/
|
||||
export interface DehydratedInstitution {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
ror?: string | null;
|
||||
country_code?: string | null;
|
||||
type?: string | null;
|
||||
lineage?: Array<string> | null;
|
||||
}
|
||||
@@ -1,26 +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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* [Dehydrated Source](/api-reference/sources#the-dehydratedsource-object) — reduced-field version used in nested contexts
|
||||
*/
|
||||
export interface DehydratedSource {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
issn_l?: string | null;
|
||||
issn?: Array<string> | null;
|
||||
is_oa?: boolean | null;
|
||||
is_in_doaj?: boolean | null;
|
||||
is_core?: boolean | null;
|
||||
host_organization?: string | null;
|
||||
host_organization_name?: string | null;
|
||||
host_organization_lineage?: Array<string> | null;
|
||||
type?: string | null;
|
||||
}
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts
|
||||
*/
|
||||
export interface DehydratedAuthor {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
orcid?: string | null;
|
||||
export interface DehydratedAuthor {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
orcid?: string | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +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.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts
|
||||
*/
|
||||
export interface DehydratedFunder {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
ror?: string | null;
|
||||
export interface DehydratedFunder {
|
||||
id?: string | null;
|
||||
display_name?: string | null;
|
||||
ror?: string | null;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user