Compare commits

...
Author SHA1 Message Date
kallweit 3533b994d0 fix(news): restore changes after rebase
LocationBasedServices/smartguide/pipeline/pr-dev This commit looks good
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-06 23:20:14 +02:00
kallweit 19c6574945 fix(news): highlight full word forms of keywords in article text
LocationBasedServices/smartguide/pipeline/head There was a failure building this commit
LocationBasedServices/smartguide/pipeline/pr-dev There was a failure building this commit
2026-07-06 22:45:19 +02:00
kallweit 0b750d27e7 feat(news-details): add pagination to 'mentioned persons' accordion, expand only one accordion at a time 2026-07-06 22:45:19 +02:00
kallweit 398ea7b56c feat(news): remove unmatched keywords list 2026-07-06 22:45:19 +02:00
kallweit 0176eea873 fix(keywords): adjust prompt to deduplicate and extract keywords in article's language 2026-07-06 22:45:19 +02:00
kallweit b0e8c86743 feat(news): add info icon to accordions 2026-07-06 22:45:19 +02:00
kallweit 03a2954c72 feat(news): redesign news detail page 2026-07-06 22:45:19 +02:00
kallweit b9d382c78a feat(news): wire keywords to OpenAlex topics 2026-07-06 22:43:26 +02:00
kallweit f9f6a58ad5 fix(news): add missing routes 2026-07-06 22:37:40 +02:00
kallweit 5cc110174a feat(news): add preprocessing keyword extraction 2026-07-06 22:37:40 +02:00
kallweit 0a3bf72e14 Merge pull request 'refactor/news-list-ui' (#194) from refactor/news-list-ui into dev
LocationBasedServices/smartguide/pipeline/head This commit looks good
Reviewed-on: #194
2026-07-06 22:00:04 +02:00
kallweit eb94fc5942 fix(news): add title search
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev Build started...
2026-07-06 21:52:40 +02:00
kallweit e868c4a47e refactor(news): change list to card layout 2026-07-06 21:46:56 +02:00
genja c74d0b5b87 Merge pull request 'ui fixes' (#193) from feature/keywords-analysis into dev
LocationBasedServices/smartguide/pipeline/head This commit looks good
Reviewed-on: #193
2026-07-06 15:31:47 +02:00
genja a69f014413 ui fixes
LocationBasedServices/smartguide/pipeline/pr-dev Build queued...
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-06 15:30:43 +02:00
genja cabf819e94 Merge pull request 'added loading component, adjusted ui' (#192) from feature/keywords-analysis into dev
LocationBasedServices/smartguide/pipeline/head This commit looks good
Reviewed-on: #192
2026-07-06 14:50:34 +02:00
genja c243088752 added loading component, adjusted ui
LocationBasedServices/smartguide/pipeline/pr-dev Build queued...
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-06 14:49:24 +02:00
kuzko 1dd032a66c Merge pull request 'feature/FrontendGeneralKeywordSearch' (#191) from feature/FrontendGeneralKeywordSearch into dev
LocationBasedServices/smartguide/pipeline/head This commit looks good
Reviewed-on: #191
2026-07-06 11:43:27 +02:00
Kazgatari 9f03c92bc1 updated old code to remove warnings
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev This commit looks good
2026-07-06 11:35:53 +02:00
Kazgatari 86bced4940 fixed diagramm tooltip cutoff 2026-07-06 11:32:31 +02:00
Kazgatari 4461b26270 changed icons, to match the project icons 2026-07-06 11:22:33 +02:00
Kazgatari 19fd2ac86d Merge branch 'dev' of https://project.nes.uni-due.de/gitea/lbs/smartguide into feature/FrontendGeneralKeywordSearch 2026-07-06 11:05:30 +02:00
Kazgatari e9ba874103 regenerated frontend service 2026-07-06 10:46:36 +02:00
Kazgatari dfb1413b05 Changed trend frontend (Everything in German, stacking chart, y-axis overlap fix, tooltip information addition, recomended institutions layout change) 2026-07-06 10:45:57 +02:00
Kazgatari b5d03c84c4 attempt to optimize backend search time and small modeltype changes 2026-07-06 10:20:42 +02:00
genja ef41c0ad96 Merge pull request 'feature/keywords-analysis' (#190) from feature/keywords-analysis into dev
LocationBasedServices/smartguide/pipeline/head This commit looks good
Reviewed-on: #190
2026-07-05 20:12:26 +02:00
genja a07fadc30e deleted unused TopicChipComponent from person-list
LocationBasedServices/smartguide/pipeline/pr-dev Build queued...
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 20:10:53 +02:00
genja 4bf351cf66 Merge branch 'dev' of nes.uni-due.de:lbs/smartguide into feature/keywords-analysis 2026-07-05 20:01:34 +02:00
Louis f55a37867c Merge pull request 'topic-colored-chips' (#189) from topic-colored-chips into dev
LocationBasedServices/smartguide/pipeline/head This commit looks good
Reviewed-on: #189
2026-07-05 19:59:25 +02:00
genja ae42bc46ed Merge branch 'dev' of nes.uni-due.de:lbs/smartguide into feature/keywords-analysis
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 19:54:35 +02:00
genja c38355c817 minor logic and layout adjustments 2026-07-05 19:53:23 +02:00
Louis 0c004f0cdf Merge remote-tracking branch 'origin/dev' into topic-colored-chips
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev This commit looks good
2026-07-05 19:50:41 +02:00
Mats Paul Tončik 16c0b399c8 feat(frontend/search): added card search template, moved institutions and projects to it
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 19:47:16 +02:00
Louis 3867540a4c refactor(publications, people): unify active topic chip, add loading states
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 19:46:24 +02:00
Louis 32cab01a8b Merge remote-tracking branch 'origin/dev' into topic-colored-chips 2026-07-05 19:40:55 +02:00
genja 2b606b8473 Merge branch 'dev' of nes.uni-due.de:lbs/smartguide into feature/keywords-analysis 2026-07-05 18:36:21 +02:00
genja e0ac41da91 cleaned log outputs
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 18:35:39 +02:00
genja 86bed62ac0 delete button removed for autocompletion field
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 18:10:24 +02:00
genja 1eaf8f8c8f responsivness adjusted 2026-07-05 18:09:59 +02:00
genja 0c3db967b0 added handling autocomplete topics ( no extra backend call anymore) 2026-07-05 18:01:54 +02:00
genja 04eb0f0185 fixed bug with no url content 2026-07-05 18:01:10 +02:00
Mats Paul Tončik b2d965d604 fix(frontend): added label to some query param selectors
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 16:15:41 +02:00
genja 92c4edfb4f added, colored Keywords, legend, loading state on keyword adding, fixed ui
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-07-05 02:27:49 +02:00
genja 79f2aa0263 added "field" field to the Topic model 2026-07-05 02:26:59 +02:00
genja 5878edc4cd added error handling on websocket close 2026-07-05 02:23:18 +02:00
genja f4122263dd added stream interrupt logic by socket close for llm wrapper 2026-07-05 02:22:21 +02:00
genja 20faff13ec fixed concetenated keywords issue 2026-07-05 02:21:26 +02:00
genja 73315457a6 fixed resonsiveness issue 2026-07-05 02:19:38 +02:00
Kazgatari 2703f46575 Implemented scikit normalize batch, fixed blocking elastic search query, changed frontend to resize dynamically, fixed bug in dashboard 2026-07-04 23:12:03 +02:00
Kazgatari 261f97eee0 regenerated frontend with openapi generator gradle service 2026-07-04 21:04:48 +02:00
Kazgatari f4b8d0884c changed and refactored university-ranking to unify ranking and trend. Removed hardcoded placeholder, Whitelisted fields to reduce response size 2026-07-04 21:01:49 +02:00
Kazgatari 1ddc5c42c5 generated frontend services and models 2026-07-03 22:33:32 +02:00
Kazgatari 47fb41105a Parent componentn to diplay different trend diagrams 2026-07-03 22:20:56 +02:00
Kazgatari 4394ced772 Merge branch 'dev' of https://project.nes.uni-due.de/gitea/lbs/smartguide into feature/FrontendGeneralKeywordSearch 2026-07-03 21:25:27 +02:00
Kazgatari 15fc57da51 First demo implementation of trend analysis frontend 2026-07-03 20:04:35 +02:00
Kazgatari 3c910fa0e4 Backend for institution trend analysis (implemented into university ranking) 2026-07-03 19:50:28 +02:00
Louis c1cba4bd4c person cards: limit topic display if too large 2026-07-03 15:54:24 +02:00
Louis d43c406820 publication overview: make Jahr/Typ/Sprache filters searchable
LocationBasedServices/smartguide/pipeline/head There was a failure building this commit
2026-07-03 14:53:30 +02:00
Louis 398df55f50 publication overview: fix institution search 2026-07-03 13:49:19 +02:00
Louis 5888a71b36 publication overview: make institution field expandable 2026-07-03 13:43:31 +02:00
Louis c707064dfb pulbication overview: Make institution field expandable 2026-07-03 13:42:57 +02:00
Louis 8e56b59122 person card: highlight institution when it matches active filter 2026-07-03 13:16:04 +02:00
Louis 6fa5792e5e publication overview: show institution filter as person-card chip with flag 2026-07-03 13:10:13 +02:00
Louis 116492baca person list: style active institution filter as person-card chip 2026-07-03 13:02:09 +02:00
Louis b1fee136ce Merge remote-tracking branch 'origin/dev' into topic-colored-chips 2026-07-03 12:31:34 +02:00
Louis 95ce3a47fc publications overview: make table cells clickable filters with active state 2026-07-03 12:21:39 +02:00
Louis 195fd2d55b Merge remote-tracking branch 'origin/dev' into topic-colored-chips
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-06-30 01:26:14 +02:00
Louis 5d13b07c73 Add field-based color indicators to person search cards filtering 2026-06-30 00:09:37 +02:00
Louis d8aca8ee3e Publication overview filter design updated 2026-06-29 23:52:26 +02:00
Louis 495c7d34e5 timeline legend across full width 2026-06-29 23:40:05 +02:00
Louis 39fdb23942 Replace topic chips in publication detail view with shared topic chips 2026-06-29 22:47:28 +02:00
Louis 0d2c7f93be filter topic chips use same topic color 2026-06-29 22:38:31 +02:00
Louis 7c68a5cd71 Replace topic chips in publication overview with shared topic chips 2026-06-29 22:26:45 +02:00
Louis b69fe4e15c Improve timeline legend width 2026-06-29 21:25:01 +02:00
Louis 873e4bbbec Merge remote-tracking branch 'origin/dev' into topic-colored-chips
LocationBasedServices/smartguide/pipeline/head This commit looks good
2026-06-29 20:33:22 +02:00
Louis f2cf83f63b topic-legend: select fields and subfields separately 2026-06-26 14:16:56 +02:00
Louis 512356e106 topic-legend: highlight selected fields and topic 2026-06-26 13:58:18 +02:00
Louis 309fecf008 use topic chips for active topic filters 2026-06-26 13:35:06 +02:00
Louis 29c954227f use shared topic chips in person card
LocationBasedServices/smartguide/pipeline/head There was a failure building this commit
2026-06-26 12:05:00 +02:00
Louis 1f70f9fe2d Merge remote-tracking branch 'origin/dev' into topic-colored-chips 2026-06-26 11:42:04 +02:00
324 changed files with 24022 additions and 12857 deletions
@@ -38,6 +38,7 @@ def add_entry(index: str, entry: dict):
"news_id": entry["news_id"],
"relevant": int(entry["relevant"]),
"authors": entry["authors"],
"keywords": entry.get("keywords", []),
}
response_data = _send_es_request("POST", endpoint, payload=document_body)
@@ -47,6 +48,13 @@ def add_entry(index: str, entry: dict):
return created_id
def update_entry(index: str, document_id: str, partial_doc: dict):
encoded_document_id = quote(document_id, safe="")
endpoint = f"{INSE_URL}/{index}/_update/{encoded_document_id}"
return _send_es_request("POST", endpoint, payload={"doc": partial_doc})
def get_entry(index: str, document_id: str) -> dict:
encoded_document_id = quote(document_id, safe="")
@@ -103,4 +111,18 @@ def delete_all_entries(index: str):
"query": {"match_all": {}}
}
return _send_es_request("POST", endpoint, payload=payload)
def remove_field_all(index: str, field: str):
endpoint = f"{INSE_URL}/{index}/_update_by_query"
payload = {
"query": {"exists": {"field": field}},
"script": {
"source": f"ctx._source.remove('{field}')",
"lang": "painless",
},
}
return _send_es_request("POST", endpoint, payload=payload)
@@ -23,6 +23,17 @@ SYSTEM_PROMPT_NAMES = ("""
Gib keine Erklärungen und kein Markdown aus, nur das JSON.
""")
SYSTEM_PROMPT_KEYWORDS = ("""
Extrahiere aus dem nachfolgenden Campus-Aktuell-Artikel der Universität Duisburg-Essen die wichtigsten Schlagwörter (Keywords).
Wähle ausschließlich Begriffe oder Phrasen, die tatsächlich im Text vorkommen. Erfinde keine Begriffe, verallgemeinere nicht und nenne keine Oberbegriffe, die nicht im Text stehen.
Übersetze keine Begriffe – verwende ausschließlich Wörter und Phrasen in der Sprache des Artikels.
Gib jedes Schlagwort in seiner Grundform an: Bei deutschen Begriffen Substantive im Nominativ Singular; bei englischen Begriffen Substantive im Singular. Verwende den Plural nur, wenn der Begriff üblicherweise im Plural gebraucht wird.
Vermeide Redundanz: Wenn zwei mögliche Schlagwörter dieselbe Wortbasis teilen (z.B. „Forschung" und „Forschungsprojekt"), nenne nur den spezifischeren Begriff.
Nenne maximal sechs prägnante Begriffe oder kurze Phrasen. Konzentriere dich auf inhaltlich zentrale Begriffe, nicht auf Personennamen oder Datumsangaben.
Antworte ausschließlich mit gültigem JSON in exakt diesem Format: {\"keywords\": [\"Schlagwort\", \"Schlagwort\"]}
Gib keine Erklärungen und kein Markdown aus, nur das JSON.
""")
_client = OpenAI(
base_url=LLM_BASE_URL,
api_key=LLM_API_KEY,
@@ -62,3 +73,14 @@ def extract_names(text: str) -> list[str]:
return data.get("person", [])
except json.JSONDecodeError:
return []
def extract_keywords(text: str) -> list[str]:
result = call(SYSTEM_PROMPT_KEYWORDS, text)
if result is None:
return []
try:
import json
data = json.loads(result)
return data.get("keywords", [])
except json.JSONDecodeError:
return []
+81 -2
View File
@@ -16,10 +16,12 @@ def sync_single_news(news_id, max_retries=3):
news_text = es_client.get_entry("aktuell", news_id)["_source"]["full_content"]
is_news_relevant = llm_client.is_news_relevant(news_text)
authors = llm_client.extract_names(news_text)
keywords = llm_client.extract_keywords(news_text)
new_entry = {
"news_id": news_id,
"relevant": is_news_relevant,
"authors": authors,
"keywords": keywords,
}
es_client.add_entry("aktuell_postproc", new_entry)
return True
@@ -32,6 +34,25 @@ def sync_single_news(news_id, max_retries=3):
print(f"Error: {news_id} - {error}")
return False
def update_keywords_single(postproc_entry, max_retries=3):
doc_id = postproc_entry["_id"]
news_id = postproc_entry["_source"]["news_id"]
attempt = 0
while attempt < max_retries:
try:
news_text = es_client.get_entry("aktuell", news_id)["_source"]["full_content"]
keywords = llm_client.extract_keywords(news_text)
es_client.update_entry("aktuell_postproc", doc_id, {"keywords": keywords})
return True
except Exception as error:
attempt += 1
print(f"Warning updating keywords for news_id {news_id} (Attempt {attempt}/{max_retries})")
if attempt < max_retries:
time.sleep(1)
else:
print(f"Error: {news_id} - {error}")
return False
def main():
parser = argparse.ArgumentParser(description="Synchronize news articles from 'aktuell' index to 'aktuell_postproc' index with relevance and author extraction using LLM.")
@@ -47,6 +68,18 @@ def main():
help="Sync only missing entries from 'aktuell' to 'aktuell_postproc'.",
)
parser.add_argument(
"--update-keywords",
action="store_true",
help="Add 'keywords' to existing 'aktuell_postproc' entries that don't have them yet (keeps relevant/authors).",
)
parser.add_argument(
"--reset-keywords",
action="store_true",
help="Remove the 'keywords' field from all 'aktuell_postproc' entries (keeps relevant/authors). Run before re-extracting with a new prompt.",
)
parser.add_argument(
"--stats",
action="store_true",
@@ -60,11 +93,22 @@ def main():
help="Number of threads for --sync-delta (Default: 4).",
)
parser.add_argument(
"--limit",
type=int,
default=None,
help="Process at most this many entries (used by --update-keywords, e.g. for a smoke test).",
)
args = parser.parse_args()
if args.delete_all:
es_client.delete_all_entries("aktuell_postproc")
if args.reset_keywords:
result = es_client.remove_field_all("aktuell_postproc", "keywords")
print(f"Removed 'keywords' from {result.get('updated', 0)} entries.")
if args.sync_delta:
start_time = time.time()
aktuell_ids_raw = es_client.get_all_entries("aktuell", fields=["_id"])
@@ -96,23 +140,58 @@ def main():
end_time = time.time()
print(f"Sync DONE: {succeeded} entries synced.")
print(f"Time taken: {end_time - start_time} seconds.")
if args.update_keywords:
start_time = time.time()
postproc_entries = es_client.get_all_entries("aktuell_postproc", fields=["news_id", "keywords"])
pending = [entry for entry in postproc_entries if not entry["_source"].get("keywords")]
print(f"Number of entries without keywords: {len(pending)}")
if args.limit is not None:
pending = pending[:args.limit]
total = len(pending)
print(f"Processing {total} entries.")
processed = 0
succeeded = 0
progress_lock = threading.Lock()
with ThreadPoolExecutor(max_workers=args.threads) as executor:
futures = [executor.submit(update_keywords_single, entry) for entry in pending]
for future in as_completed(futures):
was_successful = future.result()
with progress_lock:
processed += 1
if was_successful:
succeeded += 1
print(f"Update keywords: {processed} / {total}")
end_time = time.time()
print(f"Update keywords DONE: {succeeded} entries updated.")
print(f"Time taken: {end_time - start_time} seconds.")
if args.stats:
aktuell_entries = es_client.get_all_entries("aktuell", fields=["_id"])
print(f"Total entries in 'aktuell': {len(aktuell_entries)}")
postproc_entries = es_client.get_all_entries("aktuell_postproc", fields=["_id", "news_id", "relevant", "authors"])
postproc_entries = es_client.get_all_entries("aktuell_postproc", fields=["_id", "news_id", "relevant", "authors", "keywords"])
total_entries = len(postproc_entries)
relevant_count = sum(1 for entry in postproc_entries if entry["_source"]["relevant"] == 1)
irrelevant_count = total_entries - relevant_count
news_with_extracted_names = sum(1 for entry in postproc_entries if entry["_source"]["authors"])
news_without_extracted_names = total_entries - news_with_extracted_names
news_with_keywords = sum(1 for entry in postproc_entries if entry["_source"].get("keywords"))
news_without_keywords = total_entries - news_with_keywords
print(f"Total entries in 'aktuell_postproc': {total_entries}")
print(f"Relevant entries: {relevant_count}")
print(f"Irrelevant entries: {irrelevant_count}")
print(f"Entries with extracted names: {news_with_extracted_names}")
print(f"Entries without extracted names: {news_without_extracted_names}")
print(f"Entries with keywords: {news_with_keywords}")
print(f"Entries without keywords: {news_without_keywords}")
if __name__ == "__main__":
main()
File diff suppressed because one or more lines are too long
+18 -7
View File
@@ -2,7 +2,7 @@ from openai import OpenAI, APIConnectionError
from openai import AsyncOpenAI
from .. import config
from typing import Optional, Dict, Any
import asyncio
def call(
system_prompt: str,
user_prompt: str,
@@ -62,7 +62,7 @@ def _get_response_format(schema, schema_name: Optional[str] = None) -> Dict[str,
async def call_stream(
system_prompt: str,
user_prompt: str,
emit, # EventCallback
emit,
model: str = None,
json_schema=None,
schema_name=None,
@@ -98,15 +98,26 @@ async def call_stream(
stream=True,
)
async for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
full_content += delta
await emit({"type": "llm_chunk", "content": delta})
try:
async for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
full_content += delta
await emit({"type": "llm_chunk", "content": delta})
finally:
# Always release the underlying HTTP connection, whether we
# finished normally, timed out, were cancelled, or emit()
# failed because the client disconnected. This is what
# actually tells the backend to stop generating.
await stream.close()
except APIConnectionError as e:
print(f"Connection error: {e}")
return ""
except asyncio.CancelledError:
# Real cancellation (e.g. asyncio.wait_for timeout, or task.cancel()
# from the router)
raise
except Exception as e:
import traceback
print(f"LLM streaming failed: {type(e).__name__}: {e}")
+24 -167
View File
@@ -126,141 +126,6 @@ async def _get_text_content(url: str) -> str:
logger.error(f"Error processing {url}: {e}")
async def extract_keywords_stream(
query: str,
mode: str,
limit: int,
emit: EventCallback,
) -> ExtractedKeywordsResponse:
start_time = time.time()
timeout_seconds = 60 # configurable
await emit(KeywordsWsEvent(type="status", step="started", message="Starte Keyword-Extraktion").model_dump())
if mode == "url":
await emit(KeywordsWsEvent(type="status", step="fetching_url", message=f"Extrahiere Inhalt von {query}").model_dump())
text = await _get_text_content(query)
await emit(KeywordsWsEvent(type="status", step="content_extracted", message=f"Extrahiert {len(text)} Zeichen").model_dump())
system_prompt = KeywordsPrompt.EXTRACT_WEBSITE_KEYWORDS_PROMPT
else:
text = query
await emit(KeywordsWsEvent(type="status", step="text_received", message=f"Empfangen {len(text)} Zeichen").model_dump())
system_prompt = KeywordsPrompt.EXTRACT_KEYWORDS_TEXT_PROMPT
user_prompt = "\nNow analyze the following text and return ONLY the JSON object.\n"
if limit:
user_prompt += f"\nExtract exactly {limit} keywords for each level (broad, coarse, fine).\n"
user_prompt += f"\nInput:\n{text}"
await emit(KeywordsWsEvent(type="status", step="calling_llm", message="Extrahiere Keywords...").model_dump())
LEVELS = ("broad_keywords", "coarse_grained", "fine_grained")
# Holds only fully validated KeywordEntry dicts for each level
confirmed: Dict[str, List[Dict[str, Any]]] = {level: [] for level in LEVELS}
async def emit_full_results() -> None:
"""Attempt to build and validate the full ExtractedKeywordsLLM model and emit it."""
# Build a dict with all three fields, using empty lists for missing ones
data = {level: confirmed.get(level, []) for level in LEVELS}
try:
validated = ExtractedKeywordsLLM.model_validate(data)
except ValidationError:
# Should not happen if all items are valid, but guard against it
return
await emit(KeywordsWsEvent(type="keywords", keywords=validated.model_dump()).model_dump())
# adds completed keyword chunks to the confirmed dict and emits the full results when new valid items are found
async def on_chunk(event: Dict[str, Any]) -> None:
if event["type"] != "llm_chunk":
await emit(event)
return
try:
partial = partial_json_parser.loads(event.get("_full_content", ""))
except Exception:
return
if not isinstance(partial, dict):
return
grew = False
for level in LEVELS:
current = partial.get(level) or []
idx = len(confirmed[level])
while idx < len(current):
raw_item = current[idx]
try:
validated_item = KeywordEntry.model_validate(raw_item)
except ValidationError:
break # item not complete yet
confirmed[level].append(validated_item.model_dump())
idx += 1
grew = True
if grew:
await emit_full_results()
# Accumulate full_content for incremental parsing
full_content_holder = {"value": ""}
async def emit_wrapper(event: Dict[str, Any]) -> None:
if event["type"] == "llm_chunk":
full_content_holder["value"] += event["content"]
event = {**event, "_full_content": full_content_holder["value"]}
await on_chunk(event)
try:
keywords = await asyncio.wait_for(
llm.call_stream(
system_prompt=system_prompt,
user_prompt=user_prompt,
json_schema=ExtractedKeywordsLLM.model_json_schema(),
schema_name="extracted_keywords",
temperature=0.8,
top_p=0.95,
emit=emit_wrapper,
),
timeout=timeout_seconds,
)
except asyncio.TimeoutError:
await emit(KeywordsWsEvent(type="error", message=f"LLM call timed out after {timeout_seconds}s").model_dump())
raise RuntimeError("LLM streaming call timed out")
except asyncio.CancelledError:
await emit(KeywordsWsEvent(type="error", message="Request cancelled").model_dump())
raise
if not keywords:
await emit(KeywordsWsEvent(type="error", message="LLM call failed or returned no content").model_dump())
raise RuntimeError("LLM streaming call returned empty content")
await emit(KeywordsWsEvent(type="status", step="parsing_response", message="Bearbeite Ergebnisse").model_dump())
try:
keywords_json = json.loads(keywords)
except json.JSONDecodeError as e:
await emit(KeywordsWsEvent(type="error", message=f"Invalid JSON in LLM response: {e}").model_dump())
raise RuntimeError("LLM response is not valid JSON")
# Final emission of the full results (in case the last chunk didn't trigger it)
final_data = {level: confirmed.get(level, []) for level in LEVELS}
try:
final_validated = ExtractedKeywordsLLM.model_validate(keywords_json)
except ValidationError:
# Fallback: use our confirmed data
final_validated = ExtractedKeywordsLLM.model_validate(final_data)
elapsed_time = time.time() - start_time
result = ExtractedKeywordsResponse(
results=final_validated,
source=mode,
source_url=query if mode == "url" else None,
source_content=text,
duration=elapsed_time,
)
return result
async def extract_keywords_stream_enriched(
query: str,
@@ -275,13 +140,17 @@ async def extract_keywords_stream_enriched(
if mode == "url":
await emit(KeywordsWsEvent(type="status", step="fetching_url", message=f"Extrahiere Inhalt von {query}").model_dump())
text = await _get_text_content(query)
await emit(KeywordsWsEvent(type="status", step="content_extracted", message=f"Extrahiert {len(text)} Zeichen").model_dump())
if text:
await emit(KeywordsWsEvent(type="status", step="content_extracted", message=f"Extrahiert {len(text)} Zeichen").model_dump())
else:
await emit(KeywordsWsEvent(type="error", message=f"Fehler beim Abrufen des Inhalts von {query}").model_dump())
raise RuntimeError(f"Failed to fetch content from {query}")
system_prompt = KeywordsPrompt.EXTRACT_WEBSITE_KEYWORDS_PROMPT
else:
text = query
await emit(KeywordsWsEvent(type="status", step="text_received", message=f"Empfangen {len(text)} Zeichen").model_dump())
system_prompt = KeywordsPrompt.EXTRACT_KEYWORDS_TEXT_PROMPT
user_prompt = "\nNow analyze the following text.\n"
if limit:
user_prompt += f"\nExtract exactly {limit} keywords for each level.\n"
@@ -290,15 +159,10 @@ async def extract_keywords_stream_enriched(
await emit(KeywordsWsEvent(type="status", step="calling_llm", message="Extrahiere Keywords...").model_dump())
LEVELS = ("broad_keywords", "coarse_grained", "fine_grained")
# Holds enriched keyword wrappers for each level
confirmed: Dict[str, List[KeywordEntryWithTopic]] = {level: [] for level in LEVELS}
# Track background enrichment tasks
enrichment_tasks: List[asyncio.Task] = []
async def emit_full_results() -> None:
"""Attempt to build and emit the full enriched keyword model."""
try:
validated = _build_enriched_snapshot(confirmed)
except ValidationError:
@@ -306,29 +170,19 @@ async def extract_keywords_stream_enriched(
await emit(KeywordsWsEvent(type="keywords", keywords=validated.model_dump()).model_dump())
async def get_openalex_topic(level: str, idx: int, item: KeywordEntry) -> None:
"""
Fetch/enrich metadata for a single keyword.
Runs concurrently without blocking the LLM stream.
"""
try:
topic = await vector_search_topics_batch(
keywords=[item.keyword],
search_type="hybrid",
)
# Update the shared confirmed list in-place (safe in asyncio)
confirmed[level][idx].topic_mapping = topic.results[0] if topic.results else None
# Emit the full updated set after each enrichment so the frontend sees progress.
await emit_full_results()
except asyncio.CancelledError:
# If the whole request is cancelled, we can just re-raise
raise
except Exception as e:
logger.error(f"Error fetching OpenAlex topic for keyword '{item.keyword}': {e}")
await emit_full_results()
# ---------- on_chunk: parses LLM stream and appends new keywords ----------
async def on_chunk(event: Dict[str, Any]) -> None:
if event["type"] != "llm_chunk":
await emit(event)
@@ -338,7 +192,6 @@ async def extract_keywords_stream_enriched(
partial = partial_json_parser.loads(event.get("_full_content", ""))
except Exception:
return
if not isinstance(partial, dict):
return
@@ -346,19 +199,18 @@ async def extract_keywords_stream_enriched(
for level in LEVELS:
current = partial.get(level) or []
start_idx = len(confirmed[level]) # Where we start appending
start_idx = len(confirmed[level])
while len(confirmed[level]) < len(current):
raw_item = current[len(confirmed[level])]
try:
validated_item = KeywordEntry.model_validate(raw_item)
except ValidationError:
break # item not complete yet
break
confirmed[level].append(KeywordEntryWithTopic(llm_keyword=validated_item))
grew = True
# Launch openalex topic mapping
for idx in range(start_idx, len(confirmed[level])):
keyword_text = confirmed[level][idx].llm_keyword.keyword
await emit(
@@ -374,7 +226,6 @@ async def extract_keywords_stream_enriched(
if grew:
await emit_full_results()
# ---------- Accumulate full_content for incremental parsing ----------
full_content_holder = {"value": ""}
async def emit_wrapper(event: Dict[str, Any]) -> None:
@@ -384,6 +235,7 @@ async def extract_keywords_stream_enriched(
await on_chunk(event)
# ---------- Call the LLM ----------
keywords = ""
try:
keywords = await asyncio.wait_for(
llm.call_stream(
@@ -401,14 +253,24 @@ async def extract_keywords_stream_enriched(
await emit(KeywordsWsEvent(type="error", message=f"LLM call timed out after {timeout_seconds}s").model_dump())
raise RuntimeError("LLM streaming call timed out")
except asyncio.CancelledError:
# Cancel all pending enrichment tasks to avoid dangling background work
for task in enrichment_tasks:
task.cancel()
if enrichment_tasks:
await asyncio.gather(*enrichment_tasks, return_exceptions=True)
await emit(KeywordsWsEvent(type="error", message="Request cancelled").model_dump())
raise
finally:
if enrichment_tasks:
done, pending = await asyncio.wait(enrichment_tasks, timeout=10)
for task in pending:
task.cancel()
if pending:
await asyncio.gather(*pending, return_exceptions=True)
if not keywords:
# Empty string covers: real empty completion, APIConnectionError,
# and disconnect-during-emit (call_stream currently swallows all
# three the same way). Treat as a failed extraction.
await emit(KeywordsWsEvent(type="error", message="LLM call failed or returned no content").model_dump())
raise RuntimeError("LLM streaming call returned empty content")
# ---------- Finalize ----------
await emit(KeywordsWsEvent(type="status", step="parsing_response", message="Bearbeite Ergebnisse").model_dump())
@@ -418,13 +280,8 @@ async def extract_keywords_stream_enriched(
await emit(KeywordsWsEvent(type="error", message=f"Invalid JSON in LLM response: {e}").model_dump())
raise RuntimeError("LLM response is not valid JSON")
# ---------- Wait for ALL pending enrichments to complete ----------
if enrichment_tasks:
await asyncio.gather(*enrichment_tasks, return_exceptions=True)
await emit_full_results()
# Build final response
try:
final_validated = _build_enriched_snapshot(confirmed)
except ValidationError:
+319 -171
View File
@@ -35,13 +35,118 @@ class KeywordsPrompt(StrEnum):
---
# STRICT GROUNDING GUARDRAIL (HIGHEST PRIORITY)
The output must be strictly extractive and grounded in the input text.
## Mandatory Rules
1. Extract ONLY keywords, terms, entities, concepts, technologies, methods, materials, standards, diseases, applications, sectors, or noun phrases that explicitly appear in the input text.
2. Do NOT introduce, infer, generalize, expand, normalize, summarize, classify, enrich, or extrapolate concepts beyond what is directly present in the text.
3. Do NOT generate parent categories, broader domains, scientific disciplines, industries, or technology areas unless those exact terms appear in the input text.
Example:
Input contains:
"transformer-based machine learning framework"
Allowed:
* transformer-based machine learning framework
* machine learning
* transformer
Not allowed:
* Artificial Intelligence
* Deep Learning
* Neural Networks
unless those exact terms appear in the text.
4. Do NOT generate synonyms, abbreviations, alternate phrasings, normalized forms, or related concepts that do not explicitly appear in the source text.
Example:
Input:
"large language models"
Allowed:
* large language models
Not allowed:
* LLMs
* Generative AI
* Artificial Intelligence
unless explicitly present.
5. Do NOT generate implied concepts.
Example:
Input:
"patient records"
Not allowed:
* Healthcare
* Medical Informatics
* Clinical Documentation
unless explicitly mentioned.
6. Every keyword must have direct textual evidence in the input.
7. If a keyword cannot be highlighted verbatim or as a contiguous phrase in the source text, it must NOT appear in the output.
8. Prefer exact surface forms from the text.
9. Preserve original capitalization when possible.
10. Do not invent keywords to satisfy target counts.
11. When insufficient keywords exist for a level, return fewer keywords.
12. Grounding accuracy is more important than completeness.
13. Any keyword not directly supported by the text is considered an extraction error.
## Hierarchy Assignment Rules
The hierarchy is only an organizational grouping.
Do NOT create broader concepts to populate broad_keywords.
If the source text contains only specific concepts, place those concepts into the most appropriate level while remaining faithful to the text.
Do not create abstraction layers that are not explicitly present in the document.
## Self-Validation Before Output
Before returning the final JSON, verify every keyword:
* Can this exact phrase be found in the input text?
* Can a user highlight the phrase directly in the source text?
If the answer is NO, remove the keyword.
---
# Keyword Hierarchy
## 1. broad_keywords
High-level domains, disciplines, industries, or technology areas.
High-level domains, disciplines, industries, technology areas, or major themes explicitly present in the text.
Examples:
Examples (only if explicitly mentioned):
* Artificial Intelligence
* Healthcare
@@ -50,15 +155,15 @@ class KeywordsPrompt(StrEnum):
* Materials Science
* Robotics
These should represent the major themes of the document.
These should represent the major themes of the document when those themes are explicitly stated.
---
## 2. coarse_grained
Mid-level concepts, technologies, research areas, methods, or applications.
Mid-level concepts, technologies, research areas, methods, applications, or technical topics explicitly present in the text.
Examples:
Examples (only if explicitly mentioned):
* Machine Learning
* Drug Discovery
@@ -73,9 +178,9 @@ class KeywordsPrompt(StrEnum):
## 3. fine_grained
Highly specific technical concepts, algorithms, materials, protocols, standards, tools, products, datasets, biomarkers, or specialized terminology.
Highly specific technical concepts, algorithms, materials, protocols, standards, tools, products, datasets, biomarkers, or specialized terminology explicitly present in the text.
Examples:
Examples (only if explicitly mentioned):
* Transformer Architecture
* CRISPR-Cas9
@@ -114,21 +219,56 @@ class KeywordsPrompt(StrEnum):
# Extraction Rules
* Extract only concepts explicitly mentioned or strongly implied.
* Extract only concepts explicitly mentioned in the text.
* Do not use concepts that are merely implied, inferred, generalized, or derived.
* Every keyword must be directly traceable to text spans in the input.
* Prefer noun phrases.
* Avoid complete sentences.
* Avoid duplicates across levels whenever possible.
* Do not invent technologies not supported by the text.
* Prefer terminology that can be searched in scientific literature databases such as OpenAlex.
* Return between 5 and 15 keywords per level when sufficient information exists.
* If fewer valid keywords exist, return fewer.
---
# Output Schema
Return ONLY valid JSON.
Return ONLY valid JSON using the following structure:
{
"broad_keywords": [
{
"keyword": "string",
"relevance_score": 0.0
}
],
"coarse_grained": [
{
"keyword": "string",
"relevance_score": 0.0
}
],
"fine_grained": [
{
"keyword": "string",
"relevance_score": 0.0
}
]
}
Requirements:
* Return ONLY valid JSON.
* Do not include explanations.
* Do not include markdown.
* Do not include comments.
* Do not include reasoning.
* Do not include any text outside the JSON object.
* Every keyword must be directly supported by the input text.
* Any keyword not explicitly present in the source text must be excluded.
Return ONLY valid JSON matching the schema provided by the API.
---
# Example 1
@@ -136,269 +276,277 @@ class KeywordsPrompt(StrEnum):
Input:
Researchers developed a transformer-based machine learning framework for predictive maintenance in industrial manufacturing. The system uses sensor fusion, anomaly detection, and time-series forecasting to reduce downtime in smart factories.
Output:
{"broad_keywords":[{"keyword":"ArtificialIntelligence","relevance_score":0.98},{"keyword":"Manufacturing","relevance_score":0.94},{"keyword":"IndustrialAutomation","relevance_score":0.90}],"coarse_grained":[{"keyword":"MachineLearning","relevance_score":0.96},{"keyword":"PredictiveMaintenance","relevance_score":0.95},{"keyword":"SmartFactories","relevance_score":0.88},{"keyword":"SensorFusion","relevance_score":0.86},{"keyword":"AnomalyDetection","relevance_score":0.85},{"keyword":"Time-SeriesForecasting","relevance_score":0.83}],"fine_grained":[{"keyword":"TransformerArchitecture","relevance_score":0.95},{"keyword":"IndustrialSensors","relevance_score":0.84},{"keyword":"MultimodalDataFusion","relevance_score":0.82},{"keyword":"PredictiveAnalytics","relevance_score":0.80}]}
broad_keywords":[{"keyword":"Industrial manufacturing","relevance_score":0.94}],"coarse_grained":[{"keyword":"Machine learning","relevance_score":0.97},{"keyword":"Predictive maintenance","relevance_score":0.95},{"keyword":"Sensor fusion","relevance_score":0.89},{"keyword":"Anomaly detection","relevance_score":0.88},{"keyword":"Time-series forecasting","relevance_score":0.87},{"keyword":"Smart factories","relevance_score":0.85}],"fine_grained":[{"keyword":"Transformer-based machine learning framework","relevance_score":0.96}]}
---
# Example 2
Input:
A healthcare platform uses large language models and retrieval-augmented generation to automatically summarize patient records and support clinical decision-making.
A healthcare platform uses large language models and retrieval-augmented generation to automatically summarize patient records and support clinical decision-making.
Output:
{"broad_keywords":[{"keyword":"Healthcare","relevance_score":0.97},{"keyword":"ArtificialIntelligence","relevance_score":0.95},{"keyword":"DigitalHealth","relevance_score":0.89}],"coarse_grained":[{"keyword":"LargeLanguageModels","relevance_score":0.96},{"keyword":"ClinicalDecisionSupport","relevance_score":0.92},{"keyword":"MedicalRecordAnalysis","relevance_score":0.90},{"keyword":"NaturalLanguageProcessing","relevance_score":0.88}],"fine_grained":[{"keyword":"Retrieval-AugmentedGeneration","relevance_score":0.95},{"keyword":"PatientRecordSummarization","relevance_score":0.91},{"keyword":"ClinicalDocumentation","relevance_score":0.86},{"keyword":"MedicalTextProcessing","relevance_score":0.84}]}
{"broad_keywords":[{"keyword":"Healthcare","relevance_score":0.96}],"coarse_grained":[{"keyword":"Large language models","relevance_score":0.95},{"keyword":"Clinical decision-making","relevance_score":0.91},{"keyword":"Patient records","relevance_score":0.90}],"fine_grained":[{"keyword":"Retrieval-augmented generation","relevance_score":0.94}]}
Return ONLY valid JSON matching the schema provided by the API.
"""
EXTRACT_WEBSITE_KEYWORDS_PROMPT = """
You are an expert technology scout, scientific analyst, and innovation intelligence specialist.
You are an expert technology scout, scientific analyst, and innovation intelligence specialist.
The input text was extracted automatically from a webpage using BeautifulSoup or a similar HTML parser.
The input text was extracted automatically from a webpage using BeautifulSoup or a similar HTML parser.
The extracted text may contain:
The extracted text may contain:
* Navigation menus
* Headers and footers
* Cookie notices
* Marketing language
* Contact information
* Repeated sections
* Calls to action
* Legal disclaimers
* Product pages
* Blog articles
* News articles
* Landing pages
* Navigation menus
* Headers and footers
* Cookie notices
* Marketing language
* Contact information
* Repeated sections
* Calls to action
* Legal disclaimers
* Product pages
* Blog articles
* News articles
* Landing pages
Your first task is to identify the actual content and purpose of the webpage.
Your first task is to identify the actual content and purpose of the webpage.
Ignore:
Ignore:
* Navigation elements
* Cookie banners
* Legal notices
* Copyright text
* Generic marketing statements
* Contact information
* Login/signup content
* Careers pages unless they contain relevant technical information
* Repeated website boilerplate
* Navigation elements
* Cookie banners
* Legal notices
* Copyright text
* Generic marketing statements
* Contact information
* Login/signup content
* Careers pages unless they contain relevant technical information
* Repeated website boilerplate
Focus only on content that helps identify:
Focus only on the primary informational content of the webpage.
* Technologies
* Scientific concepts
* Research areas
* Technical methods
* Products
* Applications
* Industrial sectors
* Materials
* Standards
* Diseases
* Engineering disciplines
* Innovation domains
---
---
# STRICT GROUNDING GUARDRAIL (HIGHEST PRIORITY)
# Step 1: Determine Page Type
The output must be strictly extractive and grounded in the webpage text.
Determine which type of page is represented:
## Mandatory Rules
* Technology/Product Page
* Company Page
* Research Article
* Scientific Blog Post
* News Article
* Technical Documentation
* White Paper
* Industry Report
* Other
1. Extract ONLY keywords, entities, concepts, technologies, methods, products, materials, standards, diseases, applications, sectors, or noun phrases that explicitly appear in the webpage text.
Use this classification internally only.
2. Do NOT introduce, infer, generalize, normalize, classify, enrich, expand, summarize, or extrapolate concepts beyond what is directly present in the text.
Do not include it in the output.
3. Do NOT generate broader domains, scientific disciplines, industries, technology areas, research fields, or categories unless those exact terms appear in the webpage text.
---
Example:
# Step 2: Extract Searchable Concepts
Input:
Prioritize concepts that are useful for:
"The platform uses large language models and retrieval-augmented generation."
* OpenAlex retrieval
* Scientific literature discovery
* Patent scouting
* Technology scouting
* Innovation monitoring
Allowed:
Prefer canonical scientific terminology over marketing language.
* large language models
* retrieval-augmented generation
Examples:
Not allowed:
Prefer:
* Artificial Intelligence
* Generative AI
* Natural Language Processing
* Large Language Models
unless explicitly present.
Instead of:
4. Do NOT generate synonyms.
* AI Assistant
Example:
Prefer:
Input:
* Smart Manufacturing
"AI assistant"
Instead of:
Allowed:
* Factory Optimization Solution
* AI assistant
Prefer:
Not allowed:
* Retrieval-Augmented Generation
* large language models
* conversational AI
* generative AI
Instead of:
unless those exact terms appear.
* Intelligent Knowledge Assistant
5. Do NOT generate canonical scientific terminology when it does not appear in the source text.
Prefer:
6. Do NOT rewrite marketing terms into technical terms.
* Predictive Maintenance
7. Every keyword must have direct textual evidence in the webpage content.
Instead of:
8. If a keyword cannot be highlighted directly in the source text, it must NOT appear in the output.
* Equipment Performance Optimization
9. Preserve original wording whenever possible.
---
10. Do not invent keywords to satisfy target counts.
# Keyword Hierarchy
11. When insufficient keywords exist, return fewer keywords.
## broad_keywords
12. Grounding accuracy is more important than completeness.
High-level domains, industries, disciplines, or technology areas.
13. Any keyword not directly supported by the webpage text is considered an extraction error.
Examples:
---
* Artificial Intelligence
* Healthcare
* Manufacturing
* Energy Storage
* Biotechnology
* Robotics
# Step 1: Determine Page Type
---
Determine internally whether the page is:
## coarse_grained
* Technology/Product Page
* Company Page
* Research Article
* Scientific Blog Post
* News Article
* Technical Documentation
* White Paper
* Industry Report
* Other
Technologies, methods, research fields, and applications.
Use this classification only to identify the relevant content and remove boilerplate.
Examples:
Do NOT include the classification in the output.
* Machine Learning
* Predictive Maintenance
* Drug Discovery
* Smart Manufacturing
* Computer Vision
* Clinical Decision Support
---
---
# Step 2: Extract Searchable Concepts
## fine_grained
Extract concepts directly present in the page that are useful for:
Specific technical concepts, algorithms, materials, standards, tools, products, datasets, biomarkers, or protocols.
* OpenAlex retrieval
* Scientific literature discovery
* Patent scouting
* Technology scouting
* Innovation monitoring
Examples:
The extracted concepts must remain faithful to the wording used in the webpage.
* Transformer Architecture
* CRISPR-Cas9
* OPC UA
* Retrieval-Augmented Generation
* YOLOv8
* Lithium Iron Phosphate
Do NOT replace webpage terminology with your own preferred terminology.
---
---
# Relevance Score
# Keyword Hierarchy
Assign a relevance score between 0.0 and 1.0.
## broad_keywords
Guidelines:
High-level domains, industries, disciplines, technology areas, products, services, or major themes that explicitly appear in the webpage.
* 1.00 = central topic of the webpage
* 0.90 = major topic
* 0.80 = highly relevant
* 0.70 = supporting concept
* 0.60 = secondary concept
Only use this level when such broad concepts are explicitly present.
Avoid scores below 0.60 unless necessary.
Examples:
---
* Healthcare
* Biotechnology
* Manufacturing
* Robotics
* Financial Technology
# Additional Rules
only if those exact concepts appear in the webpage.
* Extract only concepts supported by the page content.
* Do not hallucinate technologies.
* Avoid generic company descriptions.
* Avoid generic business terminology.
* Prefer terminology suitable for scientific literature search.
* Prefer concepts that could appear in OpenAlex, patents, technical reports, or academic publications.
* Remove duplicates across hierarchy levels whenever possible.
* Rank keywords by importance.
---
---
# Example 3 — News Article
## coarse_grained
## Input
Technologies, methods, research fields, applications, products, services, or technical topics explicitly present in the webpage.
Apple announced a new generation of custom AI chips designed for on-device inference. The chips will power future iPhone and Mac devices, improving privacy, latency, and energy efficiency for generative AI applications.
Examples:
## Output
* Machine Learning
* Predictive Maintenance
* Drug Discovery
* Smart Manufacturing
* Clinical Decision Support
```json{"broad_keywords":[{"keyword":"Technology","relevance_score":0.98},{"keyword":"ArtificialIntelligence","relevance_score":0.97},{"keyword":"ConsumerElectronics","relevance_score":0.92}],"coarse_grained":[{"keyword":"AIHardware","relevance_score":0.96},{"keyword":"SemiconductorDesign","relevance_score":0.93},{"keyword":"EdgeComputing","relevance_score":0.90},{"keyword":"GenerativeAI","relevance_score":0.88}],"fine_grained":[{"keyword":"On-DeviceInference","relevance_score":0.95},{"keyword":"CustomAIChips","relevance_score":0.94},{"keyword":"InferenceAcceleration","relevance_score":0.89},{"keyword":"Low-LatencyProcessing","relevance_score":0.86}]}```
only if explicitly present.
---
---
# Example 4 — Product Page
## fine_grained
## Input
Highly specific technical concepts, algorithms, materials, standards, tools, products, datasets, biomarkers, protocols, model names, framework names, software packages, or specialized terminology explicitly present in the webpage.
The Sony WH-1000XM6 wireless headphones feature adaptive noise cancellation, Bluetooth 5.4 connectivity, 40-hour battery life, multipoint device pairing, and spatial audio support.
Examples:
## Output
* FastAPI
* OpenAPI
* Pydantic
* CRISPR-Cas9
* Retrieval-Augmented Generation
* OPC UA
```json{"broad_keywords":[{"keyword":"ConsumerElectronics","relevance_score":0.98},{"keyword":"AudioTechnology","relevance_score":0.95}],"coarse_grained":[{"keyword":"WirelessHeadphones","relevance_score":0.97},{"keyword":"NoiseCancellation","relevance_score":0.95},{"keyword":"BluetoothAudio","relevance_score":0.92}],"fine_grained":[{"keyword":"AdaptiveNoiseCancellation","relevance_score":0.96},{"keyword":"Bluetooth5.4","relevance_score":0.94},{"keyword":"MultipointPairing","relevance_score":0.89},{"keyword":"SpatialAudio","relevance_score":0.87}]}```
only if explicitly present.
---
---
# Example 5 — Technical Documentation
# Relevance Score
## Input
Assign a relevance score between 0.0 and 1.0.
FastAPI is a modern Python web framework for building APIs. It provides automatic OpenAPI schema generation, dependency injection, asynchronous request handling, and data validation through Pydantic models.
Guidelines:
## Output
* 1.00 = central topic of the webpage
* 0.90 = major topic
* 0.80 = highly relevant
* 0.70 = supporting concept
* 0.60 = secondary concept
```json{"broad_keywords":[{"keyword":"SoftwareDevelopment","relevance_score":0.98},{"keyword":"WebDevelopment","relevance_score":0.95}],"coarse_grained":[{"keyword":"PythonFrameworks","relevance_score":0.97},{"keyword":"APIDevelopment","relevance_score":0.95},{"keyword":"BackendEngineering","relevance_score":0.91}],"fine_grained":[{"keyword":"FastAPI","relevance_score":0.99},{"keyword":"OpenAPI","relevance_score":0.95},{"keyword":"DependencyInjection","relevance_score":0.90},{"keyword":"Pydantic","relevance_score":0.89},{"keyword":"AsynchronousRequestHandling","relevance_score":0.87}]}```
Avoid scores below 0.60 unless necessary.
---
Rank keywords by importance.
# Example 6 — Company Website
---
## Input
# Extraction Rules
Stripe provides online payment infrastructure for businesses. Its platform supports payment processing, subscription billing, fraud prevention, financial reporting, and global commerce operations.
* Extract only concepts explicitly mentioned in the webpage text.
* Do not use concepts that are merely implied, inferred, generalized, or derived.
* Every keyword must be directly traceable to text spans in the webpage.
* Prefer noun phrases.
* Avoid complete sentences.
* Avoid duplicates across hierarchy levels whenever possible.
* Preserve original wording.
* Rank keywords by importance.
* Return between 5 and 15 keywords per level when sufficient information exists.
* If fewer valid keywords exist, return fewer.
## Output
---
```json{"broad_keywords":[{"keyword":"FinancialTechnology","relevance_score":0.98},{"keyword":"BusinessServices","relevance_score":0.91}],"coarse_grained":[{"keyword":"PaymentProcessing","relevance_score":0.97},{"keyword":"DigitalPayments","relevance_score":0.95},{"keyword":"SubscriptionManagement","relevance_score":0.90}],"fine_grained":[{"keyword":"StripePlatform","relevance_score":0.99},{"keyword":"FraudPrevention","relevance_score":0.91},{"keyword":"RecurringBilling","relevance_score":0.89},{"keyword":"GlobalPaymentInfrastructure","relevance_score":0.87}]}```
# Self-Validation Before Output
---
For every keyword, verify:
* Can this exact phrase be found in the webpage text?
* Can a user highlight the phrase directly in the extracted content?
If the answer is NO, remove the keyword.
---
# Example — Technical Documentation
Input:
FastAPI is a modern Python web framework for building APIs. It provides automatic OpenAPI schema generation, dependency injection, asynchronous request handling, and data validation through Pydantic models.
Output:
{"broad_keywords":[{"keyword":"Python web framework","relevance_score":0.95}],"coarse_grained":[{"keyword":"building APIs","relevance_score":0.93},{"keyword":"Data validation","relevance_score":0.90}],"fine_grained":[{"keyword":"FastAPI","relevance_score":0.99},{"keyword":"OpenAPI","relevance_score":0.95},{"keyword":"Dependency Injection","relevance_score":0.91},{"keyword":"Asynchronous Request Handling","relevance_score":0.89},{"keyword":"Pydantic","relevance_score":0.88}]}
Return ONLY valid JSON matching the schema provided by the API.
Return ONLY valid JSON matching the schema provided by the API.
"""
SIMPLE_TEXT_PROMPT = """
+49 -60
View File
@@ -8,10 +8,13 @@ import asyncio
from typing import Annotated
from fastapi import APIRouter, Body, WebSocket, WebSocketDisconnect
from uvicorn.protocols.utils import ClientDisconnected
from . import logic
from inse.keywords.model import ExtractedKeywordsResponse, KeywordsRequest
import logging
logger = logging.getLogger(__name__)
router = APIRouter(
prefix="/api/inse-service",
@@ -19,26 +22,35 @@ router = APIRouter(
responses={404: {"description": "Not found"}},
)
@router.websocket("/keywords/extract/ws")
async def extract_keywords_ws(websocket: WebSocket):
print("WebSocket connection established for keyword extraction.")
await websocket.accept()
disconnected = asyncio.Event()
extraction_task: asyncio.Task | None = None
async def emit(event: dict):
if disconnected.is_set():
return
try:
await websocket.send_json(event)
except (WebSocketDisconnect, ClientDisconnected):
disconnected.set()
async def safe_send(payload: dict):
if disconnected.is_set():
return
try:
await websocket.send_json(payload)
except (WebSocketDisconnect, ClientDisconnected):
disconnected.set()
try:
raw = await websocket.receive_json()
request = KeywordsRequest(**raw)
disconnected = asyncio.Event()
async def emit(event: dict):
if disconnected.is_set():
return
await websocket.send_json(event)
async def watch_disconnect() -> None:
while True:
message = await websocket.receive()
if message["type"] == "websocket.disconnect":
disconnected.set()
return
request = KeywordsRequest(**raw)
extraction_task = asyncio.create_task(
logic.extract_keywords_stream_enriched(
@@ -48,60 +60,37 @@ async def extract_keywords_ws(websocket: WebSocket):
emit=emit,
)
)
disconnect_task = asyncio.create_task(watch_disconnect())
done, pending = await asyncio.wait(
{extraction_task, disconnect_task},
return_when=asyncio.FIRST_COMPLETED,
)
result = await extraction_task
if disconnect_task in done:
disconnected.set()
await safe_send({
"type": "completed",
"result": result.model_dump(),
})
except (WebSocketDisconnect, ClientDisconnected):
disconnected.set()
logger.info("Client disconnected from keyword extraction ws")
print("Client disconnected from keyword extraction ws")
except Exception as e:
disconnected.set()
logger.exception("Error in keyword extraction ws")
await safe_send({
"type": "error",
"message": str(e),
})
finally:
if extraction_task is not None and not extraction_task.done():
extraction_task.cancel()
try:
await extraction_task
except asyncio.CancelledError:
except (asyncio.CancelledError, Exception):
pass
return
disconnect_task.cancel()
try:
await disconnect_task
except asyncio.CancelledError:
pass
result = extraction_task.result()
await websocket.send_json({"type": "completed", "result": result.model_dump()})
except WebSocketDisconnect:
print("WebSocket disconnected.")
pass
except Exception as e:
await websocket.send_json({"type": "error", "message": str(e)})
finally:
if websocket.application_state.name != "DISCONNECTED":
await websocket.close()
# @router.post(
# "/keywords/extract",
# operation_id="extractKeywords",
# response_model=ExtractedKeywordsResponse,
# )
# async def extract_keywords(
# request: Annotated[
# KeywordsRequest,
# Body(description="Input text for keyword extraction"),
# ],
# ):
# async def noop(_: dict):
# pass
# return await logic.extract_keywords_stream(
# query=request.query,
# mode=request.mode,
# limit=request.limit,
# emit=noop,
# )
@router.post(
"/keywords/extract",
+1 -1
View File
@@ -24,7 +24,7 @@ from inse.exceptions import (
)
from inse.funders.service import router as funders_service_router
from inse.projects.router import router as projects_router
from inse.university_ranking.router import router as university_ranking_router
from inse.university_ranking.service import router as university_ranking_router
# caching
from inse.middleware.etag_cache import ETagCacheMiddleware
+2
View File
@@ -34,6 +34,8 @@ class ESIndex(StrEnum):
OPENALEX_AUTHORS = "openalex-authors"
OPENALEX_INSTITUTIONS = "openalex-institutions"
OPENALEX_PUBLICATIONS = "openalex-publications"
OPENALEX_COUNTRIES = "openalex-countries"
OPENALEX_CONTINENTS = "openalex-continents"
EPO_INDEX = "epo_index_1.0"
USPTO_INDEX = "uspto_patents_3.0"
@@ -39,6 +39,7 @@ class Topic(BaseModel):
keywords: Optional[List[StrictStr]] = Field(default=None, description="Keywords representing the content of papers in the topic.")
subfield: Optional[TopicSubfield] = None
var_field: Optional[TopicField] = Field(default=None, alias="field")
field: Optional[TopicField] = Field(default=None)
domain: Optional[TopicDomain] = None
works_count: Optional[StrictInt] = Field(default=None, description="The number of works tagged with this topic.")
cited_by_count: Optional[StrictInt] = None
@@ -33,11 +33,12 @@ class WorkTopic(BaseModel):
""" # noqa: E501
id: Optional[StrictStr] = None
display_name: Optional[StrictStr] = None
description: Optional[StrictStr] = None
score: Optional[Union[StrictFloat, StrictInt]] = None
subfield: Optional[WorkTopicSubfield] = None
var_field: Optional[WorkTopicField] = Field(default=None, alias="field")
domain: Optional[WorkTopicDomain] = None
__properties: ClassVar[List[str]] = ["id", "display_name", "score", "subfield", "field", "domain"]
__properties: ClassVar[List[str]] = ["id", "display_name", "description", "score", "subfield", "field", "domain"]
model_config = ConfigDict(
validate_by_name=True,
@@ -101,6 +102,7 @@ class WorkTopic(BaseModel):
_obj = cls.model_validate({
"id": obj.get("id"),
"display_name": obj.get("display_name"),
"description": obj.get("description"),
"score": obj.get("score"),
"subfield": WorkTopicSubfield.from_dict(obj["subfield"]) if obj.get("subfield") is not None else None,
"field": WorkTopicField.from_dict(obj["field"]) if obj.get("field") is not None else None,
+56 -20
View File
@@ -12,7 +12,8 @@ from inse.exceptions import ElasticsearchException
from ..integrations import elasticsearch, llm
from ..persons.logic import find_ude_author_by_name, get_author_name_by_id
from .model import MentionedPerson, NewsArticle, NewsArticleDetail, NewsPage
from ..topics.logic import vector_search_topics
from .model import MatchedTopic, MentionedPerson, NewsArticle, NewsArticleDetail, NewsPage
logger = logging.getLogger(__name__)
@@ -20,14 +21,19 @@ TOPIC_LIMIT = 4
TOPIC_QUERY_CONTENT_CHARS = 300
TOPIC_NUM_CANDIDATES = 100
TOPIC_SIMILARITY = 0.5
TOPIC_MATCHES_PER_KEYWORD = 1
KEYWORD_LIMIT = 6
KEYWORD_CONTENT_CHARS = 4000
KEYWORD_SYSTEM_PROMPT = """\
Extrahiere aus dem folgenden Nachrichtenartikel die wichtigsten Schlagwörter (Keywords).
Gib maximal sechs prägnante Begriffe oder kurze Phrasen zurück, die den inhaltlichen Kern
des Artikels erfassen. Antworte ausschließlich mit einem JSON-Array von Strings, ohne
weiteren Text, zum Beispiel ["Künstliche Intelligenz", "Klimaforschung"].
Extrahiere aus dem nachfolgenden Campus-Aktuell-Artikel der Universität Duisburg-Essen die wichtigsten Schlagwörter (Keywords).
Wähle ausschließlich Begriffe oder Phrasen, die tatsächlich im Text vorkommen. Erfinde keine Begriffe, verallgemeinere nicht und nenne keine Oberbegriffe, die nicht im Text stehen.
Übersetze keine Begriffe – verwende ausschließlich Wörter und Phrasen in der Sprache des Artikels.
Gib jedes Schlagwort in seiner Grundform an: Bei deutschen Begriffen Substantive im Nominativ Singular; bei englischen Begriffen Substantive im Singular. Verwende den Plural nur, wenn der Begriff üblicherweise im Plural gebraucht wird.
Vermeide Redundanz: Wenn zwei mögliche Schlagwörter dieselbe Wortbasis teilen (z.B. „Forschung" und „Forschungsprojekt"), nenne nur den spezifischeren Begriff.
Nenne maximal sechs prägnante Begriffe oder kurze Phrasen. Konzentriere dich auf inhaltlich zentrale Begriffe, nicht auf Personennamen oder Datumsangaben.
Antworte ausschließlich mit gültigem JSON in exakt diesem Format: {"keywords": ["Schlagwort", "Schlagwort"]}
Gib keine Erklärungen und kein Markdown aus, nur das JSON.
"""
RELATED_BLOCK_SIZE = 5
@@ -80,7 +86,14 @@ async def search_news(
clauses = await _filter_clauses(year_from, year_to, relevance_values)
exact_query = {
"bool": {
"must": [{"match": {"full_content": query_text}}],
"must": [
{
"multi_match": {
"query": query_text,
"fields": ["maintitle^2", "full_content"],
}
}
],
"filter": clauses,
}
}
@@ -240,7 +253,6 @@ async def get_news_by_id(news_id: str) -> NewsArticleDetail:
source = response.get("_source", {})
relevant, authors, cached_keywords, postproc_id = await _get_postproc_labels(news_id)
topics = await _get_article_topics(source.get("maintitle"), source.get("full_content"))
keywords = await _get_article_keywords(
news_id,
postproc_id,
@@ -248,6 +260,7 @@ async def get_news_by_id(news_id: str) -> NewsArticleDetail:
source.get("maintitle"),
source.get("full_content"),
)
topics = await _match_topics_for_keywords(keywords)
return NewsArticleDetail(
id=response.get("_id"),
@@ -258,22 +271,11 @@ async def get_news_by_id(news_id: str) -> NewsArticleDetail:
full_content=source.get("full_content"),
relevant=relevant,
authors=await _build_mentioned_persons(authors),
topics=topics,
keywords=keywords,
topics=topics,
)
async def _get_article_topics(maintitle: str | None, full_content: str | None) -> list:
query = " ".join(
part for part in (maintitle, (full_content or "")[:TOPIC_QUERY_CONTENT_CHARS]) if part
).strip()
if not query:
return []
topics = await _topic_vector_search(query, TOPIC_LIMIT, ["display_name"])
return [topic["display_name"] for topic in topics if topic.get("display_name")]
async def _get_article_keywords(
news_id: str,
postproc_id: str | None,
@@ -308,7 +310,12 @@ def _parse_keywords(raw: str) -> list:
try:
parsed = json.loads(raw)
candidates = parsed if isinstance(parsed, list) else []
if isinstance(parsed, list):
candidates = parsed
elif isinstance(parsed, dict):
candidates = parsed.get("keywords", [])
else:
candidates = []
except (json.JSONDecodeError, TypeError):
candidates = re.split(r"[,\n]", raw)
@@ -343,6 +350,35 @@ async def _store_keywords(news_id: str, postproc_id: str | None, keywords: list)
logger.exception(f"Failed to cache keywords for {news_id}.")
async def _match_topics_for_keywords(keywords: list) -> list:
matched = []
seen_ids = set()
for keyword in keywords:
try:
response = await vector_search_topics(query=keyword, limit=TOPIC_MATCHES_PER_KEYWORD)
except Exception:
logger.exception(f"Topic-Matching fuer Keyword '{keyword}' fehlgeschlagen.")
continue
for topic in response.results or []:
if not topic.id or topic.id in seen_ids:
continue
seen_ids.add(topic.id)
matched.append(
MatchedTopic(
id=topic.id,
display_name=topic.display_name,
subfield_name=topic.subfield.display_name if topic.subfield else None,
field_name=topic.var_field.display_name if topic.var_field else None,
domain_name=topic.domain.display_name if topic.domain else None,
source_keyword=keyword,
)
)
return matched
async def _topic_vector_search(query_text: str, k: int, source_fields: list) -> list:
try:
from ..util import get_model
+10 -1
View File
@@ -23,12 +23,21 @@ class MentionedPerson(BaseModel):
person_id: Optional[str] = None
class MatchedTopic(BaseModel):
id: Optional[str] = None
display_name: Optional[str] = None
subfield_name: Optional[str] = None
field_name: Optional[str] = None
domain_name: Optional[str] = None
source_keyword: Optional[str] = None
class NewsArticleDetail(NewsArticle):
full_content: Optional[str] = None
relevant: Optional[bool] = None
authors: List[MentionedPerson] = []
topics: List[str] = []
keywords: List[str] = []
topics: List[MatchedTopic] = []
class NewsPage(BaseModel):
+1
View File
@@ -12,3 +12,4 @@ class Tags(StrEnum):
AUTH = "Auth"
ACCOUNT = "Account"
ORGANIZATION = "Organization"
UNIVERSITY_RANKINGS = "University Rankings"
+195 -32
View File
@@ -1,65 +1,228 @@
import logging
import datetime
from typing import List, Dict, Any
from .model import UniversityTopicData, YearlyData, UniversityRanking, ResearchTopic, DashboardMetric, RankingResponse
from .model import UniversityTopicData, YearlyData, UniversityRanking, DashboardMetric, RankingResponse
from inse.integrations import elasticsearch
from inse.models.openalex.topic import Topic
logger = logging.getLogger(__name__)
START_YEAR = 2015
END_YEAR = 2026
START_YEAR = 2000
END_YEAR = datetime.datetime.now().year - 1
async def get_ranking_data(topic: ResearchTopic, metric: DashboardMetric) -> RankingResponse:
async def resolve_topic(topic_query: str) -> Topic:
"""Resolves a topic display name or ID using Elasticsearch with source whitelisting."""
if topic_query.startswith("https://openalex.org/"):
query = {"term": {"id": topic_query}}
else:
query = {"match_phrase": {"display_name": topic_query}}
try:
res = await elasticsearch.search(
index="openalex-topics",
query=query,
size=1,
source=["id", "display_name", "description", "works_count", "cited_by_count"],
cluster="nes"
)
hits = res.get("hits", {}).get("hits", [])
if hits:
return Topic.from_dict(hits[0]["_source"])
except Exception as e:
logger.warning("Failed to resolve topic in ES: %s", e)
return Topic(display_name=topic_query)
async def get_ranking_data(topic_query: str, metric: DashboardMetric) -> RankingResponse:
"""
Fetches real data from Elasticsearch and computes metrics for the dashboard.
"""
topic_obj = await resolve_topic(topic_query)
topic_name = topic_obj.display_name or topic_query
if topic_obj.id:
topic_filter = {"term": {"topics.id.keyword": topic_obj.id}}
else:
topic_filter = {"match_phrase": {"topics.display_name": topic_name}}
query = {
"bool": {
"must": [
{
"match_phrase": {
"topics.display_name": topic
}
},
{
"term": {
"geo.country_code": "DE"
}
}
]
"filter": [
{"term": {"type": "education"}},
{"term": {"geo.country_code": "DE"}},
topic_filter
]
}
}
# Fetch top institutions for the topic by works_count
res = await elasticsearch.search(
index="openalex-institutions",
query=query,
size=10,
sort=[{"works_count": "desc"}],
size=50,
source=["id", "display_name", "topics"],
cluster="nes"
)
hits = res.get("hits", {}).get("hits", [])
timeseries: List[UniversityTopicData] = []
candidates = []
for hit in hits:
source = hit["_source"]
# Map the counts_by_year from ES to our model
# We ensure every year from START_YEAR to END_YEAR is present, defaulting to 0
es_counts = {c["year"]: c for c in source.get("counts_by_year", [])}
inst_id = source.get("id")
display_name = source.get("display_name", "Unknown")
# Extract topic-specific works count
exact_topic_count = 0
for t in source.get("topics", []):
if t.get("display_name", "").lower() == topic_name.lower():
exact_topic_count = t.get("count", 0)
break
candidates.append({
"id": inst_id,
"display_name": display_name,
"exact_topic_count": exact_topic_count
})
# Sort in Python by exact topic count descending and take the top 10
candidates.sort(key=lambda x: x["exact_topic_count"], reverse=True)
top_10 = candidates[:10]
# Initialize timeseries map: inst_id -> year -> (publications, citations)
years_range = list(range(START_YEAR, END_YEAR + 1))
accumulated_data = {
inst["id"]: {yr: (0, 0) for yr in years_range}
for inst in top_10
}
if top_10:
# Build filter map for the single-pass aggregation query
filters_map = {}
for inst in top_10:
inst_id = inst["id"]
filters_map[inst_id] = {
"nested": {
"path": "authorships.institutions",
"query": {
"term": {
"authorships.institutions.id": inst_id
}
}
}
}
# Topic filter clause (using topic ID if resolved, otherwise matching display name keyword)
topic_id = topic_obj.id
if topic_id:
topic_clause = {
"bool": {
"should": [
{"nested": {"path": "topics", "query": {"term": {"topics.id": topic_id}}}},
{"term": {"primary_topic.id": topic_id}}
],
"minimum_should_match": 1
}
}
else:
topic_clause = {
"bool": {
"should": [
{"nested": {"path": "topics", "query": {"match_phrase": {"topics.display_name": topic_name}}}},
{"match_phrase": {"primary_topic.display_name": topic_name}}
],
"minimum_should_match": 1
}
}
# Construct single-pass ES query on openalex-works in Filter Context
works_query = {
"bool": {
"filter": [
{
"range": {
"publication_year": {
"gte": START_YEAR,
"lte": END_YEAR
}
}
},
topic_clause,
{
"nested": {
"path": "authorships.institutions",
"query": {
"terms": {
"authorships.institutions.id": [inst["id"] for inst in top_10]
}
}
}
}
]
}
}
aggregations = {
"institutions_agg": {
"filters": {
"filters": filters_map
},
"aggs": {
"by_year": {
"terms": {
"field": "publication_year",
"size": len(years_range) * 2
},
"aggs": {
"citations_sum": {
"sum": {
"field": "cited_by_count"
}
}
}
}
}
}
}
try:
works_res = await elasticsearch.search(
index="openalex-works*",
query=works_query,
body={"aggs": aggregations},
size=0,
cluster="nes"
)
inst_buckets = works_res.get("aggregations", {}).get("institutions_agg", {}).get("buckets", {})
for inst_id, inst_bucket in inst_buckets.items():
year_buckets = inst_bucket.get("by_year", {}).get("buckets", [])
for yr_bucket in year_buckets:
yr = int(yr_bucket.get("key"))
pubs = int(yr_bucket.get("doc_count", 0))
cits = int(yr_bucket.get("citations_sum", {}).get("value", 0))
if yr in years_range:
accumulated_data[inst_id][yr] = (pubs, cits)
except Exception as e:
logger.error("Error executing ranking aggregations on openalex-works: %s", e)
# Map the accumulated results back into the timeseries response model
timeseries: List[UniversityTopicData] = []
inst_name_map = {inst["id"]: inst["display_name"] for inst in top_10}
for inst_id, year_dict in accumulated_data.items():
yearly_data = []
for year in range(START_YEAR, END_YEAR + 1):
count_item = es_counts.get(year, {})
for yr in years_range:
pubs, cits = year_dict[yr]
yearly_data.append(YearlyData(
year=year,
publications=count_item.get("works_count", 0),
citations=count_item.get("cited_by_count", 0)
year=yr,
publications=pubs,
citations=cits
))
timeseries.append(UniversityTopicData(
university=source.get("display_name", "Unknown"),
topic=topic,
university=inst_name_map[inst_id],
topic=topic_obj,
yearly_data=yearly_data
))
@@ -1,7 +1,7 @@
from pydantic import BaseModel
from typing import List, Literal
from typing import List, Literal, Dict, Optional
from inse.models.openalex.topic import Topic
ResearchTopic = Literal['Artificial Intelligence', 'Quantum Computing', 'Renewable Energy', 'Biotechnology']
DashboardMetric = Literal['publications', 'citations']
class YearlyData(BaseModel):
@@ -11,7 +11,7 @@ class YearlyData(BaseModel):
class UniversityTopicData(BaseModel):
university: str
topic: ResearchTopic
topic: Topic
yearly_data: List[YearlyData]
class UniversityRanking(BaseModel):
@@ -27,4 +27,37 @@ class RankingResponse(BaseModel):
# Raw timeseries data for the ECharts line race
timeseries: List[UniversityTopicData]
# Computed metrics for the ranking table
rankings: List[UniversityRanking]
rankings: List[UniversityRanking]
# Trend Analysis Models
class TopicYearlyData(BaseModel):
year: int
raw: int
normalized: float
cumulative: float
institutions_count: int
class TrendSeries(BaseModel):
entity_id: str
entity_name: str
entity_type: Literal['institution', 'country', 'region']
country_code: Optional[str] = None
# Map topic display name to its yearly data
topic_data: Dict[str, List[TopicYearlyData]]
class TrendResponse(BaseModel):
series: List[TrendSeries]
years: List[int]
location_mappings: Optional[Dict[str, List[str]]] = None
from inse.models.openalex.dehydrated_institution import DehydratedInstitution
class TopInstitutionItem(DehydratedInstitution):
works_count: Optional[int] = None
exact_topic_count: Optional[int] = None
class AutocompleteLocationItem(BaseModel):
id: str
display_name: str
code: str
type: Literal['country', 'continent']
@@ -1,23 +0,0 @@
from fastapi import APIRouter, Query
from . import service
from .model import RankingResponse, ResearchTopic, DashboardMetric
from inse.tags import Tags
router = APIRouter(
prefix="/api/inse-service/university-rankings",
tags=[Tags.INSTITUTIONS]
)
@router.get(
"",
response_model=RankingResponse,
summary="Returns data for the University Ranking Dashboard."
)
async def get_rankings(
topic: ResearchTopic = Query(
...,
description="Research topic (e.g., 'Artificial Intelligence')"
),
metric: DashboardMetric = Query("publications", description="Metric to rank by")
):
return await service.get_university_dashboard_data(topic, metric)
@@ -1,6 +1,80 @@
from . import logic
from .model import RankingResponse, ResearchTopic, DashboardMetric
import logging
from typing import List, Optional
from fastapi import APIRouter, Query
async def get_university_dashboard_data(topic: ResearchTopic, metric: DashboardMetric) -> RankingResponse:
"""Orchestrates data retrieval and computation for the dashboard."""
return await logic.get_ranking_data(topic, metric)
from inse.tags import Tags
from . import logic, trend_logic
from .model import (
RankingResponse,
DashboardMetric,
TrendResponse,
TopInstitutionItem,
AutocompleteLocationItem
)
logger = logging.getLogger(__name__)
router = APIRouter(
prefix="/api/inse-service/university-rankings",
tags=[Tags.UNIVERSITY_RANKINGS]
)
@router.get(
"",
response_model=RankingResponse,
summary="Returns data for the University Ranking Dashboard."
)
async def get_rankings(
topic: str = Query(
...,
description="Research topic display name or OpenAlex ID (e.g., 'Artificial Intelligence')"
),
metric: DashboardMetric = Query("publications", description="Metric to rank by")
):
return await logic.get_ranking_data(topic, metric)
@router.get(
"/trend",
response_model=TrendResponse,
summary="Returns timeseries publication data for compared institutions, countries and regions."
)
async def get_trend(
topics: List[str] = Query(..., description="List of topics to analyze"),
institutions: Optional[List[str]] = Query(None, description="List of OpenAlex Institution IDs"),
countries: Optional[List[str]] = Query(None, description="List of country codes"),
regions: Optional[List[str]] = Query(None, description="List of region identifiers")
):
return await trend_logic.get_trend_data(
topics=topics,
institutions=institutions,
countries=countries,
regions=regions
)
@router.get(
"/top-institutions",
response_model=List[TopInstitutionItem],
summary="Returns top institutions filtered by country/region and sorted by topic-level publications count."
)
async def get_top_institutions(
topic: str = Query(..., description="Research topic"),
region: Optional[str] = Query(None, description="Region identifier (e.g. EU)"),
country: Optional[str] = Query(None, description="Country code (e.g. DE)"),
limit: int = Query(10, description="Max suggestions to return")
):
return await trend_logic.get_top_institutions_by_region(
topic=topic,
region=region,
country=country,
limit=limit
)
@router.get(
"/autocomplete-locations",
response_model=List[AutocompleteLocationItem],
summary="Returns country and continent options for autocomplete inputs."
)
async def get_autocomplete_locations(
query: str = Query(..., description="Query text to search for countries/continents")
):
return await trend_logic.autocomplete_locations(query)
@@ -0,0 +1,656 @@
import logging
import uuid
import datetime
from typing import List, Dict, Any, Optional
import numpy as np
from sklearn.preprocessing import MinMaxScaler
from sqlmodel import Session
from inse.integrations import elasticsearch
from inse.model import ESIndex
from inse.auth.model import AccessToken, Organization
from .model import (
TrendResponse,
TrendSeries,
TopicYearlyData,
TopInstitutionItem,
AutocompleteLocationItem
)
logger = logging.getLogger(__name__)
# Default fallback institution: University of Duisburg-Essen
DEFAULT_INSTITUTION_ID = "https://openalex.org/I62318514"
DEFAULT_INSTITUTION_NAME = "University of Duisburg-Essen"
async def autocomplete_locations(query: str) -> List[AutocompleteLocationItem]:
stripped = query.strip()
if not stripped:
return []
import asyncio
# Query countries index (Idea: Instead of wildcard: use alternative names?)
country_query = {
"bool": {
"should": [
{
"wildcard": {
"display_name.keyword": {
"value": f"*{stripped}*",
"case_insensitive": True
}
}
},
{
"match": {
"country_code": {
"query": stripped.upper(),
"boost": 5
}
}
}
],
"minimum_should_match": 1
}
}
# Query continents index
continent_query = {
"wildcard": {
"display_name.keyword": {
"value": f"*{stripped}*",
"case_insensitive": True
}
}
}
try:
countries_res, continents_res = await asyncio.gather(
elasticsearch.search(
index=str(ESIndex.OPENALEX_COUNTRIES),
query=country_query,
size=10,
source=["id", "display_name", "country_code", "wikidata_id"],
cluster="nes"
),
elasticsearch.search(
index=str(ESIndex.OPENALEX_CONTINENTS),
query=continent_query,
size=5,
source=["id", "display_name", "wikidata_id"],
cluster="nes"
)
)
except Exception as e:
logger.error("Failed to autocomplete locations in ES: %s", e)
return []
results = []
# Process continents
for hit in continents_res.get("hits", {}).get("hits", []):
source = hit["_source"]
code_val = source.get("wikidata_id") or source["id"].split("/")[-1]
results.append(AutocompleteLocationItem(
id=code_val,
display_name=source["display_name"],
code=code_val,
type="continent"
))
# Process countries
for hit in countries_res.get("hits", {}).get("hits", []):
source = hit["_source"]
results.append(AutocompleteLocationItem(
id=source["country_code"],
display_name=source["display_name"],
code=source["country_code"],
type="country"
))
return results
async def get_top_institutions_by_region(
topic: str,
region: Optional[str] = None,
country: Optional[str] = None,
limit: int = 10
) -> List[TopInstitutionItem]:
"""
Search top educational institutions by region or country based on publication counts
for the specific topic, using a two-step Python-based sorting approach.
"""
country_codes = []
if country:
country_codes = [country.upper()]
elif region:
try:
# Query openalex-continents index to resolve continent country codes dynamically
res = await elasticsearch.search(
index=str(ESIndex.OPENALEX_CONTINENTS),
query={
"bool": {
"should": [
{"term": {"wikidata_id.keyword": region}},
{"term": {"id": f"https://openalex.org/continents/{region}"}}
]
}
},
size=1,
source=["countries"],
cluster="nes"
)
hits = res.get("hits", {}).get("hits", [])
if hits:
source = hits[0]["_source"]
country_codes = [
c["id"].split("/")[-1].upper() for c in source.get("countries", [])
]
except Exception as e:
logger.warning("Failed to resolve continent countries in get_top_institutions_by_region: %s", e)
# Resolve the topic to get the exact ID/display name
topic_filter = {"match_phrase": {"topics.display_name": topic}}
try:
topic_res = await elasticsearch.search(
index="openalex-topics",
query={"match_phrase": {"display_name": topic}},
size=1,
source=["id", "display_name"],
cluster="nes"
)
hits = topic_res.get("hits", {}).get("hits", [])
if hits:
source = hits[0]["_source"]
topic_id = source["id"]
topic_filter = {"term": {"topics.id.keyword": topic_id}}
except Exception as e:
logger.warning("Failed to resolve topic in get_top_institutions_by_region: %s", e)
# Query openalex-institutions for educational entities matching country and topic
must_clauses: List[Dict[str, Any]] = [
{"term": {"type": "education"}},
topic_filter
]
if country_codes:
must_clauses.append({"terms": {"geo.country_code": country_codes}})
query = {"bool": {"filter": must_clauses}}
# Fetch top 50 by overall works count to cover a good pool of institutions
res = await elasticsearch.search(
index=str(ESIndex.OPENALEX_INSTITUTIONS),
query=query,
size=50,
source=["id", "display_name", "country_code", "works_count", "topics"],
sort=[{"works_count": "desc"}],
cluster="nes"
)
hits = res.get("hits", {}).get("hits", [])
candidates = []
for hit in hits:
source = hit["_source"]
inst_id = source.get("id")
display_name = source.get("display_name", "Unknown")
country_code = source.get("country_code")
works_count = source.get("works_count")
# Extract exact count for the selected topic
exact_topic_count = 0
for t in source.get("topics", []):
if t.get("display_name", "").lower() == topic.lower():
exact_topic_count = t.get("count", 0)
break
candidates.append(TopInstitutionItem(
id=inst_id,
display_name=display_name,
country_code=country_code,
works_count=works_count,
exact_topic_count=exact_topic_count
))
# Sort candidates by exact_topic_count descending
candidates.sort(key=lambda x: x.exact_topic_count or 0, reverse=True)
return candidates[:limit]
async def get_trend_data(
topics: List[str],
institutions: Optional[List[str]] = None,
countries: Optional[List[str]] = None,
regions: Optional[List[str]] = None
) -> TrendResponse:
"""
Traverses the openalex-works index to retrieve yearly contributions of selected/top
institutions, countries, and regions across multiple topics.
"""
if not topics:
return TrendResponse(series=[], years=[])
import asyncio
start_year = 2000
end_year = datetime.datetime.now().year - 1
years_range = list(range(start_year, end_year + 1))
# Resolve primary institution (default University of Duisburg-Essen for everyone)
primary_inst_id = DEFAULT_INSTITUTION_ID
primary_inst_name = DEFAULT_INSTITUTION_NAME
# Initialize institutions list and ensure primary is included
query_institutions = []
if institutions:
query_institutions = [i.strip() for i in institutions]
if primary_inst_id not in query_institutions:
query_institutions.insert(0, primary_inst_id)
# Prepare lists of countries and regions dynamically
query_countries = countries or []
query_regions = regions or []
clean_countries = [c.strip().upper() for c in query_countries]
clean_regions = [r.strip() for r in query_regions]
ids_to_resolve = list(set(query_institutions))
# Define concurrent metadata lookups
async def fetch_institutions():
names = {primary_inst_id: primary_inst_name}
codes = {}
if not ids_to_resolve:
return names, codes
try:
res = await elasticsearch.search(
index=str(ESIndex.OPENALEX_INSTITUTIONS),
query={"terms": {"id": ids_to_resolve}},
size=len(ids_to_resolve),
source=["id", "display_name", "country_code"],
cluster="nes"
)
for hit in res.get("hits", {}).get("hits", []):
source = hit["_source"]
names[source["id"]] = source.get("display_name", source["id"])
codes[source["id"]] = source.get("country_code", "")
except Exception as e:
logger.warning("Failed to resolve institution details from ES: %s", e)
return names, codes
async def fetch_countries():
names = {}
if not clean_countries:
return names
try:
res = await elasticsearch.search(
index=str(ESIndex.OPENALEX_COUNTRIES),
query={"terms": {"country_code": clean_countries}},
size=len(clean_countries),
source=["country_code", "display_name"],
cluster="nes"
)
for hit in res.get("hits", {}).get("hits", []):
source = hit["_source"]
names[source["country_code"]] = source["display_name"]
except Exception as e:
logger.warning("Failed to resolve country names from ES: %s", e)
return names
async def fetch_continents():
names = {}
ccodes = {}
if not clean_regions:
return names, ccodes
try:
res = await elasticsearch.search(
index=str(ESIndex.OPENALEX_CONTINENTS),
query={
"bool": {
"should": [
{"terms": {"wikidata_id.keyword": clean_regions}},
{"terms": {"id": [f"https://openalex.org/continents/{r}" for r in clean_regions]}}
]
}
},
size=len(clean_regions),
source=["id", "display_name", "wikidata_id", "countries"],
cluster="nes"
)
for hit in res.get("hits", {}).get("hits", []):
source = hit["_source"]
c_code = source.get("wikidata_id") or source["id"].split("/")[-1]
names[c_code] = source["display_name"]
ccodes[c_code] = [c["id"].split("/")[-1].upper() for c in source.get("countries", [])]
except Exception as e:
logger.warning("Failed to resolve continent names from ES: %s", e)
return names, ccodes
async def fetch_topics():
t_ids = {}
try:
res = await elasticsearch.search(
index="openalex-topics",
query={"bool": {"should": [{"match_phrase": {"display_name": t}} for t in topics]}},
size=len(topics) * 2,
source=["id", "display_name"],
cluster="nes"
)
for hit in res.get("hits", {}).get("hits", []):
source = hit["_source"]
for t in topics:
if t.lower() in source["display_name"].lower():
t_ids[t] = source["id"]
except Exception as e:
logger.warning("Failed to resolve topic IDs from ES: %s", e)
return t_ids
# Execute all 4 queries concurrently
(
(resolved_names, resolved_country_codes),
resolved_country_names,
(resolved_continent_names, continent_country_codes),
resolved_topic_ids
) = await asyncio.gather(fetch_institutions(), fetch_countries(), fetch_continents(), fetch_topics())
location_mappings = continent_country_codes.copy()
# Map of filters inside our Elasticsearch aggregation
filters_map: Dict[str, Dict[str, Any]] = {}
# 1. Institution Filters
for inst_id in query_institutions:
filters_map[f"inst_{inst_id}"] = {
"nested": {
"path": "authorships.institutions",
"query": {
"term": {
"authorships.institutions.id": inst_id
}
}
}
}
# 2. Country Filters
for cc in clean_countries:
filters_map[f"country_{cc}"] = {
"nested": {
"path": "authorships.institutions",
"query": {
"term": {
"authorships.institutions.country_code": cc
}
}
}
}
# 3. Continent/Region Filters
for r_code, member_ccs in continent_country_codes.items():
if member_ccs:
filters_map[f"region_{r_code}"] = {
"nested": {
"path": "authorships.institutions",
"query": {
"terms": {
"authorships.institutions.country_code": member_ccs
}
}
}
}
# If no entities specified, return empty
if not filters_map:
return TrendResponse(series=[], years=years_range, location_mappings=location_mappings)
# We will accumulate results in a nested structure: entity_key -> topic -> year -> (count, inst_count)
accumulated_data: Dict[str, Dict[str, Dict[int, tuple]]] = {
key: {t: {yr: (0, 1) for yr in years_range} for t in topics}
for key in filters_map
}
# Build topic matching clauses and filters
topic_clauses = []
topic_filters = {}
for t in topics:
tid = resolved_topic_ids.get(t)
if tid:
clause = {
"bool": {
"should": [
{"nested": {"path": "topics", "query": {"term": {"topics.id": tid}}}},
{"term": {"primary_topic.id": tid}}
],
"minimum_should_match": 1
}
}
else:
clause = {
"bool": {
"should": [
{"nested": {"path": "topics", "query": {"match_phrase": {"topics.display_name": t}}}},
{"match_phrase": {"primary_topic.display_name": t}}
],
"minimum_should_match": 1
}
}
topic_clauses.append(clause)
topic_filters[t] = clause
# Build query-level entity filters to optimize search performance
entity_should_clauses = []
if query_institutions:
entity_should_clauses.append({
"nested": {
"path": "authorships.institutions",
"query": {
"terms": {
"authorships.institutions.id": query_institutions
}
}
}
})
if clean_countries:
entity_should_clauses.append({
"nested": {
"path": "authorships.institutions",
"query": {
"terms": {
"authorships.institutions.country_code": clean_countries
}
}
}
})
all_continent_countries = []
for member_ccs in continent_country_codes.values():
all_continent_countries.extend(member_ccs)
if all_continent_countries:
entity_should_clauses.append({
"nested": {
"path": "authorships.institutions",
"query": {
"terms": {
"authorships.institutions.country_code": list(set(all_continent_countries))
}
}
}
})
# Construct the single-pass Elasticsearch query
filter_clauses = [
{
"range": {
"publication_year": {
"gte": start_year,
"lte": end_year
}
}
},
{
"bool": {
"should": topic_clauses,
"minimum_should_match": 1
}
}
]
if entity_should_clauses:
filter_clauses.append({
"bool": {
"should": entity_should_clauses,
"minimum_should_match": 1
}
})
query = {
"bool": {
"filter": filter_clauses
}
}
# Build two-layer nested aggregations (topics -> entities -> publication_year)
aggregations = {
"topics_agg": {
"filters": {
"filters": topic_filters
},
"aggs": {
"entities_agg": {
"filters": {
"filters": filters_map
},
"aggs": {
"by_year": {
"terms": {
"field": "publication_year",
"size": len(years_range) * 2
}
}
}
}
}
}
}
try:
res = await elasticsearch.search(
index=f"{str(ESIndex.OPENALEX_WORKS)}*",
query=query,
body={"aggs": aggregations},
size=0,
cluster="nes"
)
topics_buckets = res.get("aggregations", {}).get("topics_agg", {}).get("buckets", {})
for t_name, t_bucket in topics_buckets.items():
entities_buckets = t_bucket.get("entities_agg", {}).get("buckets", {})
for entity_key, e_bucket in entities_buckets.items():
year_buckets = e_bucket.get("by_year", {}).get("buckets", [])
for yr_bucket in year_buckets:
yr = int(yr_bucket.get("key"))
count = int(yr_bucket.get("doc_count", 0))
inst_count = 1
if yr in years_range:
accumulated_data[entity_key][t_name][yr] = (count, inst_count)
except Exception as e:
logger.error("Error executing single-pass Elasticsearch query: %s", e)
# Construct lists of raw counts and S-Curves for all series to normalize in parallel
series_keys = []
raw_lists = []
cumsum_lists = []
inst_counts_map = {}
for entity_key, topic_dict in accumulated_data.items():
for topic, year_dict in topic_dict.items():
raw_counts = []
inst_counts = []
for yr in years_range:
count, inst_count = year_dict[yr]
raw_counts.append(count)
inst_counts.append(inst_count)
cumulative_counts = list(np.cumsum(raw_counts))
series_keys.append((entity_key, topic))
raw_lists.append(raw_counts)
cumsum_lists.append(cumulative_counts)
inst_counts_map[(entity_key, topic)] = inst_counts
normalized_lookup = {}
if raw_lists:
# Construct matrices of shape (n_years, n_series)
raw_matrix = np.array(raw_lists, dtype=float).T
cumsum_matrix = np.array(cumsum_lists, dtype=float).T
# Batch normalize columns in parallel using MinMaxScaler
scaler_raw = MinMaxScaler()
normalized_matrix = scaler_raw.fit_transform(raw_matrix)
scaler_cumsum = MinMaxScaler()
normalized_cumsum_matrix = scaler_cumsum.fit_transform(cumsum_matrix)
# Transpose back to lists of shape (n_series, n_years)
normalized_lists = normalized_matrix.T.tolist()
normalized_cumsum_lists = normalized_cumsum_matrix.T.tolist()
for idx, (entity_key, topic) in enumerate(series_keys):
normalized_lookup[(entity_key, topic)] = {
"normalized": normalized_lists[idx],
"cumulative": normalized_cumsum_lists[idx]
}
# Process and build TrendSeries list
series_list: List[TrendSeries] = []
for entity_key, topic_dict in accumulated_data.items():
# Resolve details for this entity
if entity_key.startswith("inst_"):
entity_id = entity_key[len("inst_"):]
entity_name = resolved_names.get(entity_id, entity_id)
entity_type = "institution"
elif entity_key.startswith("country_"):
entity_id = entity_key[len("country_"):]
entity_name = resolved_country_names.get(entity_id, f"Country {entity_id}")
entity_type = "country"
elif entity_key.startswith("region_"):
entity_id = entity_key[len("region_"):]
entity_name = resolved_continent_names.get(entity_id, f"Continent {entity_id}")
entity_type = "region"
else:
continue
topic_data_map: Dict[str, List[TopicYearlyData]] = {}
for topic, year_dict in topic_dict.items():
yearly_data_items: List[TopicYearlyData] = []
lookup = normalized_lookup.get((entity_key, topic), {})
norm_vals = lookup.get("normalized", [0.0] * len(years_range))
cum_vals = lookup.get("cumulative", [0.0] * len(years_range))
inst_counts = inst_counts_map.get((entity_key, topic), [1] * len(years_range))
for idx, yr in enumerate(years_range):
count, _ = year_dict[yr]
yearly_data_items.append(TopicYearlyData(
year=yr,
raw=count,
normalized=norm_vals[idx],
cumulative=cum_vals[idx],
institutions_count=inst_counts[idx]
))
topic_data_map[topic] = yearly_data_items
series_list.append(TrendSeries(
entity_id=entity_id,
entity_name=entity_name,
entity_type=entity_type,
country_code=resolved_country_codes.get(entity_id) if entity_type == "institution" else None,
topic_data=topic_data_map
))
return TrendResponse(series=series_list, years=years_range, location_mappings=location_mappings)
+1 -1
View File
@@ -19,4 +19,4 @@
}
}
}
}
}
@@ -17,6 +17,7 @@ api/personNetwork.service.ts
api/persons.service.ts
api/projects.service.ts
api/topics.service.ts
api/universityRankings.service.ts
api/works.service.ts
configuration.ts
encoder.ts
@@ -38,6 +39,7 @@ model/authorSummaryStats.ts
model/authorsFilterProperties.ts
model/authorsListResponse.ts
model/authorship.ts
model/autocompleteLocationItem.ts
model/autocompleteResponse.ts
model/autocompleteResponseMeta.ts
model/autocompleteResponseResultsInner.ts
@@ -164,16 +166,20 @@ model/rankingResponse.ts
model/score.ts
model/sortDirection.ts
model/tokenType.ts
model/topInstitutionItem.ts
model/topic.ts
model/topicCount.ts
model/topicDomain.ts
model/topicField.ts
model/topicIds.ts
model/topicSubfield.ts
model/topicYearlyData.ts
model/topics.ts
model/topicsByTime.ts
model/topicsByYear.ts
model/topicsListResponse.ts
model/trendResponse.ts
model/trendSeries.ts
model/universityRanking.ts
model/universityTopicData.ts
model/updateAccountRequest.ts
+46 -45
View File
@@ -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,21 +120,22 @@ 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,
},
],
};
```
@@ -151,12 +152,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),
],
};
```
@@ -176,8 +177,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
+88 -62
View File
@@ -1,83 +1,109 @@
/**
* 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();
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 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 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");
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');
}
}
+32 -20
View File
@@ -1,30 +1,42 @@
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.');
}
if (!http) {
throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
'See also https://github.com/angular/angular/issues/20575');
}
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',
);
}
}
}
+19 -1
View File
@@ -24,6 +24,24 @@ export * from './projects.service';
import { ProjectsService } from './projects.service';
export * from './topics.service';
import { TopicsService } from './topics.service';
export * from './universityRankings.service';
import { UniversityRankingsService } from './universityRankings.service';
export * from './works.service';
import { WorksService } from './works.service';
export const APIS = [AuthService, CompanyConnectionsService, FundingService, INSEServiceService, InstitutionsService, KeywordsService, NewsService, OrganizationService, PatentsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, WorksService];
export const APIS = [
AuthService,
CompanyConnectionsService,
FundingService,
INSEServiceService,
InstitutionsService,
KeywordsService,
NewsService,
OrganizationService,
PatentsService,
PersonNetworkService,
PersonsService,
ProjectsService,
TopicsService,
UniversityRankingsService,
WorksService,
];
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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 { CompanyConnectionsResponse } from '../model/companyConnectionsResponse';
@@ -22,74 +28,121 @@ import { CompanyConnectionsResponse } from '../model/companyConnectionsResponse'
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class CompanyConnectionsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Get possible company connections by OpenAlex author ID.
* @endpoint get /api/inse-service/authors/{author_id}/company-connections
* @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 getCompanyConnectionsByAuthor(
authorId: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<CompanyConnectionsResponse>;
public getCompanyConnectionsByAuthor(
authorId: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(
authorId: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(
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 getCompanyConnectionsByAuthor.',
);
}
/**
* Get possible company connections by OpenAlex author ID.
* @endpoint get /api/inse-service/authors/{author_id}/company-connections
* @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 getCompanyConnectionsByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CompanyConnectionsResponse>;
public getCompanyConnectionsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CompanyConnectionsResponse>>;
public getCompanyConnectionsByAuthor(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 getCompanyConnectionsByAuthor.');
}
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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CompanyConnectionsResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<CompanyConnectionsResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+240 -126
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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/fundersByAuthorResponse';
@@ -24,138 +30,246 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
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';
@Injectable({
providedIn: 'root'
providedIn: 'root',
})
export class FundingService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* 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.',
);
}
/**
* 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.');
}
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 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 localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* 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 localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>pageSize, 'page_size');
const localVarTransferCache: boolean = options?.transferCache ?? true;
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 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,
},
);
}
/**
* 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,
},
);
}
}
+324 -174
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,205 +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/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 INSEServiceService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* 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,
);
}
/**
* 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> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>pageSize, 'page_size');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>saveJson, 'save_json');
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);
}
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,
},
);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
/**
* 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.',
);
}
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
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (topic) {
topic.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'topic',
);
});
}
/**
* 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 localVarHeaders = this.defaultHeaders;
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
}
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns the nested topic hierarchy (Domains -&gt; Fields -&gt; Subfields -&gt; 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> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
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
}
);
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,
},
);
}
/**
* Returns the nested topic hierarchy (Domains -&gt; Fields -&gt; Subfields -&gt; 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,
},
);
}
}
+574 -337
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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/autocompleteResponse';
@@ -26,362 +32,593 @@ import { Institution } from '../model/institution';
import { InstitutionPage } from '../model/institutionPage';
// @ts-ignore
import { InstitutionsListResponse } from '../model/institutionsListResponse';
// @ts-ignore
import { RankingResponse } from '../model/rankingResponse';
// @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 InstitutionsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Returns institution options for autocomplete inputs.
* @endpoint get /api/inse-service/institutions/autocomplete
* @param query Institution search text, for example \&#39;Duisburg Essen\&#39;.
* @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.',
);
}
/**
* Returns institution options for autocomplete inputs.
* @endpoint get /api/inse-service/institutions/autocomplete
* @param query Institution search text, for example \&#39;Duisburg Essen\&#39;.
* @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 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',
);
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');
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 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/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 localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Returns a single institution by ID.
* Returns a single institution by its OpenAlex ID.
* @endpoint get /api/inse-service/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 localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
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/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 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 data for the University Ranking Dashboard.
* @endpoint get /api/inse-service/university-rankings
* @param topic Research topic (e.g., \&#39;Artificial Intelligence\&#39;)
* @param metric Metric to rank by
* @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 getRankingsApiInseServiceUniversityRankingsGet(topic: 'Artificial Intelligence' | 'Quantum Computing' | 'Renewable Energy' | 'Biotechnology', metric?: 'publications' | 'citations', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<RankingResponse>;
public getRankingsApiInseServiceUniversityRankingsGet(topic: 'Artificial Intelligence' | 'Quantum Computing' | 'Renewable Energy' | 'Biotechnology', metric?: 'publications' | 'citations', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<RankingResponse>>;
public getRankingsApiInseServiceUniversityRankingsGet(topic: 'Artificial Intelligence' | 'Quantum Computing' | 'Renewable Energy' | 'Biotechnology', metric?: 'publications' | 'citations', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<RankingResponse>>;
public getRankingsApiInseServiceUniversityRankingsGet(topic: 'Artificial Intelligence' | 'Quantum Computing' | 'Renewable Energy' | 'Biotechnology', metric?: 'publications' | 'citations', 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 getRankingsApiInseServiceUniversityRankingsGet.');
}
let localVarPath = `/api/inse-service/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,
},
);
}
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>topic, 'topic');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>metric, 'metric');
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/university-rankings`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<RankingResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
/**
* Returns a single institution by ID.
* Returns a single institution by its OpenAlex ID.
* @endpoint get /api/inse-service/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.',
);
}
/**
* Returns a list of OpenAlex institutions.
* @endpoint get /api/inse-service/institutions
* @param search Full-text search, for example \&#39;Duisburg Essen\&#39;.
* @param filter OpenAlex filter, for example \&#39;country_code:DE,type:education\&#39;.
* @param sort Sort field, for example \&#39;works_count:desc\&#39;.
* @param groupBy OpenAlex group_by field, for example \&#39;country_code\&#39;.
* @param perPage Results per page.
* @param page Page number. Use cursor for deep pagination.
* @param cursor Cursor pagination token. Use \&#39;*\&#39; 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 localVarHeaders = this.defaultHeaders;
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;
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/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 localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Searches for institutions by name.
* Searches for institutions by name with pagination.
* @endpoint get /api/inse-service/institutions/search
* @param name Institution name to search for, for example \&#39;University of Duisburg Essen\&#39;.
* @param page Page number (0-indexed).
* @param size Number of institutions per page.
* @param sortBy Field to sort by, either \&#39;relevance\&#39;, \&#39;name\&#39;, \&#39;works_count\&#39;, or \&#39;citations_count\&#39;.
* @param sortingDirection Sorting direction, either \&#39;asc\&#39; or \&#39;desc\&#39;.
* @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 searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionPage>;
public searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionPage>>;
public searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionPage>>;
public searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>name, 'name');
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>sortingDirection, 'sorting_direction');
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/institutions/search`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
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';
}
}
let localVarPath = `/api/inse-service/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,
},
);
}
/**
* Returns a list of OpenAlex institutions.
* @endpoint get /api/inse-service/institutions
* @param search Full-text search, for example \&#39;Duisburg Essen\&#39;.
* @param filter OpenAlex filter, for example \&#39;country_code:DE,type:education\&#39;.
* @param sort Sort field, for example \&#39;works_count:desc\&#39;.
* @param groupBy OpenAlex group_by field, for example \&#39;country_code\&#39;.
* @param perPage Results per page.
* @param page Page number. Use cursor for deep pagination.
* @param cursor Cursor pagination token. Use \&#39;*\&#39; 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 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/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,
},
);
}
/**
* Searches for institutions by name.
* Searches for institutions by name with pagination.
* @endpoint get /api/inse-service/institutions/search
* @param name Institution name to search for, for example \&#39;University of Duisburg Essen\&#39;.
* @param page Page number (0-indexed).
* @param size Number of institutions per page.
* @param sortBy Field to sort by, either \&#39;relevance\&#39;, \&#39;name\&#39;, \&#39;works_count\&#39;, or \&#39;citations_count\&#39;.
* @param sortingDirection Sorting direction, either \&#39;asc\&#39; or \&#39;desc\&#39;.
* @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 searchInstitutionsByName(
name?: string,
page?: number,
size?: number,
sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count',
sortingDirection?: 'asc' | 'desc',
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InstitutionPage>;
public searchInstitutionsByName(
name?: string,
page?: number,
size?: number,
sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count',
sortingDirection?: 'asc' | 'desc',
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<InstitutionPage>>;
public searchInstitutionsByName(
name?: string,
page?: number,
size?: number,
sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count',
sortingDirection?: 'asc' | 'desc',
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InstitutionPage>>;
public searchInstitutionsByName(
name?: string,
page?: number,
size?: number,
sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count',
sortingDirection?: 'asc' | 'desc',
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>name,
'name',
);
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>sortingDirection,
'sorting_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/inse-service/institutions/search`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InstitutionPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+131 -76
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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 { ExtractedKeywordsResponse } from '../model/extractedKeywordsResponse';
@@ -24,84 +30,133 @@ import { HTTPValidationError } from '../model/hTTPValidationError';
import { KeywordsRequest } from '../model/keywordsRequest';
// @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 KeywordsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Extracts keywords from text.
* @endpoint post /api/inse-service/keywords/extract
* @param keywordsRequest
* @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 extractKeywords(
keywordsRequest: KeywordsRequest,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<ExtractedKeywordsResponse>;
public extractKeywords(
keywordsRequest: KeywordsRequest,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<ExtractedKeywordsResponse>>;
public extractKeywords(
keywordsRequest: KeywordsRequest,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<ExtractedKeywordsResponse>>;
public extractKeywords(
keywordsRequest: KeywordsRequest,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (keywordsRequest === null || keywordsRequest === undefined) {
throw new Error(
'Required parameter keywordsRequest was null or undefined when calling extractKeywords.',
);
}
/**
* Extracts keywords from text.
* @endpoint post /api/inse-service/keywords/extract
* @param keywordsRequest
* @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 extractKeywords(keywordsRequest: KeywordsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<ExtractedKeywordsResponse>;
public extractKeywords(keywordsRequest: KeywordsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<ExtractedKeywordsResponse>>;
public extractKeywords(keywordsRequest: KeywordsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<ExtractedKeywordsResponse>>;
public extractKeywords(keywordsRequest: KeywordsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (keywordsRequest === null || keywordsRequest === undefined) {
throw new Error('Required parameter keywordsRequest was null or undefined when calling extractKeywords.');
}
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 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/keywords/extract`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ExtractedKeywordsResponse>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: keywordsRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
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/keywords/extract`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<ExtractedKeywordsResponse>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: keywordsRequest,
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
+533 -269
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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 { CreateOrganizationRequest } from '../model/createOrganizationRequest';
@@ -28,287 +34,545 @@ import { OrganizationPage } from '../model/organizationPage';
import { UpdateOrganizationRequest } from '../model/updateOrganizationRequest';
// @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 OrganizationService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Create Organization
* @endpoint post /api/organizations
* @param createOrganizationRequest
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createOrganisation(
createOrganizationRequest: CreateOrganizationRequest,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InseOrganizationManagementModelOrganizationProfile>;
public createOrganisation(
createOrganizationRequest: CreateOrganizationRequest,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<
HttpResponse<InseOrganizationManagementModelOrganizationProfile>
>;
public createOrganisation(
createOrganizationRequest: CreateOrganizationRequest,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InseOrganizationManagementModelOrganizationProfile>>;
public createOrganisation(
createOrganizationRequest: CreateOrganizationRequest,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (
createOrganizationRequest === null ||
createOrganizationRequest === undefined
) {
throw new Error(
'Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.',
);
}
/**
* Create Organization
* @endpoint post /api/organizations
* @param createOrganizationRequest
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InseOrganizationManagementModelOrganizationProfile>;
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InseOrganizationManagementModelOrganizationProfile>>;
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InseOrganizationManagementModelOrganizationProfile>>;
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (createOrganizationRequest === null || createOrganizationRequest === undefined) {
throw new Error('Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/organizations`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InseOrganizationManagementModelOrganizationProfile>('post', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createOrganizationRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Delete Organization
* @endpoint delete /api/organizations/{organization_id}
* @param organizationId
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (organizationId === null || organizationId === undefined) {
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganisation.');
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/organizations/${this.configuration.encodeParam({name: "organizationId", value: organizationId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`;
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
}
);
// 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,
);
}
/**
* Get Organizations
* @endpoint get /api/organizations
* @param page
* @param pageSize
* @param offset
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<OrganizationPage>;
public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<OrganizationPage>>;
public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<OrganizationPage>>;
public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: 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>page, 'page');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>pageSize, 'page_size');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>offset, 'offset');
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/organizations`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<OrganizationPage>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
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';
}
}
/**
* Update Organization
* @endpoint put /api/organizations/{organization_id}
* @param organizationId
* @param updateOrganizationRequest
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InseOrganizationManagementModelOrganizationProfile>;
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InseOrganizationManagementModelOrganizationProfile>>;
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InseOrganizationManagementModelOrganizationProfile>>;
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (organizationId === null || organizationId === undefined) {
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganisation.');
}
if (updateOrganizationRequest === null || updateOrganizationRequest === undefined) {
throw new Error('Required parameter updateOrganizationRequest was null or undefined when calling updateOrganisation.');
}
let localVarPath = `/api/organizations`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InseOrganizationManagementModelOrganizationProfile>(
'post',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: createOrganizationRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
// 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/organizations/${this.configuration.encodeParam({name: "organizationId", value: organizationId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InseOrganizationManagementModelOrganizationProfile>('put', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateOrganizationRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
/**
* Delete Organization
* @endpoint delete /api/organizations/{organization_id}
* @param organizationId
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public deleteOrganisation(
organizationId: string,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any>;
public deleteOrganisation(
organizationId: string,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<any>>;
public deleteOrganisation(
organizationId: string,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<any>>;
public deleteOrganisation(
organizationId: string,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (organizationId === null || organizationId === undefined) {
throw new Error(
'Required parameter organizationId was null or undefined when calling deleteOrganisation.',
);
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/organizations/${this.configuration.encodeParam({ name: 'organizationId', value: organizationId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`;
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,
},
);
}
/**
* Get Organizations
* @endpoint get /api/organizations
* @param page
* @param pageSize
* @param offset
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getOrganisations(
page?: number,
pageSize?: number,
offset?: number,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<OrganizationPage>;
public getOrganisations(
page?: number,
pageSize?: number,
offset?: number,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<OrganizationPage>>;
public getOrganisations(
page?: number,
pageSize?: number,
offset?: number,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<OrganizationPage>>;
public getOrganisations(
page?: number,
pageSize?: number,
offset?: number,
secureFgpAcc?: 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>page,
'page',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>pageSize,
'page_size',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>offset,
'offset',
);
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
let localVarPath = `/api/organizations`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<OrganizationPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Update Organization
* @endpoint put /api/organizations/{organization_id}
* @param organizationId
* @param updateOrganizationRequest
* @param secureFgpAcc
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateOrganisation(
organizationId: string,
updateOrganizationRequest: UpdateOrganizationRequest,
secureFgpAcc?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<InseOrganizationManagementModelOrganizationProfile>;
public updateOrganisation(
organizationId: string,
updateOrganizationRequest: UpdateOrganizationRequest,
secureFgpAcc?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<
HttpResponse<InseOrganizationManagementModelOrganizationProfile>
>;
public updateOrganisation(
organizationId: string,
updateOrganizationRequest: UpdateOrganizationRequest,
secureFgpAcc?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<InseOrganizationManagementModelOrganizationProfile>>;
public updateOrganisation(
organizationId: string,
updateOrganizationRequest: UpdateOrganizationRequest,
secureFgpAcc?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (organizationId === null || organizationId === undefined) {
throw new Error(
'Required parameter organizationId was null or undefined when calling updateOrganisation.',
);
}
if (
updateOrganizationRequest === null ||
updateOrganizationRequest === undefined
) {
throw new Error(
'Required parameter updateOrganizationRequest was null or undefined when calling updateOrganisation.',
);
}
let localVarHeaders = this.defaultHeaders;
// authentication (HTTPBearer) required
localVarHeaders = this.configuration.addCredentialToHeaders(
'HTTPBearer',
'Authorization',
localVarHeaders,
'Bearer ',
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
const localVarTransferCache: boolean = options?.transferCache ?? true;
// 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/organizations/${this.configuration.encodeParam({ name: 'organizationId', value: organizationId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<InseOrganizationManagementModelOrganizationProfile>(
'put',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: updateOrganizationRequest,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+640 -315
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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 { AllPatentsResponse } from '../model/allPatentsResponse';
@@ -30,338 +36,657 @@ import { PatentsByAuthorResponse } from '../model/patentsByAuthorResponse';
import { PatentsByInstitutionResponse } from '../model/patentsByInstitutionResponse';
// @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 PatentsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Get all patents with pagination and search.
* @endpoint get /api/inse-service/patents
* @param page
* @param size
* @param search
* @param source
* @param sortBy
* @param sortDirection
* @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 getAllPatents(
page?: number,
size?: number,
search?: string,
source?: string,
sortBy?: string,
sortDirection?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<AllPatentsResponse>;
public getAllPatents(
page?: number,
size?: number,
search?: string,
source?: string,
sortBy?: string,
sortDirection?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<AllPatentsResponse>>;
public getAllPatents(
page?: number,
size?: number,
search?: string,
source?: string,
sortBy?: string,
sortDirection?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<AllPatentsResponse>>;
public getAllPatents(
page?: number,
size?: number,
search?: string,
source?: string,
sortBy?: string,
sortDirection?: 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>page,
'page',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>size,
'size',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>search,
'search',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>source,
'source',
);
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,
);
}
/**
* Get all patents with pagination and search.
* @endpoint get /api/inse-service/patents
* @param page
* @param size
* @param search
* @param source
* @param sortBy
* @param sortDirection
* @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 getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<AllPatentsResponse>;
public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<AllPatentsResponse>>;
public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<AllPatentsResponse>>;
public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>size, 'size');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>search, 'search');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>source, 'source');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>sortBy, 'sort_by');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>sortDirection, 'sort_direction');
const localVarTransferCache: boolean = options?.transferCache ?? true;
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/patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AllPatentsResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
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';
}
}
/**
* Get pre-indexed org patents for an institution.
* @endpoint get /api/inse-service/institutions/{id}/org-patents
* @param id
* @param matchType Filter patents by match type.
* @param page
* @param size
* @param source
* @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 getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<OrgPatentsResponse>;
public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<OrgPatentsResponse>>;
public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<OrgPatentsResponse>>;
public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: 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 getOrgPatentsByInstitution.');
}
let localVarPath = `/api/inse-service/patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<AllPatentsResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>matchType, 'match_type');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>page, 'page');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>size, 'size');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>source, 'source');
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/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/org-patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<OrgPatentsResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
/**
* Get pre-indexed org patents for an institution.
* @endpoint get /api/inse-service/institutions/{id}/org-patents
* @param id
* @param matchType Filter patents by match type.
* @param page
* @param size
* @param source
* @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 getOrgPatentsByInstitution(
id: string,
matchType?: 'institution' | 'name' | 'both' | 'all',
page?: number,
size?: number,
source?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<OrgPatentsResponse>;
public getOrgPatentsByInstitution(
id: string,
matchType?: 'institution' | 'name' | 'both' | 'all',
page?: number,
size?: number,
source?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<OrgPatentsResponse>>;
public getOrgPatentsByInstitution(
id: string,
matchType?: 'institution' | 'name' | 'both' | 'all',
page?: number,
size?: number,
source?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<OrgPatentsResponse>>;
public getOrgPatentsByInstitution(
id: string,
matchType?: 'institution' | 'name' | 'both' | 'all',
page?: number,
size?: number,
source?: 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 getOrgPatentsByInstitution.',
);
}
/**
* Returns one publication by OpenAlex ID or DOI.
* @endpoint get /api/inse-service/patents/{identifier}
* @param identifier
* @param prefix Application Prefix (EP or US)
* @param title Do we want to fallback to title search if ID and DOI dont work?
* @param fillingDate Filling date in YYYY-MM-DD format
* @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 getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PatentEntry>;
public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PatentEntry>>;
public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PatentEntry>>;
public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (identifier === null || identifier === undefined) {
throw new Error('Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.');
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>matchType,
'match_type',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>page,
'page',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>size,
'size',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>source,
'source',
);
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>prefix, 'prefix');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>title, 'title');
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>fillingDate, 'filling_date');
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 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/patents/${this.configuration.encodeParam({name: "identifier", value: identifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentEntry>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
/**
* Get patents matched to an author by name.
* @endpoint get /api/inse-service/authors/{author_id}/patents
* @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 getPatentsByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PatentsByAuthorResponse>;
public getPatentsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PatentsByAuthorResponse>>;
public getPatentsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PatentsByAuthorResponse>>;
public getPatentsByAuthor(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 getPatentsByAuthor.');
}
const localVarHttpContext: HttpContext =
options?.context ?? new HttpContext();
let localVarHeaders = this.defaultHeaders;
const localVarTransferCache: boolean = options?.transferCache ?? true;
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
'application/json'
]);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
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})}/patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentsByAuthorResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
/**
* Get patents matched to an institution by assignee name.
* @endpoint get /api/inse-service/institutions/{id}/patents
* @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 getPatentsByInstitution(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<PatentsByInstitutionResponse>;
public getPatentsByInstitution(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<PatentsByInstitutionResponse>>;
public getPatentsByInstitution(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<PatentsByInstitutionResponse>>;
public getPatentsByInstitution(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 getPatentsByInstitution.');
}
let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/org-patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<OrgPatentsResponse>(
'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;
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/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentsByInstitutionResponse>('get', `${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
reportProgress: reportProgress
}
);
/**
* Returns one publication by OpenAlex ID or DOI.
* @endpoint get /api/inse-service/patents/{identifier}
* @param identifier
* @param prefix Application Prefix (EP or US)
* @param title Do we want to fallback to title search if ID and DOI dont work?
* @param fillingDate Filling date in YYYY-MM-DD format
* @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 getPatentByIdOrTitle(
identifier: string,
prefix?: string,
title?: string,
fillingDate?: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<PatentEntry>;
public getPatentByIdOrTitle(
identifier: string,
prefix?: string,
title?: string,
fillingDate?: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<PatentEntry>>;
public getPatentByIdOrTitle(
identifier: string,
prefix?: string,
title?: string,
fillingDate?: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<PatentEntry>>;
public getPatentByIdOrTitle(
identifier: string,
prefix?: string,
title?: string,
fillingDate?: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (identifier === null || identifier === undefined) {
throw new Error(
'Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>prefix,
'prefix',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>title,
'title',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>fillingDate,
'filling_date',
);
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/patents/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentEntry>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Get patents matched to an author by name.
* @endpoint get /api/inse-service/authors/{author_id}/patents
* @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 getPatentsByAuthor(
authorId: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<PatentsByAuthorResponse>;
public getPatentsByAuthor(
authorId: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<PatentsByAuthorResponse>>;
public getPatentsByAuthor(
authorId: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<PatentsByAuthorResponse>>;
public getPatentsByAuthor(
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 getPatentsByAuthor.',
);
}
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 })}/patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentsByAuthorResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Get patents matched to an institution by assignee name.
* @endpoint get /api/inse-service/institutions/{id}/patents
* @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 getPatentsByInstitution(
id: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<PatentsByInstitutionResponse>;
public getPatentsByInstitution(
id: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<PatentsByInstitutionResponse>>;
public getPatentsByInstitution(
id: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<PatentsByInstitutionResponse>>;
public getPatentsByInstitution(
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 getPatentsByInstitution.',
);
}
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/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<PatentsByInstitutionResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
}
+137 -78
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,12 +9,18 @@
*/
/* 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';
@@ -24,86 +30,139 @@ 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);
}
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
super(basePath, configuration);
/**
* Get a person\&#39;s collaboration network.
* Returns a person\&#39;s collaboration network based on their works and co-authors.
* @endpoint post /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.',
);
}
/**
* Get a person\&#39;s collaboration network.
* Returns a person\&#39;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;
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 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,
},
);
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,578 @@
/**
* 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 { AutocompleteLocationItem } from '../model/autocompleteLocationItem';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { RankingResponse } from '../model/rankingResponse';
// @ts-ignore
import { TopInstitutionItem } from '../model/topInstitutionItem';
// @ts-ignore
import { TrendResponse } from '../model/trendResponse';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
import { BaseService } from '../api.base.service';
@Injectable({
providedIn: 'root',
})
export class UniversityRankingsService extends BaseService {
constructor(
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string | string[],
@Optional() configuration?: Configuration,
) {
super(basePath, configuration);
}
/**
* Returns country and continent options for autocomplete inputs.
* @endpoint get /api/inse-service/university-rankings/autocomplete-locations
* @param query Query text to search for countries/continents
* @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 getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(
query: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<AutocompleteLocationItem>>;
public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(
query: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<AutocompleteLocationItem>>>;
public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(
query: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<AutocompleteLocationItem>>>;
public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(
query: string,
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 getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>query,
'query',
);
let localVarHeaders = this.defaultHeaders;
const localVarHttpHeaderAcceptSelected: string | undefined =
options?.httpHeaderAccept ??
this.configuration.selectHeaderAccept(['application/json']);
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set(
'Accept',
localVarHttpHeaderAcceptSelected,
);
}
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/university-rankings/autocomplete-locations`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<AutocompleteLocationItem>>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns data for the University Ranking Dashboard.
* @endpoint get /api/inse-service/university-rankings
* @param topic Research topic display name or OpenAlex ID (e.g., \&#39;Artificial Intelligence\&#39;)
* @param metric Metric to rank by
* @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 getRankingsApiInseServiceUniversityRankingsGet(
topic: string,
metric?: 'publications' | 'citations',
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<RankingResponse>;
public getRankingsApiInseServiceUniversityRankingsGet(
topic: string,
metric?: 'publications' | 'citations',
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<RankingResponse>>;
public getRankingsApiInseServiceUniversityRankingsGet(
topic: string,
metric?: 'publications' | 'citations',
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<RankingResponse>>;
public getRankingsApiInseServiceUniversityRankingsGet(
topic: string,
metric?: 'publications' | 'citations',
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 getRankingsApiInseServiceUniversityRankingsGet.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>topic,
'topic',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>metric,
'metric',
);
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/university-rankings`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<RankingResponse>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns top institutions filtered by country/region and sorted by topic-level publications count.
* @endpoint get /api/inse-service/university-rankings/top-institutions
* @param topic Research topic
* @param region Region identifier (e.g. EU)
* @param country Country code (e.g. DE)
* @param limit Max suggestions 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 getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(
topic: string,
region?: string,
country?: string,
limit?: number,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<Array<TopInstitutionItem>>;
public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(
topic: string,
region?: string,
country?: string,
limit?: number,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<Array<TopInstitutionItem>>>;
public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(
topic: string,
region?: string,
country?: string,
limit?: number,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<Array<TopInstitutionItem>>>;
public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(
topic: string,
region?: string,
country?: string,
limit?: number,
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 getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>topic,
'topic',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>region,
'region',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>country,
'country',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>limit,
'limit',
);
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/university-rankings/top-institutions`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<Array<TopInstitutionItem>>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
...(withCredentials ? { withCredentials } : {}),
headers: localVarHeaders,
observe: observe,
...(localVarTransferCache !== undefined
? { transferCache: localVarTransferCache }
: {}),
reportProgress: reportProgress,
},
);
}
/**
* Returns timeseries publication data for compared institutions, countries and regions.
* @endpoint get /api/inse-service/university-rankings/trend
* @param topics List of topics to analyze
* @param institutions List of OpenAlex Institution IDs
* @param countries List of country codes
* @param regions List of region identifiers
* @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 getTrendApiInseServiceUniversityRankingsTrendGet(
topics: Array<string>,
institutions?: Array<string>,
countries?: Array<string>,
regions?: Array<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<TrendResponse>;
public getTrendApiInseServiceUniversityRankingsTrendGet(
topics: Array<string>,
institutions?: Array<string>,
countries?: Array<string>,
regions?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<TrendResponse>>;
public getTrendApiInseServiceUniversityRankingsTrendGet(
topics: Array<string>,
institutions?: Array<string>,
countries?: Array<string>,
regions?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<TrendResponse>>;
public getTrendApiInseServiceUniversityRankingsTrendGet(
topics: Array<string>,
institutions?: Array<string>,
countries?: Array<string>,
regions?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
if (topics === null || topics === undefined) {
throw new Error(
'Required parameter topics was null or undefined when calling getTrendApiInseServiceUniversityRankingsTrendGet.',
);
}
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (topics) {
topics.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'topics',
);
});
}
if (institutions) {
institutions.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institutions',
);
});
}
if (countries) {
countries.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'countries',
);
});
}
if (regions) {
regions.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'regions',
);
});
}
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/university-rankings/trend`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<TrendResponse>(
'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
+197 -171
View File
@@ -1,193 +1,219 @@
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 HTTPBearer credential
if (!this.credentials['HTTPBearer']) {
this.credentials['HTTPBearer'] = () => {
return typeof this.accessToken === 'function'
? this.accessToken()
: this.accessToken;
};
}
// init default HTTPBearer credential
if (!this.credentials['HTTPBearer']) {
this.credentials['HTTPBearer'] = () => {
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;
}
/**
* 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;
}
const type = contentTypes.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return contentTypes[0];
}
return type;
}
const type = contentTypes.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return contentTypes[0];
}
return type;
/**
* 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;
}
/**
* 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;
const type = accepts.find((x: string) => this.isJsonMime(x));
if (type === undefined) {
return accepts[0];
}
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));
}
}
+12 -12
View File
@@ -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);
}
}
+6 -8
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,11 +9,9 @@
*/
import { AccessToken } from './accessToken';
export interface AccessResponse {
/**
* The access token issued upon successful authentication.
*/
access_token: AccessToken;
export interface AccessResponse {
/**
* The access token issued upon successful authentication.
*/
access_token: AccessToken;
}
+39 -43
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,46 +10,42 @@
import { TokenType } from './tokenType';
import { UserRole } from './userRole';
export interface AccessToken {
/**
* The unique identifier of the real account associated with this token.
*/
real_account_id: string;
/**
* The timestamp indicating when the token will expire.
*/
expires_at: string;
/**
* The epoch value for the token. Used for versioning of tokens.
*/
epoch?: number;
/**
* The type of the token, which is always ACCESS_TOKEN for this class.
*/
token_type?: TokenType;
/**
* A unique fingerprint of the user, used for additional security checks.
*/
user_fingerprint_hash: string;
/**
* The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation.
*/
effective_account_id: string;
/**
* The specific role this access token grants within its organization.
*/
effective_role?: UserRole;
/**
* The unique identifier of the organization associated with this access token.
*/
effective_organization_id: string;
/**
* The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes.
*/
raw_token: string;
export interface AccessToken {
/**
* The unique identifier of the real account associated with this token.
*/
real_account_id: string;
/**
* The timestamp indicating when the token will expire.
*/
expires_at: string;
/**
* The epoch value for the token. Used for versioning of tokens.
*/
epoch?: number;
/**
* The type of the token, which is always ACCESS_TOKEN for this class.
*/
token_type?: TokenType;
/**
* A unique fingerprint of the user, used for additional security checks.
*/
user_fingerprint_hash: string;
/**
* The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation.
*/
effective_account_id: string;
/**
* The specific role this access token grants within its organization.
*/
effective_role?: UserRole;
/**
* The unique identifier of the organization associated with this access token.
*/
effective_organization_id: string;
/**
* The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes.
*/
raw_token: string;
}
export namespace AccessToken {
}
export namespace AccessToken {}
+6 -8
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,11 +9,9 @@
*/
import { AccountProfile } from './accountProfile';
export interface AccountPage {
items: Array<AccountProfile>;
total: number;
page: number;
page_size: number;
export interface AccountPage {
items: Array<AccountProfile>;
total: number;
page: number;
page_size: number;
}
+14 -18
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,21 +9,17 @@
*/
import { UserRole } from './userRole';
export interface AccountProfile {
id: string;
email: string;
name: string;
role: UserRole;
organization_id: string;
organization_name: string;
deleted: boolean;
activated: boolean;
is_current?: boolean;
is_real_account?: boolean;
is_impersonating?: boolean;
export interface AccountProfile {
id: string;
email: string;
name: string;
role: UserRole;
organization_id: string;
organization_name: string;
deleted: boolean;
activated: boolean;
is_current?: boolean;
is_real_account?: boolean;
is_impersonating?: boolean;
}
export namespace AccountProfile {
}
export namespace AccountProfile {}
@@ -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,9 @@
*/
import { PatentEntry } from './patentEntry';
export interface AllPatentsResponse {
total: number;
page: number;
size: number;
patents: Array<PatentEntry>;
export interface AllPatentsResponse {
total: number;
page: number;
size: number;
patents: Array<PatentEntry>;
}
+19 -21
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -15,27 +15,25 @@ 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,12 +9,10 @@
*/
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,20 +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.
*/
/**
* 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;
}
+5 -7
View File
@@ -1,20 +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.
*/
/**
* 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;
}
+15 -19
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,22 +9,18 @@
*/
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,22 +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.
*/
/**
* 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,18 +1,16 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface 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,13 +9,11 @@
*/
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,26 +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.
*/
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,13 +11,11 @@ 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;
}
+9 -11
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,17 +10,15 @@
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;
}
@@ -0,0 +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.
*/
export interface AutocompleteLocationItem {
id: string;
display_name: string;
code: string;
type: AutocompleteLocationItem.TypeEnum;
}
export namespace AutocompleteLocationItem {
export const TypeEnum = {
Country: 'country',
Continent: 'continent',
} as const;
export type TypeEnum = (typeof TypeEnum)[keyof typeof TypeEnum];
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,12 +10,10 @@
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,19 +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.
*/
/**
* 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,24 +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.
*/
/**
* 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;
}
+8 -10
View File
@@ -1,23 +1,21 @@
/**
* 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;
}
+10 -12
View File
@@ -1,22 +1,20 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface BodyChangePassword {
/**
* Current password
*/
current_password: string;
/**
* New password
*/
new_password: string;
export interface BodyChangePassword {
/**
* Current password
*/
current_password: string;
/**
* New password
*/
new_password: string;
}
+10 -12
View File
@@ -1,22 +1,20 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface BodyGetAccessToken {
/**
* User\'s account ID
*/
real_account_id: string;
/**
* Effective account ID for the access token
*/
effective_account_id: string;
export interface BodyGetAccessToken {
/**
* User\'s account ID
*/
real_account_id: string;
/**
* Effective account ID for the access token
*/
effective_account_id: string;
}
+10 -12
View File
@@ -1,22 +1,20 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface BodyLogin {
/**
* User\'s account ID
*/
account_id: string;
/**
* One-time code sent to user\'s email
*/
email_code: string;
export interface BodyLogin {
/**
* User\'s account ID
*/
account_id: string;
/**
* One-time code sent to user\'s email
*/
email_code: string;
}
+10 -12
View File
@@ -1,22 +1,20 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface BodyRequestOtk {
/**
* User\'s email address
*/
email: string;
/**
* User\'s password
*/
password: string;
export interface BodyRequestOtk {
/**
* User\'s email address
*/
email: string;
/**
* User\'s password
*/
password: string;
}
+30 -32
View File
@@ -1,42 +1,40 @@
/**
* 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;
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;
}
+42 -44
View File
@@ -1,57 +1,55 @@
/**
* 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.
*/
/**
* Clean summary model for a Bund (federal) project, consolidating all fields into semantic English names with proper native types.
*/
export interface BundProjectDetails {
/**
* The ID of the Bund project
*/
id: string;
funding_reference?: string | null;
title?: string | null;
description?: string | null;
joint_project?: string | null;
funding_type?: string | null;
funding_profile?: string | null;
funding_amount?: number | null;
funding_start_date?: string | null;
funding_end_date?: string | null;
duration?: string | null;
performance_plan_code?: string | null;
performance_plan_fullname?: string | null;
executing_agency?: string | null;
funding_recipient?: string | null;
project_agency?: string | null;
project_agency_fullname?: string | null;
department?: string | null;
department_fullname?: string | null;
division?: string | null;
location?: string | null;
municipality?: string | null;
state?: string | null;
country?: string | null;
municipality_code?: string | null;
publication_date?: string | null;
is_new?: boolean | null;
record_date?: string | null;
unix_timestamp?: number | null;
/**
* All persons associated with the Bund project (from nested Arb object)
*/
associated_persons?: Array<string>;
/**
* All institutions associated with the Bund project
*/
institutions?: Array<string>;
export interface BundProjectDetails {
/**
* The ID of the Bund project
*/
id: string;
funding_reference?: string | null;
title?: string | null;
description?: string | null;
joint_project?: string | null;
funding_type?: string | null;
funding_profile?: string | null;
funding_amount?: number | null;
funding_start_date?: string | null;
funding_end_date?: string | null;
duration?: string | null;
performance_plan_code?: string | null;
performance_plan_fullname?: string | null;
executing_agency?: string | null;
funding_recipient?: string | null;
project_agency?: string | null;
project_agency_fullname?: string | null;
department?: string | null;
department_fullname?: string | null;
division?: string | null;
location?: string | null;
municipality?: string | null;
state?: string | null;
country?: string | null;
municipality_code?: string | null;
publication_date?: string | null;
is_new?: boolean | null;
record_date?: string | null;
unix_timestamp?: number | null;
/**
* All persons associated with the Bund project (from nested Arb object)
*/
associated_persons?: Array<string>;
/**
* All institutions associated with the Bund project
*/
institutions?: Array<string>;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { BundProject } from './bundProject';
export interface BundProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The bund projects on this page.
*/
elements?: Array<BundProject>;
export interface BundProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The bund projects on this page.
*/
elements?: Array<BundProject>;
}
+22 -24
View File
@@ -1,34 +1,32 @@
/**
* 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 CareerMetrics {
first_publication_year?: number | null;
last_publication_year?: number | null;
career_age?: number | null;
career_span?: number | null;
career_stage?: string | null;
/**
* Number of distinct years with at least one publication.
*/
active_years?: number;
/**
* Number of publications used for career metrics.
*/
publication_count?: number;
publications_per_active_year?: number | null;
publications_per_career_year?: number | null;
years_since_last_publication?: number | null;
/**
* True if publication years look suspicious.
*/
has_suspicious_publication_years?: boolean;
export interface CareerMetrics {
first_publication_year?: number | null;
last_publication_year?: number | null;
career_age?: number | null;
career_span?: number | null;
career_stage?: string | null;
/**
* Number of distinct years with at least one publication.
*/
active_years?: number;
/**
* Number of publications used for career metrics.
*/
publication_count?: number;
publications_per_active_year?: number | null;
publications_per_career_year?: number | null;
years_since_last_publication?: number | null;
/**
* True if publication years look suspicious.
*/
has_suspicious_publication_years?: boolean;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -13,31 +13,29 @@ 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,22 +1,20 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export 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,18 +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 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];
+14 -16
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,19 +9,17 @@
*/
import { MatchedOfficer } from './matchedOfficer';
export interface CompanyConnection {
company_number?: string | null;
company_name?: string | null;
company_status?: string | null;
register_art?: string | null;
register_nummer?: string | null;
native_company_number?: string | null;
registrar?: string | null;
registered_office?: string | null;
registered_address?: string | null;
retrieved_at?: string | null;
matched_officers?: Array<MatchedOfficer>;
officers?: Array<MatchedOfficer>;
export interface CompanyConnection {
company_number?: string | null;
company_name?: string | null;
company_status?: string | null;
register_art?: string | null;
register_nummer?: string | null;
native_company_number?: string | null;
registrar?: string | null;
registered_office?: string | null;
registered_address?: string | null;
retrieved_at?: string | null;
matched_officers?: Array<MatchedOfficer>;
officers?: Array<MatchedOfficer>;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,17 +9,15 @@
*/
import { CompanyConnection } from './companyConnection';
export interface CompanyConnectionsResponse {
author_id: string;
display_name?: string | null;
is_ude_author: boolean;
institution_scope?: string | null;
matching_institutions?: Array<string>;
matching_method?: string | null;
company_count: number;
has_more_results: boolean;
common_name_warning: boolean;
connections?: Array<CompanyConnection>;
export interface CompanyConnectionsResponse {
author_id: string;
display_name?: string | null;
is_ude_author: boolean;
institution_scope?: string | null;
matching_institutions?: Array<string>;
matching_method?: string | null;
company_count: number;
has_more_results: boolean;
common_name_warning: boolean;
connections?: Array<CompanyConnection>;
}
+27 -29
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,32 +10,30 @@
import { Keywords } from './keywords';
import { Topics } from './topics';
export interface CordisEuProject {
/**
* Unique identifier for the project, typically the CORDIS ID
*/
id: string;
rcn?: string | null;
acronym?: string | null;
title?: string | null;
objective?: string | null;
frameworkProgramme?: string | null;
fundingScheme?: string | null;
legalBasis?: string | null;
masterCall?: string | null;
subCall?: string | null;
topics?: Topics | null;
nature?: string | null;
status?: string | null;
ecMaxContribution?: number | null;
totalCost?: number | null;
startDate?: string | null;
endDate?: string | null;
ecSignatureDate?: string | null;
contentUpdateDate?: string | null;
grantDoi?: string | null;
humanValidated?: boolean | null;
keywords?: Keywords | null;
export interface CordisEuProject {
/**
* Unique identifier for the project, typically the CORDIS ID
*/
id: string;
rcn?: string | null;
acronym?: string | null;
title?: string | null;
objective?: string | null;
frameworkProgramme?: string | null;
fundingScheme?: string | null;
legalBasis?: string | null;
masterCall?: string | null;
subCall?: string | null;
topics?: Topics | null;
nature?: string | null;
status?: string | null;
ecMaxContribution?: number | null;
totalCost?: number | null;
startDate?: string | null;
endDate?: string | null;
ecSignatureDate?: string | null;
contentUpdateDate?: string | null;
grantDoi?: string | null;
humanValidated?: boolean | null;
keywords?: Keywords | null;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { CordisEuProject } from './cordisEuProject';
export interface CordisEuProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The CORDIS EU projects on this page.
*/
elements?: Array<CordisEuProject>;
export interface CordisEuProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The CORDIS EU projects on this page.
*/
elements?: Array<CordisEuProject>;
}
+2 -5
View File
@@ -1,17 +1,14 @@
/**
* 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,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,16 +9,12 @@
*/
import { UserRole } from './userRole';
export interface CreateAccountRequest {
email: string;
name: string;
role?: UserRole;
organization_id: string;
password: string;
openalex_person_id?: string | null;
export interface CreateAccountRequest {
email: string;
name: string;
role?: UserRole;
organization_id: string;
password: string;
openalex_person_id?: string | null;
}
export namespace CreateAccountRequest {
}
export namespace CreateAccountRequest {}
@@ -1,16 +1,14 @@
/**
* 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 CreateOrganizationRequest {
name: string;
other_inst_id?: string | null;
export interface CreateOrganizationRequest {
name: string;
other_inst_id?: string | null;
}
+21 -23
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -16,26 +16,24 @@ 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;
career_metrics?: CareerMetrics | 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;
career_metrics?: CareerMetrics | 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
@@ -11,11 +11,9 @@ import { Meta } from './meta';
import { CustomAuthor } from './customAuthor';
import { GroupByResult } from './groupByResult';
export interface CustomAuthorsListResponse {
meta?: Meta | null;
results?: Array<CustomAuthor> | null;
group_by?: Array<GroupByResult> | null;
placeholder?: CustomAuthor | null;
export interface CustomAuthorsListResponse {
meta?: Meta | null;
results?: Array<CustomAuthor> | null;
group_by?: Array<GroupByResult> | null;
placeholder?: CustomAuthor | null;
}
+5 -7
View File
@@ -1,20 +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.
*/
/**
* [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;
}
+5 -7
View File
@@ -1,20 +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.
*/
/**
* [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;
}
@@ -1,23 +1,21 @@
/**
* 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;
export interface DehydratedInstitution {
id?: string | null;
display_name?: string | null;
ror?: string | null;
country_code?: string | null;
type?: string | null;
lineage?: Array<string> | null;
}
+13 -15
View File
@@ -1,28 +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.
*/
/**
* [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;
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;
}
+26 -28
View File
@@ -1,41 +1,39 @@
/**
* 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.
*/
/**
* Clean summary model for a DFG project, consolidating all person roles and institution references into unified lists.
*/
export interface DfgProjectDetails {
/**
* The ID of the DFG project
*/
id: string;
link?: string | null;
title?: string | null;
description?: string | null;
project_identifier?: string | null;
funding_start_date?: string | null;
funding_end_date?: string | null;
dfg_procedure?: string | null;
subject_area?: string | null;
funding_type?: string | null;
international_reference?: string | null;
website?: string | null;
/**
* All persons associated with the DFG project (any role)
*/
associated_persons?: Array<string>;
/**
* All institutions associated with the DFG project
*/
institutions?: Array<string>;
subproject_of?: string | null;
export interface DfgProjectDetails {
/**
* The ID of the DFG project
*/
id: string;
link?: string | null;
title?: string | null;
description?: string | null;
project_identifier?: string | null;
funding_start_date?: string | null;
funding_end_date?: string | null;
dfg_procedure?: string | null;
subject_area?: string | null;
funding_type?: string | null;
international_reference?: string | null;
website?: string | null;
/**
* All persons associated with the DFG project (any role)
*/
associated_persons?: Array<string>;
/**
* All institutions associated with the DFG project
*/
institutions?: Array<string>;
subproject_of?: string | null;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,23 +9,21 @@
*/
import { DfgProjectSummary } from './dfgProjectSummary';
export interface DfgProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The DFG projects on this page.
*/
elements?: Array<DfgProjectSummary>;
export interface DfgProjectPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The DFG projects on this page.
*/
elements?: Array<DfgProjectSummary>;
}
+15 -17
View File
@@ -1,27 +1,25 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface DfgProjectSummary {
/**
* The unique identifier of the DFG project.
*/
id: string;
link?: string | null;
title?: string | null;
professional_classification?: string | null;
funding_start?: string | null;
funding_end?: string | null;
/**
* The names of the researchers involved in the DFG project.
*/
names?: Array<string>;
export interface DfgProjectSummary {
/**
* The unique identifier of the DFG project.
*/
id: string;
link?: string | null;
title?: string | null;
professional_classification?: string | null;
funding_start?: string | null;
funding_end?: string | null;
/**
* The names of the researchers involved in the DFG project.
*/
names?: Array<string>;
}
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,17 +9,15 @@
*/
import { EuProjectData } from './euProjectData';
/**
* Response model for EU Cordis project endpoints.
*/
export interface EuCordisProjectResponse {
/**
* Indicates if the request was successful
*/
success: boolean;
project_type?: string | null;
eu_project_data?: EuProjectData | null;
error?: string | null;
export interface EuCordisProjectResponse {
/**
* Indicates if the request was successful
*/
success: boolean;
project_type?: string | null;
eu_project_data?: EuProjectData | null;
error?: string | null;
}
@@ -1,27 +1,25 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface EuOrganizationProjectSummary {
/**
* The unique identifier of the organization.
*/
organization_id: string;
/**
* The unique identifier of the project.
*/
project_id: string;
title?: string | null;
start_date?: string | null;
end_date?: string | null;
acronym?: string | null;
ec_contribution?: number | null;
export interface EuOrganizationProjectSummary {
/**
* The unique identifier of the organization.
*/
organization_id: string;
/**
* The unique identifier of the project.
*/
project_id: string;
title?: string | null;
start_date?: string | null;
end_date?: string | null;
acronym?: string | null;
ec_contribution?: number | 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,23 +9,21 @@
*/
import { EuOrganizationProjectSummary } from './euOrganizationProjectSummary';
export interface EuOrganizationProjectSummaryPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The organization project summaries on this page.
*/
elements?: Array<EuOrganizationProjectSummary>;
export interface EuOrganizationProjectSummaryPage {
/**
* The current page number.
*/
page?: number;
/**
* The requested page size.
*/
size?: number;
/**
* The total number of items.
*/
total?: number;
/**
* The organization project summaries on this page.
*/
elements?: Array<EuOrganizationProjectSummary>;
}
+41 -43
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -23,49 +23,47 @@ import { Fp7ReportSummary } from './fp7ReportSummary';
import { HEUReportSummary } from './hEUReportSummary';
import { HEUProjectDetails } from './hEUProjectDetails';
/**
* The project data
*/
export interface EuProjectData {
acronym?: string;
contentUpdateDate?: string;
ecMaxContribution?: number;
ecSignatureDate?: string;
endDate?: string;
frameworkProgramme?: string;
fundingScheme?: string;
grantDoi?: string;
humanValidated?: boolean;
id?: string;
keywords?: string;
legalBasis?: string;
masterCall?: string;
nature?: string;
objective?: string;
rcn?: string;
startDate?: string;
status?: string;
subCall?: string;
title?: string;
topics?: string;
totalCost?: number;
organizations?: Array<HEUOrganization>;
publications?: Array<HEUPublication>;
iprs?: Array<Fp7ProjectIPR>;
report_summaries?: Array<Fp7ReportSummary>;
topicsList?: Array<HEUTopic>;
web_links?: Array<Fp7WebLink>;
eurosciVoc?: Array<HEUEurosciVoc>;
legalBasisList?: Array<HEULegalBasis>;
organizationCount?: number;
publicationCount?: number;
iprCount?: number;
deliverables?: Array<HEUDeliverable>;
reportSummaries?: Array<HEUReportSummary>;
webLinks?: Array<HEUWebLink>;
ercPrincipalInvestigators?: Array<H2020ErcPI>;
deliverableCount?: number;
ercPiCount?: number;
export interface EuProjectData {
acronym?: string;
contentUpdateDate?: string;
ecMaxContribution?: number;
ecSignatureDate?: string;
endDate?: string;
frameworkProgramme?: string;
fundingScheme?: string;
grantDoi?: string;
humanValidated?: boolean;
id?: string;
keywords?: string;
legalBasis?: string;
masterCall?: string;
nature?: string;
objective?: string;
rcn?: string;
startDate?: string;
status?: string;
subCall?: string;
title?: string;
topics?: string;
totalCost?: number;
organizations?: Array<HEUOrganization>;
publications?: Array<HEUPublication>;
iprs?: Array<Fp7ProjectIPR>;
report_summaries?: Array<Fp7ReportSummary>;
topicsList?: Array<HEUTopic>;
web_links?: Array<Fp7WebLink>;
eurosciVoc?: Array<HEUEurosciVoc>;
legalBasisList?: Array<HEULegalBasis>;
organizationCount?: number;
publicationCount?: number;
iprCount?: number;
deliverables?: Array<HEUDeliverable>;
reportSummaries?: Array<HEUReportSummary>;
webLinks?: Array<HEUWebLink>;
ercPrincipalInvestigators?: Array<H2020ErcPI>;
deliverableCount?: number;
ercPiCount?: number;
}
+14 -16
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -9,19 +9,17 @@
*/
import { KeywordEntryWithTopic } from './keywordEntryWithTopic';
export interface ExtractedKeywords {
/**
* The extracted broad keywords from text.
*/
broad_keywords: Array<KeywordEntryWithTopic>;
/**
* The extracted coarse-grained keywords from text.
*/
coarse_grained: Array<KeywordEntryWithTopic>;
/**
* The extracted fine-grained keywords from text.
*/
fine_grained: Array<KeywordEntryWithTopic>;
export interface ExtractedKeywords {
/**
* The extracted broad keywords from text.
*/
broad_keywords: Array<KeywordEntryWithTopic>;
/**
* The extracted coarse-grained keywords from text.
*/
coarse_grained: Array<KeywordEntryWithTopic>;
/**
* The extracted fine-grained keywords from text.
*/
fine_grained: Array<KeywordEntryWithTopic>;
}
@@ -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,19 +9,17 @@
*/
import { KeywordEntry } from './keywordEntry';
export interface ExtractedKeywordsLLM {
/**
* The extracted broad keywords from text.
*/
broad_keywords: Array<KeywordEntry>;
/**
* The extracted coarse-grained keywords from text.
*/
coarse_grained: Array<KeywordEntry>;
/**
* The extracted fine-grained keywords from text.
*/
fine_grained: Array<KeywordEntry>;
export interface ExtractedKeywordsLLM {
/**
* The extracted broad keywords from text.
*/
broad_keywords: Array<KeywordEntry>;
/**
* The extracted coarse-grained keywords from text.
*/
coarse_grained: Array<KeywordEntry>;
/**
* The extracted fine-grained keywords from text.
*/
fine_grained: Array<KeywordEntry>;
}
@@ -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,19 +10,17 @@
import { ExtractedKeywordsLLM } from './extractedKeywordsLLM';
import { ExtractedKeywords } from './extractedKeywords';
export interface ExtractedKeywordsResponse {
results_llm?: ExtractedKeywordsLLM | null;
results?: ExtractedKeywords | null;
/**
* The source of the input text, e.g., \'url\', \'text\', or \'keywords\'.
*/
source: string;
source_url?: string | null;
/**
* The actual content from which keywords were extracted.
*/
source_content: string;
duration?: number | null;
export interface ExtractedKeywordsResponse {
results_llm?: ExtractedKeywordsLLM | null;
results?: ExtractedKeywords | null;
/**
* The source of the input text, e.g., \'url\', \'text\', or \'keywords\'.
*/
source: string;
source_url?: string | null;
/**
* The actual content from which keywords were extracted.
*/
source_content: string;
duration?: number | null;
}
+18 -20
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,23 +10,21 @@
import { InstitutionInformation } from './institutionInformation';
import { WorkTopicInformation } from './workTopicInformation';
export interface FilterInformation {
/**
* The minimum publication year of the works in the collaboration network.
*/
min_possible_year: number;
/**
* The maximum publication year of the works in the collaboration network.
*/
max_possible_year: number;
/**
* The list of institutions associated with the works in the collaboration network.
*/
institutions: Array<InstitutionInformation>;
/**
* The list of topics associated with the works in the collaboration network.
*/
topics: Array<WorkTopicInformation>;
export interface FilterInformation {
/**
* The minimum publication year of the works in the collaboration network.
*/
min_possible_year: number;
/**
* The maximum publication year of the works in the collaboration network.
*/
max_possible_year: number;
/**
* The list of institutions associated with the works in the collaboration network.
*/
institutions: Array<InstitutionInformation>;
/**
* The list of topics associated with the works in the collaboration network.
*/
topics: Array<WorkTopicInformation>;
}
+8 -10
View File
@@ -1,7 +1,7 @@
/**
* Innovation Search Engine API
*
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -10,13 +10,11 @@
import { WorksFilterProperties } from './worksFilterProperties';
import { AuthorsFilterProperties } from './authorsFilterProperties';
export interface FilterProperties {
/**
* The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used.
*/
filter_by?: string;
works_filter_properties: WorksFilterProperties | null;
authors_filter_properties: AuthorsFilterProperties | null;
export interface FilterProperties {
/**
* The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used.
*/
filter_by?: string;
works_filter_properties: WorksFilterProperties | null;
authors_filter_properties: AuthorsFilterProperties | null;
}

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