From bc4193316f0ca15ef1a186375ac723c77a501010 Mon Sep 17 00:00:00 2001 From: arzani Date: Thu, 17 Sep 2026 19:34:30 +0200 Subject: [PATCH 1/7] founder potential/mutlipliers backend added --- service/scripts/multipliers/README.md | 2 +- service/scripts/multipliers/build.py | 35 +- service/scripts/multipliers/networks.py | 43 +- .../scripts/profiling/multipliers/README.md | 12 +- .../scripts/profiling/multipliers/build.py | 31 +- .../multipliers/multiplier_networks.html | 441 ++ .../scripts/profiling/multipliers/networks.py | 105 +- .../multipliers/tests/test_networks.py | 140 + .../main/inse/integrations/elasticsearch.py | 2 + service/src/main/inse/main.py | 2 + .../src/main/inse/middleware/etag_cache.py | 85 +- service/src/main/inse/model.py | 3 + .../src/main/inse/multiplicators/__init__.py | 0 .../data/founder_model_info.json | 97 + service/src/main/inse/multiplicators/model.py | 569 +++ .../src/main/inse/multiplicators/router.py | 296 ++ .../src/main/inse/multiplicators/service.py | 1119 +++++ .../main/inse/multiplicators/test_service.py | 810 ++++ service/src/main/inse/persons/service.py | 12 +- service/src/main/inse/router_prefixes.py | 1 + service/src/main/inse/tags.py | 2 + webapp/src/app/api/.openapi-generator/FILES | 38 + webapp/src/app/api/api/api.ts | 29 +- webapp/src/app/api/api/auth.service.ts | 2970 +++++------- webapp/src/app/api/api/authorsV2.service.ts | 882 ++-- .../app/api/api/bUNDInstitutions.service.ts | 344 +- .../src/app/api/api/backgroundJobs.service.ts | 1889 +++----- webapp/src/app/api/api/bookmarks.service.ts | 557 +-- .../app/api/api/companyConnections.service.ts | 366 +- .../app/api/api/dFGInstitutions.service.ts | 344 +- webapp/src/app/api/api/dFGPersons.service.ts | 344 +- webapp/src/app/api/api/dashboard.service.ts | 3984 ++++++----------- .../src/app/api/api/institutionsV2.service.ts | 485 +- .../src/app/api/api/multiplicators.service.ts | 579 +++ webapp/src/app/api/api/news.service.ts | 2256 +++------- .../src/app/api/api/organization.service.ts | 969 ++-- webapp/src/app/api/api/patents.service.ts | 1117 ++--- webapp/src/app/api/api/persons.service.ts | 2126 +++------ webapp/src/app/api/api/projects.service.ts | 3431 +++++--------- webapp/src/app/api/api/ranking.service.ts | 1134 ++--- webapp/src/app/api/api/topics.service.ts | 881 ++-- webapp/src/app/api/api/topicsV2.service.ts | 1289 ++---- .../app/api/api/universityRankings.service.ts | 1097 ++--- webapp/src/app/api/api/works.service.ts | 993 ++-- webapp/src/app/api/api/worksV2.service.ts | 2710 ++++------- webapp/src/app/api/model/accessToken.ts | 92 +- webapp/src/app/api/model/accountProfile.ts | 28 +- webapp/src/app/api/model/archetypeOverlap.ts | 42 + .../src/app/api/model/authorMetricsRequest.ts | 26 +- webapp/src/app/api/model/authorNode.ts | 30 +- .../app/api/model/authorOrientationProfile.ts | 28 +- .../model/authorOrientationProfileStatus.ts | 17 +- .../model/authorOrientationProfilesRequest.ts | 24 +- webapp/src/app/api/model/authorPage.ts | 38 +- webapp/src/app/api/model/authorStaticStats.ts | 46 +- .../src/app/api/model/authorTopicProfile.ts | 86 +- webapp/src/app/api/model/authorTopicStats.ts | 146 +- webapp/src/app/api/model/availableImages.ts | 10 +- webapp/src/app/api/model/backgroundJobTask.ts | 30 +- .../api/model/bmbfProjectStatusStatistics.ts | 16 +- .../model/bodyValidatePasswordResetToken.ts | 14 +- .../app/api/model/bundInstitutionSummary.ts | 22 +- .../api/model/bundInstitutionSummaryPage.ts | 38 +- .../src/app/api/model/bundProjectDetails.ts | 88 +- .../src/app/api/model/bundProjectHighlight.ts | 38 +- webapp/src/app/api/model/bundProjectPage.ts | 38 +- .../src/app/api/model/bundProjectSummary.ts | 68 +- webapp/src/app/api/model/careerBucket.ts | 19 + .../app/api/model/careerStageStatistics.ts | 46 + .../src/app/api/model/collaborationGraph.ts | 46 +- .../app/api/model/collaborationGraphStatus.ts | 13 +- .../model/collaborationGraphStatusResponse.ts | 22 +- .../model/companyConnectionsAvailability.ts | 8 +- .../api/model/companyConnectionsResponse.ts | 20 +- .../src/app/api/model/createAccountRequest.ts | 18 +- .../api/model/createOrganizationRequest.ts | 12 +- .../src/app/api/model/createPersonBookmark.ts | 8 +- .../api/model/dFGProjectFachgebieteInner.ts | 22 +- .../src/app/api/model/dashboardInstitution.ts | 16 + .../app/api/model/dashboardStatisticValue.ts | 12 +- .../src/app/api/model/dashboardStatistics.ts | 22 +- .../app/api/model/dfgInstitutionSummary.ts | 22 +- .../api/model/dfgInstitutionSummaryPage.ts | 38 +- webapp/src/app/api/model/dfgPersonSummary.ts | 20 +- .../src/app/api/model/dfgPersonSummaryPage.ts | 38 +- webapp/src/app/api/model/dfgProjectDetails.ts | 128 +- .../api/model/dfgProjectInstitutionRole.ts | 22 +- webapp/src/app/api/model/dfgProjectKeyword.ts | 10 +- .../src/app/api/model/dfgProjectPersonRole.ts | 26 +- .../api/model/dfgProjectPublicationSummary.ts | 16 +- .../api/model/dfgProjectStatusStatistics.ts | 16 +- .../api/model/dfgProjectSubprojectSummary.ts | 24 +- webapp/src/app/api/model/dfgProjectTopic.ts | 24 +- webapp/src/app/api/model/dfgProjectTopics.ts | 16 +- webapp/src/app/api/model/dockerHealth.ts | 10 +- webapp/src/app/api/model/domain.ts | 30 +- webapp/src/app/api/model/domainFieldsInner.ts | 10 +- webapp/src/app/api/model/domainIds.ts | 12 +- webapp/src/app/api/model/edge.ts | 30 +- webapp/src/app/api/model/egoNetwork.ts | 55 + webapp/src/app/api/model/egoNetworkEdge.ts | 39 + webapp/src/app/api/model/egoNetworkNode.ts | 30 + webapp/src/app/api/model/euProjectData.ts | 88 +- .../api/model/euProjectStatusStatistics.ts | 16 +- webapp/src/app/api/model/fieldNode.ts | 38 +- webapp/src/app/api/model/fileUpload.ts | 30 +- webapp/src/app/api/model/founderCandidate.ts | 53 + .../src/app/api/model/founderCandidatePage.ts | 34 + .../app/api/model/founderFeatureImportance.ts | 17 + webapp/src/app/api/model/founderFeatures.ts | 45 + .../src/app/api/model/founderHorizonModel.ts | 18 + webapp/src/app/api/model/founderModelInfo.ts | 36 + webapp/src/app/api/model/founderPotential.ts | 35 + webapp/src/app/api/model/founderScreen.ts | 26 + .../src/app/api/model/founderScreenReason.ts | 23 + webapp/src/app/api/model/founderSortBy.ts | 22 + webapp/src/app/api/model/founderStatistics.ts | 35 + .../api/model/founderStatisticsParameters.ts | 22 + .../api/model/founderStatisticsProvenance.ts | 26 + webapp/src/app/api/model/founderTiming.ts | 20 + webapp/src/app/api/model/fp7ProjectDetails.ts | 76 +- webapp/src/app/api/model/fp7Publication.ts | 44 +- webapp/src/app/api/model/funnelStage.ts | 38 + webapp/src/app/api/model/funnelStageKey.ts | 20 + .../src/app/api/model/h2020ProjectDetails.ts | 80 +- webapp/src/app/api/model/h2020Publication.ts | 44 +- webapp/src/app/api/model/hEUProjectDetails.ts | 76 +- webapp/src/app/api/model/hEUPublication.ts | 44 +- ...ationManagementModelOrganizationProfile.ts | 18 +- webapp/src/app/api/model/institution.ts | 50 +- .../app/api/model/institutionAssociation.ts | 24 +- .../model/institutionAssociationsResponse.ts | 12 +- webapp/src/app/api/model/institutionNode.ts | 22 +- webapp/src/app/api/model/institutionPageV2.ts | 38 +- .../api/model/jobDefinitionCreateRequest.ts | 22 +- .../api/model/jobDefinitionUpdateRequest.ts | 22 +- webapp/src/app/api/model/jobRun.ts | 34 +- webapp/src/app/api/model/jobRunLogs.ts | 16 +- webapp/src/app/api/model/jobRunStatus.ts | 14 +- webapp/src/app/api/model/jobTriggeredBy.ts | 11 +- webapp/src/app/api/model/keywordEvidence.ts | 28 +- .../app/api/model/keywordPatentHighlight.ts | 12 +- .../src/app/api/model/keywordPatentLevel.ts | 15 +- .../api/model/keywordPatentMappingStatus.ts | 17 +- .../src/app/api/model/keywordPatentMatch.ts | 60 +- .../model/keywordPatentSearchDiagnostics.ts | 36 +- .../app/api/model/keywordPatentSearchItem.ts | 36 +- .../app/api/model/keywordToAuthorRequest.ts | 68 +- webapp/src/app/api/model/keywordsRequest.ts | 32 +- webapp/src/app/api/model/metricValue.ts | 19 + webapp/src/app/api/model/models.ts | 37 + .../src/app/api/model/multiplierPeerRanks.ts | 29 + webapp/src/app/api/model/multiplierTag.ts | 18 + webapp/src/app/api/model/newsArticle.ts | 24 +- webapp/src/app/api/model/newsArticleDetail.ts | 30 +- webapp/src/app/api/model/orgPatentEntry.ts | 3 + .../app/api/model/patentsByKeywordsRequest.ts | 8 +- .../api/model/patentsByKeywordsResponse.ts | 48 +- webapp/src/app/api/model/peerRankField.ts | 19 + .../app/api/model/personBookmarkResponse.ts | 12 +- .../model/primaryCategoryYearAggregation.ts | 22 +- .../primaryCategoryYearAggregationPage.ts | 38 +- .../src/app/api/model/publicationTypeCount.ts | 26 +- .../api/model/publicationTypeCountsRequest.ts | 44 +- webapp/src/app/api/model/rankedAuthor.ts | 82 +- webapp/src/app/api/model/rankingWeights.ts | 46 +- webapp/src/app/api/model/registryHealth.ts | 12 +- .../app/api/model/researchAreaStatistics.ts | 32 + webapp/src/app/api/model/researcherDetail.ts | 59 + webapp/src/app/api/model/researcherMetrics.ts | 34 + webapp/src/app/api/model/researcherSortBy.ts | 19 + webapp/src/app/api/model/researcherSummary.ts | 47 + .../app/api/model/researcherSummaryPage.ts | 34 + .../app/api/model/selectedAuthorsRequest.ts | 52 +- webapp/src/app/api/model/showcase.ts | 20 + webapp/src/app/api/model/showcaseEntry.ts | 24 + webapp/src/app/api/model/showcaseKind.ts | 19 + .../model/startCollaborationGraphResponse.ts | 14 +- webapp/src/app/api/model/subfieldDomain.ts | 10 +- webapp/src/app/api/model/subfieldField.ts | 10 +- webapp/src/app/api/model/subfieldNode.ts | 38 +- webapp/src/app/api/model/topAuthor.ts | 12 +- .../src/app/api/model/topAuthorStatistics.ts | 18 +- webapp/src/app/api/model/topTopicItem.ts | 10 +- webapp/src/app/api/model/topTopicsResponse.ts | 8 +- webapp/src/app/api/model/topicHeatmap.ts | 14 +- webapp/src/app/api/model/topicHeatmapField.ts | 16 +- .../src/app/api/model/topicHeatmapSubfield.ts | 16 +- webapp/src/app/api/model/topicHeatmapTopic.ts | 14 +- webapp/src/app/api/model/topicHeatmapValue.ts | 12 +- .../src/app/api/model/topicHierarchyDomain.ts | 12 +- .../src/app/api/model/topicHierarchyField.ts | 12 +- .../app/api/model/topicHierarchyResponse.ts | 8 +- .../app/api/model/topicHierarchySubfield.ts | 12 +- webapp/src/app/api/model/topicNode.ts | 30 +- webapp/src/app/api/model/topicPageV2.ts | 38 +- webapp/src/app/api/model/topicSortBy.ts | 12 +- webapp/src/app/api/model/topicWordCloud.ts | 10 +- .../src/app/api/model/topicWordCloudWord.ts | 12 +- webapp/src/app/api/model/trendSearchType.ts | 19 +- webapp/src/app/api/model/trendSeries.ts | 32 +- .../src/app/api/model/updateAccountRequest.ts | 22 +- .../api/model/updateOrganizationRequest.ts | 14 +- webapp/src/app/api/model/work.ts | 88 +- .../src/app/api/model/workClassification.ts | 52 +- .../app/api/model/workClassificationAuthor.ts | 12 +- .../api/model/workClassificationDetails.ts | 24 +- .../model/workClassificationInstitution.ts | 12 +- .../app/api/model/workClassificationMeta.ts | 12 +- .../app/api/model/workClassificationPage.ts | 38 +- .../app/api/model/workClassificationTopic.ts | 18 +- .../api/model/workClassificationTopicGroup.ts | 10 +- .../api/model/workClassificationValidation.ts | 12 +- webapp/src/app/api/model/workNode.ts | 38 +- webapp/src/app/api/model/workPage.ts | 46 +- webapp/src/app/api/model/workPageV2.ts | 38 +- .../src/app/api/model/workPrimaryCategory.ts | 17 +- webapp/src/app/api/model/workSortBy.ts | 16 +- 218 files changed, 17758 insertions(+), 22036 deletions(-) create mode 100644 service/scripts/profiling/multipliers/multiplier_networks.html create mode 100644 service/scripts/profiling/multipliers/tests/test_networks.py create mode 100644 service/src/main/inse/multiplicators/__init__.py create mode 100644 service/src/main/inse/multiplicators/data/founder_model_info.json create mode 100644 service/src/main/inse/multiplicators/model.py create mode 100644 service/src/main/inse/multiplicators/router.py create mode 100644 service/src/main/inse/multiplicators/service.py create mode 100644 service/src/main/inse/multiplicators/test_service.py create mode 100644 webapp/src/app/api/api/multiplicators.service.ts create mode 100644 webapp/src/app/api/model/archetypeOverlap.ts create mode 100644 webapp/src/app/api/model/careerBucket.ts create mode 100644 webapp/src/app/api/model/careerStageStatistics.ts create mode 100644 webapp/src/app/api/model/dashboardInstitution.ts create mode 100644 webapp/src/app/api/model/egoNetwork.ts create mode 100644 webapp/src/app/api/model/egoNetworkEdge.ts create mode 100644 webapp/src/app/api/model/egoNetworkNode.ts create mode 100644 webapp/src/app/api/model/founderCandidate.ts create mode 100644 webapp/src/app/api/model/founderCandidatePage.ts create mode 100644 webapp/src/app/api/model/founderFeatureImportance.ts create mode 100644 webapp/src/app/api/model/founderFeatures.ts create mode 100644 webapp/src/app/api/model/founderHorizonModel.ts create mode 100644 webapp/src/app/api/model/founderModelInfo.ts create mode 100644 webapp/src/app/api/model/founderPotential.ts create mode 100644 webapp/src/app/api/model/founderScreen.ts create mode 100644 webapp/src/app/api/model/founderScreenReason.ts create mode 100644 webapp/src/app/api/model/founderSortBy.ts create mode 100644 webapp/src/app/api/model/founderStatistics.ts create mode 100644 webapp/src/app/api/model/founderStatisticsParameters.ts create mode 100644 webapp/src/app/api/model/founderStatisticsProvenance.ts create mode 100644 webapp/src/app/api/model/founderTiming.ts create mode 100644 webapp/src/app/api/model/funnelStage.ts create mode 100644 webapp/src/app/api/model/funnelStageKey.ts create mode 100644 webapp/src/app/api/model/metricValue.ts create mode 100644 webapp/src/app/api/model/multiplierPeerRanks.ts create mode 100644 webapp/src/app/api/model/multiplierTag.ts create mode 100644 webapp/src/app/api/model/peerRankField.ts create mode 100644 webapp/src/app/api/model/researchAreaStatistics.ts create mode 100644 webapp/src/app/api/model/researcherDetail.ts create mode 100644 webapp/src/app/api/model/researcherMetrics.ts create mode 100644 webapp/src/app/api/model/researcherSortBy.ts create mode 100644 webapp/src/app/api/model/researcherSummary.ts create mode 100644 webapp/src/app/api/model/researcherSummaryPage.ts create mode 100644 webapp/src/app/api/model/showcase.ts create mode 100644 webapp/src/app/api/model/showcaseEntry.ts create mode 100644 webapp/src/app/api/model/showcaseKind.ts diff --git a/service/scripts/multipliers/README.md b/service/scripts/multipliers/README.md index d18829d1..1752f6e9 100644 --- a/service/scripts/multipliers/README.md +++ b/service/scripts/multipliers/README.md @@ -472,7 +472,7 @@ One doc per focal author, `_id = _` (same scheme as scores) | field | content | |---|---| -| `nodes[]` | `{id, name, role, inst, active_years, suspicious}`; role ∈ ego / mentee / cohort / industry / external | +| `nodes[]` | `{id, name, role, inst, active_years, suspicious, company_insts?}`; role ∈ ego / mentee / cohort / industry / external. **`industry` is tie-level**: assigned only when a company affiliation of the neighbour appears on a work *shared with the ego* (matching what `industry_coauthor_share` counts), and `company_insts` names the triggering companies — a lifetime-flag version painted predominantly-academic people orange over a single old dual affiliation. `inst` is the author's most frequent institution. | | `edges[]` | `{a, b, w, n_works, cross, first_year, last_year}` — `w` = decayed tie strength, `cross` = mostly cross-institution | | `ego{}` | header duplicate (bucket, tags, sub_scores, max_sub_score) so a network endpoint renders standalone | | totals | `total_coauthors`, `cohort_coauthors`, `mentee_count`, `shown`, `shown_mentees` | diff --git a/service/scripts/multipliers/build.py b/service/scripts/multipliers/build.py index ae7a971f..d05b9615 100644 --- a/service/scripts/multipliers/build.py +++ b/service/scripts/multipliers/build.py @@ -82,24 +82,42 @@ def main() -> None: f"({timings['load_cache_s']}s)") # ---- single pass over works before they are freed: DOIs per focal author - # (CORDIS join) + per-author institution label and company flag (network docs) + # (CORDIS join), per-author institution counts (modal label), and per-WORK + # company affiliations (tie-level industry roles in the network docs) focal_short_ids = {short_id(a) for a in focal_ids} + max_authors = int(config["extraction"]["max_authors_per_work"]) dois_by_author: dict[str, set[str]] = {} - inst_by_author: dict[str, str] = {} - company_authors: set[str] = set() + inst_counts: dict[str, dict[str, int]] = {} + company_by_author_work: dict[str, dict[str, list[str]]] = {} + company_work_authors: dict[str, set[str]] = {} for w in works: doi = normalize_doi(w.get("doi")) + wid = short_id(w.get("id")) + work_authors: set[str] = set() + work_companies: dict[str, list[str]] = {} for a in w.get("authorships") or []: aid = short_id((a.get("author") or {}).get("id")) if not aid: continue + work_authors.add(aid) if doi and aid in focal_short_ids: dois_by_author.setdefault(aid, set()).add(doi) for inst in a.get("institutions") or []: - if aid not in inst_by_author and inst.get("display_name"): - inst_by_author[aid] = inst["display_name"] - if inst.get("type") == "company": - company_authors.add(aid) + name = inst.get("display_name") + if name: + counts = inst_counts.setdefault(aid, {}) + counts[name] = counts.get(name, 0) + 1 + if inst.get("type") == "company": + work_companies.setdefault(aid, []).append(name) + # company evidence only for works that also enter the graph (same cap) + if wid and work_companies and 2 <= len(work_authors) <= max_authors: + company_work_authors[wid] = work_authors + for aid, names in work_companies.items(): + company_by_author_work.setdefault(aid, {})[wid] = names + inst_by_author = { + aid: max(counts, key=counts.get) for aid, counts in inst_counts.items() + } + del inst_counts # ---- graph ---- t0 = time.time() @@ -196,7 +214,8 @@ def main() -> None: scored, incident_edges(graph), inst_by_author, - company_authors, + company_by_author_work, + company_work_authors, max_nodes=int(network_cfg.get("max_nodes", 42)), max_forced_mentees=int(network_cfg.get("max_forced_mentees", 14)), ) diff --git a/service/scripts/multipliers/networks.py b/service/scripts/multipliers/networks.py index 582f1f09..dc9d1429 100644 --- a/service/scripts/multipliers/networks.py +++ b/service/scripts/multipliers/networks.py @@ -41,7 +41,8 @@ def build_network_docs( scored_rows: list[dict[str, Any]], incident: dict[str, list], inst_by_author: dict[str, str], - company_authors: set[str], + company_by_author_work: dict[str, dict[str, list[str]]], + company_work_authors: dict[str, set[str]], max_nodes: int = 42, max_forced_mentees: int = 14, ) -> list[dict[str, Any]]: @@ -49,6 +50,16 @@ def build_network_docs( metric_rows must still carry the FULL `junior_ids` (pre-scoring; the scored rows' evidence list is capped). scored_rows supply the ego header fields. + + Industry roles are TIE-LEVEL, not lifetime: a neighbour is marked `industry` + only if a company affiliation of theirs appears on a work SHARED with the ego + — matching what `industry_coauthor_share` counts. (The first version flagged + anyone who ever had a company affiliation anywhere in the corpus, which + painted predominantly-academic people orange over one dual affiliation from + years ago, with a university name in the tooltip contradicting the colour.) + The triggering company names ship on the node as `company_insts`, and + `inst_by_author` should be the author's MOST FREQUENT institution so the + default label matches reality. """ scored_by_id = {r["author_id"]: r for r in scored_rows} docs: list[dict[str, Any]] = [] @@ -71,26 +82,34 @@ def build_network_docs( nodes = [] for nid in selected: node = graph.nodes[nid] + # company evidence ON WORKS SHARED WITH THE EGO only + shared_companies: set[str] = set() + for wid, names in (company_by_author_work.get(nid) or {}).items(): + if ego_id in company_work_authors.get(wid, ()): + shared_companies.update(names) if nid == ego_id: role = "ego" elif nid in mentees: role = "mentee" - elif nid in company_authors and not node.is_focal: + elif shared_companies and not node.is_focal: role = "industry" elif node.is_focal: role = "cohort" else: role = "external" - nodes.append( - { - "id": nid, - "name": node.display_name, - "role": role, - "inst": inst_by_author.get(nid, ""), - "active_years": len(node.publication_years), - "suspicious": is_suspicious_profile(node.publication_years), - } - ) + entry = { + "id": nid, + "name": node.display_name, + "role": role, + "inst": inst_by_author.get(nid, ""), + "active_years": len(node.publication_years), + "suspicious": is_suspicious_profile(node.publication_years), + } + if shared_companies: + # the receipts for the industry colour (also kept on cohort/ + # mentee nodes so tooltips can show the industry link) + entry["company_insts"] = sorted(shared_companies) + nodes.append(entry) # all corpus edges among the selected nodes — pair lookups against the # edge dict (~900 per ego), NOT a scan of the 5.8M-edge dict per ego diff --git a/service/scripts/profiling/multipliers/README.md b/service/scripts/profiling/multipliers/README.md index 98f67d0d..9d814245 100644 --- a/service/scripts/profiling/multipliers/README.md +++ b/service/scripts/profiling/multipliers/README.md @@ -752,7 +752,7 @@ One doc per focal author, `_id = _` (same scheme as scores) | field | content | |---|---| -| `nodes[]` | `{id, name, role, inst, active_years, suspicious}`; role ∈ ego / mentee / cohort / industry / external | +| `nodes[]` | `{id, name, role, inst, active_years, suspicious, company_insts?}`; role ∈ ego / mentee / cohort / industry / external | | `edges[]` | `{a, b, w, n_works, cross, first_year, last_year}` — `w` = decayed tie strength, `cross` = mostly cross-institution | | `ego{}` | header duplicate (bucket, tags, sub_scores, max_sub_score) so a network endpoint renders standalone | | totals | `total_coauthors`, `cohort_coauthors`, `mentee_count`, `shown`, `shown_mentees` | @@ -765,6 +765,16 @@ the mentor score is about. Positions are NOT stored: the webapp's echarts `graph series (force layout) lays out at render time; map role → color, active_years → symbol size, `cross` → dashed line. +Role semantics (fixed 2026-08-29): `industry` is **ego-relative** — the node holds a +company-typed affiliation on a work **shared with this ego**, and those company +names are on the node as `company_insts` (present on any role: a mentee or cohort +member with a company link keeps their role but still carries the names, and the +ego's own company affiliations appear on the ego node). The previous global +"has a company affiliation anywhere in the corpus" flag mislabeled people whose +industry ties had nothing to do with the ego (audited: 2 of 6 industry nodes in +I62318514_A5113304257). `inst` is the person's **most frequent** affiliation across +their works, not first-seen. Focal cohort members are never `industry`. + `nodes`/`edges` are mapped `"enabled": false` (stored, never indexed) — the index stays small and fast for the queryable header fields (`institution_id`, `author_id`, `ego.tags`, `computed_at`, …). Skip building with `--no-network`. diff --git a/service/scripts/profiling/multipliers/build.py b/service/scripts/profiling/multipliers/build.py index 95901b93..62fb7b00 100644 --- a/service/scripts/profiling/multipliers/build.py +++ b/service/scripts/profiling/multipliers/build.py @@ -32,7 +32,10 @@ from service.scripts.profiling.multipliers.founding import ( from service.scripts.profiling.multipliers.graph import build_graph, short_id from service.scripts.profiling.multipliers.index import NETWORK_MAPPING, NETWORKS_INDEX, MultiplicatorsIndexClient from service.scripts.profiling.multipliers.metrics import compute_all_metrics, incident_edges -from service.scripts.profiling.multipliers.networks import build_network_docs +from service.scripts.profiling.multipliers.networks import ( + build_network_docs, + collect_author_context, +) from service.scripts.profiling.multipliers.scoring import load_config, score_rows from service.scripts.profiling.multipliers.signals import ( cached_author_patent_profiles, @@ -100,24 +103,14 @@ def main() -> None: f"({timings['load_cache_s']}s)") # ---- single pass over works before they are freed: DOIs (CORDIS join) + - # per-author institution label and company flag (network docs) ---- + # per-author institution label and ego-relative company links (network docs) focal_short_ids = {short_id(a) for a in focal_ids} - dois_by_author: dict[str, set[str]] = {} - inst_by_author: dict[str, str] = {} - company_authors: set[str] = set() - for w in works: - doi = normalize_doi(w.get("doi")) - for a in w.get("authorships") or []: - aid = short_id((a.get("author") or {}).get("id")) - if not aid: - continue - if doi and aid in focal_short_ids: - dois_by_author.setdefault(aid, set()).add(doi) - for inst in a.get("institutions") or []: - if aid not in inst_by_author and inst.get("display_name"): - inst_by_author[aid] = inst["display_name"] - if inst.get("type") == "company": - company_authors.add(aid) + dois_by_author, inst_by_author, company_links = collect_author_context( + works, + focal_short_ids, + max_authors_per_work=config["extraction"]["max_authors_per_work"], + doi_normalizer=normalize_doi, + ) # ---- founder-model publication/grant features (works still in memory) ---- pub_features: dict = {} @@ -286,7 +279,7 @@ def main() -> None: scored, incident_edges(graph), inst_by_author, - company_authors, + company_links, max_nodes=int(network_cfg.get("max_nodes", 42)), max_forced_mentees=int(network_cfg.get("max_forced_mentees", 14)), ) diff --git a/service/scripts/profiling/multipliers/multiplier_networks.html b/service/scripts/profiling/multipliers/multiplier_networks.html new file mode 100644 index 00000000..c4f9096d --- /dev/null +++ b/service/scripts/profiling/multipliers/multiplier_networks.html @@ -0,0 +1,441 @@ + + + + + +Multiplicators, drawn as networks + + + + +
+
+

Smart-Guide · Multiplicator detection · I62318514 University of Duisburg-Essen

+

Four researchers, drawn as the networks that scored them

+

+ Each figure shows one person (ringed) and their strongest co-authors, with every + collaboration the corpus records among those co-authors. The shape is the + metric: spokes that don't touch are brokered structural holes; a dense mesh is a + tight community; green marks the juniors a mentor brought up; orange marks + company-affiliated collaborators. Hover any node for its details. +

+
+ +
+ the person (ego) + UDE-cohort co-author + their mentee (junior at first joint paper) + company link on works shared with the ego + external academic + collaboration (width = decayed strength) + mostly cross-institution + node size = active years +
+ +
+ +
+ Data: OpenAlex works of the 9-institution UDE cohort (works ≤ 50 authors enter the + graph; edge strength decays 0.8/year). Networks show each ego's 42 strongest + co-authors — totals are given per figure. Scores are percentile-normalized within + career buckets; tag threshold 0.85. Config , computed + . Mentee marking uses the seniority-gap rule and is restricted + to cohort members; external co-authors' histories are truncated to shared works, so + their node size is a lower bound. +
+
+ +
+ + + + + + + + \ No newline at end of file diff --git a/service/scripts/profiling/multipliers/networks.py b/service/scripts/profiling/multipliers/networks.py index 7d2ba906..ff473617 100644 --- a/service/scripts/profiling/multipliers/networks.py +++ b/service/scripts/profiling/multipliers/networks.py @@ -11,22 +11,93 @@ visualization index". Node selection forces up to `max_forced_mentees` mentees in before the top-by-weight cut: mentee ties are decayed and team-size-divided, so a pure top-N hides exactly the people the mentor score is about. + +The `industry` role is EGO-RELATIVE: a node is industry in this ego's network +only if it has a company-typed affiliation on a work SHARED with the ego, and +those company names are stored on the node as `company_insts`. A global +"has a company affiliation anywhere in the corpus" flag mislabels people whose +industry ties have nothing to do with this ego (measured: 2 of 6 industry +nodes in the first audited network). """ from __future__ import annotations -from typing import Any +from typing import Any, Callable -from service.scripts.profiling.multipliers.graph import Graph +from service.scripts.profiling.multipliers.graph import Graph, short_id from service.scripts.profiling.multipliers.metrics import is_suspicious_profile +def collect_author_context( + works: list[dict[str, Any]], + focal_short_ids: set[str], + max_authors_per_work: int = 50, + doi_normalizer: Callable[[str | None], str | None] | None = None, +) -> tuple[dict[str, set[str]], dict[str, str], dict[str, dict[str, set[str]]]]: + """One pass over the work extract -> (dois_by_author, inst_by_author, company_links). + + dois_by_author focal author -> their work DOIs (CORDIS join); only + collected when `doi_normalizer` is given. + inst_by_author author -> their MOST FREQUENT institution display name + across all their works (ties break lexicographically). + First-seen selection showed minority affiliations. + company_links focal ego -> {co-author -> company display names}, from + company-typed affiliations the co-author holds ON WORKS + SHARED with that ego. An ego's own company affiliations + land under their own id. Works above + `max_authors_per_work` are excluded, mirroring the graph's + hyperauthorship cap — consortium papers are not + collaboration evidence. + """ + dois_by_author: dict[str, set[str]] = {} + inst_counts: dict[str, dict[str, int]] = {} + company_links: dict[str, dict[str, set[str]]] = {} + + for w in works: + doi = doi_normalizer(w.get("doi")) if doi_normalizer else None + seen: set[str] = set() + focal_on_work: list[str] = [] + company_on_work: list[tuple[str, set[str]]] = [] + for a in w.get("authorships") or []: + aid = short_id((a.get("author") or {}).get("id")) + if not aid or aid in seen: + continue + seen.add(aid) + if aid in focal_short_ids: + focal_on_work.append(aid) + if doi: + dois_by_author.setdefault(aid, set()).add(doi) + companies: set[str] = set() + for inst in a.get("institutions") or []: + name = inst.get("display_name") + if not name: + continue + counts = inst_counts.setdefault(aid, {}) + counts[name] = counts.get(name, 0) + 1 + if inst.get("type") == "company": + companies.add(name) + if companies: + company_on_work.append((aid, companies)) + + if company_on_work and 2 <= len(seen) <= max_authors_per_work: + for ego in focal_on_work: + links = company_links.setdefault(ego, {}) + for aid, companies in company_on_work: + links.setdefault(aid, set()).update(companies) + + inst_by_author = { + aid: max(counts.items(), key=lambda kv: (kv[1], kv[0]))[0] + for aid, counts in inst_counts.items() + } + return dois_by_author, inst_by_author, company_links + + def build_network_docs( graph: Graph, metric_rows: dict[str, dict[str, Any]], scored_rows: list[dict[str, Any]], incident: dict[str, list], inst_by_author: dict[str, str], - company_authors: set[str], + company_links: dict[str, dict[str, set[str]]], max_nodes: int = 42, max_forced_mentees: int = 14, ) -> list[dict[str, Any]]: @@ -34,6 +105,7 @@ def build_network_docs( metric_rows must still carry the FULL `junior_ids` (pre-scoring; the scored rows' evidence list is capped). scored_rows supply the ego header fields. + `company_links` comes from `collect_author_context`. """ scored_by_id = {r["author_id"]: r for r in scored_rows} docs: list[dict[str, Any]] = [] @@ -51,8 +123,8 @@ def build_network_docs( forced = set(mentee_picks) others = [n for n, _ in ranked if n not in forced] selected = [ego_id] + mentee_picks + others[: max_nodes - len(mentee_picks)] - idset = set(selected) + ego_company = company_links.get(ego_id, {}) nodes = [] for nid in selected: node = graph.nodes[nid] @@ -60,22 +132,25 @@ def build_network_docs( role = "ego" elif nid in mentees: role = "mentee" - elif nid in company_authors and not node.is_focal: + elif nid in ego_company and not node.is_focal: role = "industry" elif node.is_focal: role = "cohort" else: role = "external" - nodes.append( - { - "id": nid, - "name": node.display_name, - "role": role, - "inst": inst_by_author.get(nid, ""), - "active_years": len(node.publication_years), - "suspicious": is_suspicious_profile(node.publication_years), - } - ) + node_doc = { + "id": nid, + "name": node.display_name, + "role": role, + "inst": inst_by_author.get(nid, ""), + "active_years": len(node.publication_years), + "suspicious": is_suspicious_profile(node.publication_years), + } + # which companies connect this person to the ego (present on every + # role — a mentee or cohort member can hold a company link too) + if nid in ego_company: + node_doc["company_insts"] = sorted(ego_company[nid]) + nodes.append(node_doc) # pair lookups against the edge dict (~900 per ego), NOT a scan of # the 5.8M-edge dict per ego diff --git a/service/scripts/profiling/multipliers/tests/test_networks.py b/service/scripts/profiling/multipliers/tests/test_networks.py new file mode 100644 index 00000000..d6caf705 --- /dev/null +++ b/service/scripts/profiling/multipliers/tests/test_networks.py @@ -0,0 +1,140 @@ +"""Tests for the ego-network docs: ego-relative industry roles and company links. + +Regression background (audit of I62318514_A5113304257): the old global +"has a company affiliation anywhere in the corpus" flag marked 2 of 6 industry +nodes whose company ties were on works NOT shared with the ego, and the +first-seen `inst` label showed minority affiliations. +""" +from __future__ import annotations + +from service.scripts.profiling.multipliers.graph import build_graph +from service.scripts.profiling.multipliers.metrics import incident_edges +from service.scripts.profiling.multipliers.networks import ( + build_network_docs, + collect_author_context, +) + +EGO, OTHER_EGO, COHORT, MENTEE = "E1", "F1", "C1", "M1" +FOCAL = {EGO, OTHER_EGO, COHORT, MENTEE} +X_SHARED_COMPANY = "X1" # company affiliation on a work shared with EGO +Y_ELSEWHERE_COMPANY = "Y1" # company affiliation only on a work NOT shared with EGO + + +def make_work(wid, authors, year=2024, doi=None): + """authors: list of (author_id, [(inst_name, inst_type), ...]).""" + return { + "id": f"https://openalex.org/{wid}", + "publication_year": year, + "doi": doi, + "authorships": [ + { + "author": {"id": aid, "display_name": aid}, + "institutions": [ + {"id": f"I_{name}", "display_name": name, "type": typ} + for name, typ in insts + ], + } + for aid, insts in authors + ], + } + + +def fixture_works(): + return [ + # shared with EGO: X and the ego itself carry company affiliations here, + # the mentee and a cohort member too (role precedence must still win) + make_work( + "W1", + [ + (EGO, [("EgoCo", "company"), ("UDE", "education")]), + (X_SHARED_COMPANY, [("Acme Corp", "company"), ("Uni A", "education")]), + (MENTEE, [("UDE", "education"), ("MenteeCo", "company")]), + (COHORT, [("UDE", "education"), ("Gamma AG", "company")]), + ], + doi="https://doi.org/10.1/w1", + ), + # shared with EGO, but Y has no company affiliation on it + make_work("W2", [(EGO, [("UDE", "education")]), (Y_ELSEWHERE_COMPANY, [("Uni B", "education")])]), + # Y's company affiliation lives on a work shared with OTHER_EGO only + make_work( + "W3", + [ + (OTHER_EGO, [("UDE", "education")]), + (Y_ELSEWHERE_COMPANY, [("Beta GmbH", "company"), ("Uni B", "education")]), + ], + ), + ] + + +def test_company_links_are_ego_relative(): + _, _, links = collect_author_context(fixture_works(), FOCAL) + # X's company tie is on a work shared with EGO; Y's is not + assert links[EGO][X_SHARED_COMPANY] == {"Acme Corp"} + assert Y_ELSEWHERE_COMPANY not in links[EGO] + # ...but it IS a company link for the ego whose work carries it + assert links[OTHER_EGO][Y_ELSEWHERE_COMPANY] == {"Beta GmbH"} + # the ego's own company affiliation lands under their own id + assert links[EGO][EGO] == {"EgoCo"} + + +def test_company_links_respect_the_hyperauthorship_cap(): + crowd = [(f"D{i}", [("UDE", "education")]) for i in range(60)] + big = make_work("W9", [(EGO, [("UDE", "education")]), + ("Z1", [("Huge Inc", "company")])] + crowd) + _, _, links = collect_author_context([big], FOCAL, max_authors_per_work=50) + assert links == {} + + +def test_inst_label_is_the_modal_affiliation(): + _, inst_by_author, _ = collect_author_context(fixture_works(), FOCAL) + # Y appears with "Uni B" on both works -> modal, not first-seen + assert inst_by_author[Y_ELSEWHERE_COMPANY] == "Uni B" + assert inst_by_author[COHORT] == "UDE" + + +def test_dois_collected_only_with_normalizer_and_only_for_focal(): + dois, _, _ = collect_author_context( + fixture_works(), FOCAL, doi_normalizer=lambda d: d + ) + assert EGO in dois and X_SHARED_COMPANY not in dois + no_dois, _, _ = collect_author_context(fixture_works(), FOCAL) + assert no_dois == {} + + +def _docs(): + works = fixture_works() + graph = build_graph(works, FOCAL) + _, inst_by_author, company_links = collect_author_context(works, FOCAL) + metric_rows = { + EGO: {"junior_ids": [MENTEE]}, + OTHER_EGO: {"junior_ids": []}, + } + scored_rows = [{"author_id": EGO}, {"author_id": OTHER_EGO}] + docs = build_network_docs( + graph, metric_rows, scored_rows, incident_edges(graph), + inst_by_author, company_links, + ) + return {d["author_id"]: {n["id"]: n for n in d["nodes"]} for d in docs} + + +def test_industry_role_requires_company_link_on_shared_works(): + nodes = _docs() + ego_net, other_net = nodes[EGO], nodes[OTHER_EGO] + assert ego_net[X_SHARED_COMPANY]["role"] == "industry" + assert ego_net[X_SHARED_COMPANY]["company_insts"] == ["Acme Corp"] + # Y co-authored with EGO but their company tie is elsewhere -> external here + assert ego_net[Y_ELSEWHERE_COMPANY]["role"] == "external" + assert "company_insts" not in ego_net[Y_ELSEWHERE_COMPANY] + # ...and industry in the network the tie actually belongs to + assert other_net[Y_ELSEWHERE_COMPANY]["role"] == "industry" + assert other_net[Y_ELSEWHERE_COMPANY]["company_insts"] == ["Beta GmbH"] + + +def test_role_precedence_keeps_mentee_cohort_and_ego_but_carries_company_insts(): + ego_net = _docs()[EGO] + assert ego_net[MENTEE]["role"] == "mentee" + assert ego_net[MENTEE]["company_insts"] == ["MenteeCo"] + assert ego_net[COHORT]["role"] == "cohort" # focal members are never industry + assert ego_net[COHORT]["company_insts"] == ["Gamma AG"] + assert ego_net[EGO]["role"] == "ego" + assert ego_net[EGO]["company_insts"] == ["EgoCo"] diff --git a/service/src/main/inse/integrations/elasticsearch.py b/service/src/main/inse/integrations/elasticsearch.py index b48e6c78..4cd750fd 100644 --- a/service/src/main/inse/integrations/elasticsearch.py +++ b/service/src/main/inse/integrations/elasticsearch.py @@ -108,6 +108,8 @@ def _index_to_cluster(index: ESIndex) -> ESCluster | None: ESIndex.DFG_PROJECTS_V2, ESIndex.DFG_INSTITUTES_V2, ESIndex.PROJECTS_DFG_OPENALEX_TOPICS, + ESIndex.MULTIPLICATORS_V1, + ESIndex.MULTIPLICATOR_NETWORKS_V1, }: return ESCluster.INSE else: diff --git a/service/src/main/inse/main.py b/service/src/main/inse/main.py index a662dc9a..82d2aede 100644 --- a/service/src/main/inse/main.py +++ b/service/src/main/inse/main.py @@ -37,6 +37,7 @@ from inse.keywords.service import router as keywords_service_router # caching from inse.middleware.etag_cache import ETagCacheMiddleware +from inse.multiplicators.router import router as multiplicators_router from inse.news.service import router as news_service_router from inse.organization_management.router import router as organization_management_router from inse.patents.keywords.service import router as keywords_patents_router @@ -134,6 +135,7 @@ app.include_router(bookmarks_router) app.include_router(background_jobs_router) app.include_router(eu_organizations_router) +app.include_router(multiplicators_router) app.add_middleware( ETagCacheMiddleware, ttl=600, # 10 minutes expiration time diff --git a/service/src/main/inse/middleware/etag_cache.py b/service/src/main/inse/middleware/etag_cache.py index 30581bd9..4cdf9195 100644 --- a/service/src/main/inse/middleware/etag_cache.py +++ b/service/src/main/inse/middleware/etag_cache.py @@ -12,29 +12,30 @@ from starlette.responses import Response # organization must never be reused by the browser. NO_STORE_PATH_PREFIXES = ( "/api/auth/v2", - "/api/accounts", - "/api/background-jobs", - "/api/bookmarks", - "/api/organizations", -) - -# Keep these responses in the server-side ETag cache, but require the browser -# to revalidate them. A new access token (for example after impersonation) -# automatically produces a different cache key. -REVALIDATE_PATH_PREFIXES = ( - "/api/dashboard", - "/api/rank/orientation-profiles", - "/api/works/v2/classification/", -) - -REVALIDATE_PATH_FRAGMENTS = ( - "/company-connections", - "/primary-category-aggregations", -) - -NO_STORE_PATH_FRAGMENTS = ( - "/collaboration-graph/", -) + "/api/accounts", + "/api/background-jobs", + "/api/bookmarks", + "/api/organizations", +) + +# Keep these responses in the server-side ETag cache, but require the browser +# to revalidate them. A new access token (for example after impersonation) +# automatically produces a different cache key. +REVALIDATE_PATH_PREFIXES = ( + "/api/dashboard", + "/api/multiplicators", + "/api/rank/orientation-profiles", + "/api/works/v2/classification/", +) + +REVALIDATE_PATH_FRAGMENTS = ( + "/company-connections", + "/primary-category-aggregations", +) + +NO_STORE_PATH_FRAGMENTS = ( + "/collaboration-graph/", +) # POST is opt-out. Add any endpoint here that MUTATES state (create/update/delete/ # trigger side effects), even if it "usually" returns 200. EXCLUDED_POST_PATHS = ( @@ -104,17 +105,17 @@ class ETagCacheMiddleware(BaseHTTPMiddleware): def _content_type(self, response: Response) -> str | None: return response.headers.get("content-type") - def _requires_no_store(self, request: Request) -> bool: - path = request.url.path - return path.startswith(NO_STORE_PATH_PREFIXES) or any( - fragment in path for fragment in NO_STORE_PATH_FRAGMENTS - ) - - def _requires_revalidation(self, request: Request) -> bool: - path = request.url.path - return path.startswith(REVALIDATE_PATH_PREFIXES) or any( - fragment in path for fragment in REVALIDATE_PATH_FRAGMENTS - ) + def _requires_no_store(self, request: Request) -> bool: + path = request.url.path + return path.startswith(NO_STORE_PATH_PREFIXES) or any( + fragment in path for fragment in NO_STORE_PATH_FRAGMENTS + ) + + def _requires_revalidation(self, request: Request) -> bool: + path = request.url.path + return path.startswith(REVALIDATE_PATH_PREFIXES) or any( + fragment in path for fragment in REVALIDATE_PATH_FRAGMENTS + ) def _set_no_store_headers(self, response: Response) -> None: response.headers["Cache-Control"] = "private, no-store, max-age=0" @@ -133,14 +134,14 @@ class ETagCacheMiddleware(BaseHTTPMiddleware): vary_values.append("Authorization") headers["Vary"] = ", ".join(vary_values) - def _cache_response_headers( - self, request: Request, etag: str, content_type: str | None - ) -> dict[str, str]: - cache_control = ( - "no-cache, max-age=0" - if self._requires_revalidation(request) - else f"max-age={self.ttl}" - ) + def _cache_response_headers( + self, request: Request, etag: str, content_type: str | None + ) -> dict[str, str]: + cache_control = ( + "no-cache, max-age=0" + if self._requires_revalidation(request) + else f"max-age={self.ttl}" + ) headers = {"ETag": etag, "Cache-Control": cache_control} if request.headers.get("authorization"): headers["Cache-Control"] = f"private, {cache_control}" diff --git a/service/src/main/inse/model.py b/service/src/main/inse/model.py index 882338ad..c50e4871 100644 --- a/service/src/main/inse/model.py +++ b/service/src/main/inse/model.py @@ -123,3 +123,6 @@ class ESIndex(StrEnum): PROJECTS_CORDIS_EU_H2020_TOPICS = "projects_cordiseu_h2020_openalex_topics" PROJECTS_CORDIS_EU_HEUROPE_TOPICS = "projects_cordiseu_heurope_openalex_topics" PATENTS_OPENALEX_KEYWORDS = "patents_openalex_keywords" + + MULTIPLICATORS_V1 = "multiplicators_v1" + MULTIPLICATOR_NETWORKS_V1 = "multiplicator_networks_v1" diff --git a/service/src/main/inse/multiplicators/__init__.py b/service/src/main/inse/multiplicators/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/service/src/main/inse/multiplicators/data/founder_model_info.json b/service/src/main/inse/multiplicators/data/founder_model_info.json new file mode 100644 index 00000000..4fecd617 --- /dev/null +++ b/service/src/main/inse/multiplicators/data/founder_model_info.json @@ -0,0 +1,97 @@ +{ + "model": "lightgbm_symmetric_founder_classifier_v2", + "design": "symmetric landmark (see experiments/src/symmetric.py)", + "reference_cohort_size": 9017, + "reference_founders": 2349, + "oof_roc_auc": 0.8659, + "oof_pr_auc": 0.7257, + "importance_metric": "mean ROC-AUC drop under feature permutation (out-of-fold)", + "importances": [ + { + "feature": "patent_research_area_n.", + "importance_mean": 0.1044, + "importance_std": 0.01 + }, + { + "feature": "pub_rate", + "importance_mean": 0.082, + "importance_std": 0.0103 + }, + { + "feature": "first_publication_year", + "importance_mean": 0.0548, + "importance_std": 0.006 + }, + { + "feature": "industry_collab_at_index", + "importance_mean": 0.0455, + "importance_std": 0.0047 + }, + { + "feature": "career_age_at_index", + "importance_mean": 0.0303, + "importance_std": 0.0061 + }, + { + "feature": "patents_at_index", + "importance_mean": 0.0279, + "importance_std": 0.0037 + }, + { + "feature": "patent_rate", + "importance_mean": 0.0226, + "importance_std": 0.0028 + }, + { + "feature": "patent_research_area_46", + "importance_mean": 0.0207, + "importance_std": 0.0047 + }, + { + "feature": "publication_research_area_32", + "importance_mean": 0.015, + "importance_std": 0.0027 + }, + { + "feature": "years_since_first_grant", + "importance_mean": 0.0091, + "importance_std": 0.0028 + }, + { + "feature": "grant_research_area_51", + "importance_mean": 0.0084, + "importance_std": 0.0018 + }, + { + "feature": "institution_berkeley", + "importance_mean": 0.0071, + "importance_std": 0.0021 + } + ], + "horizon_models": [ + { + "horizon_years": 1, + "model": "lightgbm_symmetric_p_within_1y_v2", + "oof_roc_auc": 0.8614, + "oof_pr_auc": 0.7154 + }, + { + "horizon_years": 3, + "model": "lightgbm_symmetric_p_within_3y_v2", + "oof_roc_auc": 0.861, + "oof_pr_auc": 0.7176 + }, + { + "horizon_years": 5, + "model": "lightgbm_symmetric_p_within_5y_v2", + "oof_roc_auc": 0.8535, + "oof_pr_auc": 0.7038 + } + ], + "caveats": [ + "The top feature patent_research_area_n. is constant across this deployment's cohort (the patent corpus has no IPC-to-FOR mapping, so every patent research area is the unknown token) - it separated classes in training but separates nothing locally.", + "Importances describe the trained model on its training distribution, not the local cohort.", + "institution_* features were one-hot encoded in the research experiments; the production bundle drops them, so their listed importance does not apply to deployed scores." + ], + "source": "service/scripts/profiling/founding_potential/results/rq1_symmetric/permutation_importance.csv + production/classifier_symmetric/manifest.json" +} diff --git a/service/src/main/inse/multiplicators/model.py b/service/src/main/inse/multiplicators/model.py new file mode 100644 index 00000000..b8ee1317 --- /dev/null +++ b/service/src/main/inse/multiplicators/model.py @@ -0,0 +1,569 @@ +"""Models for the multiplicator and founder-potential indices. + +Two different ranking scales live in the same source document, and the field +names here keep them apart: + + *_external_percentile 0-100, ranked against a fixed reference cohort of + academics at OTHER universities. + *_peer_rank 0-1, ranked against same-university peers in the same + career stage. +""" + +from enum import StrEnum + +from pydantic import BaseModel, ConfigDict, Field + +from inse.model import Page + +# Dimensions FOR 2-digit division names, matching FOR_NAMES in +# scripts/profiling/multipliers/founding_stats.py. +FOR_DIVISION_NAMES: dict[str, str] = { + "30": "Agricultural, Veterinary & Food Sciences", + "31": "Biological Sciences", + "32": "Biomedical & Clinical Sciences", + "34": "Chemical Sciences", + "35": "Commerce, Management, Tourism & Services", + "36": "Creative Arts & Writing", + "37": "Earth Sciences", + "38": "Economics", + "40": "Engineering", + "41": "Environmental Sciences", + "42": "Health Sciences", + "44": "Human Society", + "46": "Information & Computing Sciences", + "49": "Mathematical Sciences", + "51": "Physical Sciences", + "52": "Psychology", + "n.": "unknown / not classified", +} + +UNKNOWN_RESEARCH_AREA = "n." + + +class CareerBucket(StrEnum): + EARLY = "Early" + EMERGING = "Emerging" + ESTABLISHED = "Established" + SENIOR = "Senior" + + +CAREER_BUCKET_ORDER: list[CareerBucket] = [ + CareerBucket.EARLY, + CareerBucket.EMERGING, + CareerBucket.ESTABLISHED, + CareerBucket.SENIOR, +] + + +class MultiplierTag(StrEnum): + BRIDGER = "bridger" + MENTOR = "mentor" + AMPLIFIER = "amplifier" + + +class PeerRankField(StrEnum): + BRIDGER = "bridger" + MENTOR = "mentor" + AMPLIFIER = "amplifier" + MAX = "max" + + +class FounderSortBy(StrEnum): + EXTERNAL_PERCENTILE = "external_percentile" + WITHIN_1Y = "within_1y" + WITHIN_3Y = "within_3y" + WITHIN_5Y = "within_5y" + PUBLICATIONS = "publications" + PATENTS = "patents" + ACTIVE_YEARS = "active_years" + + +class ResearcherSortBy(StrEnum): + BRIDGER = "bridger" + MENTOR = "mentor" + AMPLIFIER = "amplifier" + MAX = "max" + + +class FounderScreenReason(StrEnum): + """Why a researcher fails the data-quality screen.""" + + MERGED_PROFILE = "MERGED_PROFILE" + IMPLAUSIBLE_CAREER_LENGTH = "IMPLAUSIBLE_CAREER_LENGTH" + UNKNOWN_CAREER_LENGTH = "UNKNOWN_CAREER_LENGTH" + THIN_PROFILE = "THIN_PROFILE" + OUT_OF_POPULATION = "OUT_OF_POPULATION" + + +class FunnelStageKey(StrEnum): + ALL = "ALL" + IN_POPULATION = "IN_POPULATION" + NOT_SUSPICIOUS = "NOT_SUSPICIOUS" + CAREER_AGE_PLAUSIBLE = "CAREER_AGE_PLAUSIBLE" + MIN_PUBLICATIONS = "MIN_PUBLICATIONS" + + +class ShowcaseKind(StrEnum): + BRIDGER = "bridger" + MENTOR = "mentor" + AMPLIFIER = "amplifier" + EXAMPLE = "example" + + +class MultiplicatorsBase(BaseModel): + """Ignores unknown source keys so retired index fields never leak out.""" + + model_config = ConfigDict(extra="ignore") + + +class MultiplierPeerRanks(MultiplicatorsBase): + """Sub-scores, 0-1, ranked within this university and career stage.""" + + bridger: float = Field(default=0.0, description="Bridger sub-score (0-1).") + mentor: float = Field(default=0.0, description="Mentor sub-score (0-1).") + amplifier: float = Field(default=0.0, description="Amplifier sub-score (0-1).") + + +class MetricValue(MultiplicatorsBase): + """A raw metric next to its peer rank.""" + + raw: float | None = Field( + default=None, description="The raw metric value in its own units." + ) + peer_rank: float | None = Field( + default=None, + description=( + "Rank of this metric (0-1) against same-university peers in the same " + "career stage. Null when the metric does not feed any sub-score." + ), + ) + + +class FounderTiming(MultiplicatorsBase): + """Sequence-model timing estimate. + + Only present when the models are applicable to this profile; when + `timing_applicable` is false this whole object is null, because the estimate + is anchored on a publication debut year that is unreliable for merged + profiles and outside the 1-20 year career range the models were trained on. + """ + + predicted_founding_age: float | None = Field( + default=None, + description="How many years into a career this activity pattern looks like a founding moment.", + ) + predicted_founding_age_cross_check: float | None = Field( + default=None, description="The second model's estimate, as a cross-check." + ) + years_to_founding: float | None = Field( + default=None, + description="predicted_founding_age minus current_career_age. <= 0 means the profile already looks founding-ready.", + ) + + +class FounderPotential(MultiplicatorsBase): + """Founder-propensity model output for one researcher.""" + + external_percentile: float | None = Field( + default=None, + description=( + "Rank (0-100) of this person's founder propensity against a fixed reference " + "cohort of ~9,000 academics at other universities. NULL means the person is " + "outside the model's scoring population - unscored, NOT zero. Never treat " + "null as a low score." + ), + ) + external_percentile_within_1y: float | None = Field( + default=None, description="Same scale, for 'founds within 1 year of the index'." + ) + external_percentile_within_3y: float | None = Field( + default=None, description="Same scale, for 'founds within 3 years of the index'." + ) + external_percentile_within_5y: float | None = Field( + default=None, description="Same scale, for 'founds within 5 years of the index'." + ) + in_reference_population: bool = Field( + default=False, + description=( + "Whether the model considers this person scoreable (at least 4 publications). " + "Below it the training classes come from clashing sampling frames and the " + "scores are not evidence, so such people must not be ranked." + ), + ) + timing_applicable: bool = Field( + default=False, + description="Whether the sequence timing models apply to this profile. When false, `timing` is null.", + ) + current_career_age: int | None = Field( + default=None, + description="Scoring year minus first publication year.", + ) + timing: FounderTiming | None = Field( + default=None, + description="Timing estimate; null when `timing_applicable` is false.", + ) + as_of_year: int | None = Field( + default=None, + description="The scoring year - the corpus's newest publication year, not the wall clock.", + ) + patent_source: str | None = Field( + default=None, + description=( + "Which patent link quality fed the model's patent features. Scores computed " + "under different sources are not comparable." + ), + ) + classifier_model: str | None = Field( + default=None, description="Which model bundle produced these numbers." + ) + + +class FounderFeatures(MultiplicatorsBase): + """The exact input record the founder model saw, as coach-facing evidence.""" + + publications: int = Field(default=0, description="Lifetime publication count at the scoring year.") + patents: int = Field(default=0, description="Patent count. 0 means 'nothing found', not 'provably none'.") + grants: int = Field(default=0, description="Distinct grant ids acknowledged, raw.") + grants_capped: float | None = Field( + default=None, + description="The de-inflated grant value the model effectively used (consortium lists inflate the raw count).", + ) + industry_collab_papers: int = Field( + default=0, description="Works co-authored with at least one company-affiliated author." + ) + linked_patents_to_publications: int = Field( + default=0, + description="Always 0 here - this corpus has no patent-to-paper citation graph.", + ) + first_publication_year: int | None = Field(default=None) + first_patent_year: int | None = Field(default=None) + first_grant_year: int | None = Field(default=None) + publication_research_area: str | None = Field( + default=None, description="Modal Dimensions FOR 2-digit division of the person's works." + ) + publication_research_area_label: str | None = Field( + default=None, description="Human-readable name for the code; null if the code is unknown." + ) + grant_research_area: str | None = Field( + default=None, description="Modal FOR division of the works the person's grants funded." + ) + grant_research_area_label: str | None = Field(default=None) + + +class FounderScreen(MultiplicatorsBase): + """Data-quality verdict for a founder candidate.""" + + passed: bool = Field(description="Whether the researcher passes every screen rule.") + reasons: list[FounderScreenReason] = Field( + default=[], + description=( + "Why the screen failed, in precedence order - reasons[0] is the headline " + "reason. Empty when `passed` is true." + ), + ) + + +class ResearcherMetrics(MultiplicatorsBase): + """Raw multiplier metrics paired with their peer ranks.""" + + betweenness: MetricValue = Field(default_factory=MetricValue) + brokerage: MetricValue = Field(default_factory=MetricValue) + constraint: MetricValue = Field(default_factory=MetricValue) + field_entropy: MetricValue = Field(default_factory=MetricValue) + cross_institution_share: MetricValue = Field(default_factory=MetricValue) + strength: MetricValue = Field(default_factory=MetricValue) + n_coauthors: MetricValue = Field(default_factory=MetricValue) + juniors_mentored: MetricValue = Field(default_factory=MetricValue) + junior_progression_rate: MetricValue = Field(default_factory=MetricValue) + mentoring_rate: MetricValue = Field(default_factory=MetricValue) + last_author_with_junior_first: MetricValue = Field(default_factory=MetricValue) + industry_coauthor_share: MetricValue = Field(default_factory=MetricValue) + industry_coauthor_share_shrunk: MetricValue = Field(default_factory=MetricValue) + patent_count: MetricValue = Field(default_factory=MetricValue) + cordis_eu_projects: MetricValue = Field(default_factory=MetricValue) + news_mentions: MetricValue = Field(default_factory=MetricValue) + + +class ResearcherSummary(MultiplicatorsBase): + """Compact researcher row shared by the list endpoints.""" + + author_id: str = Field(description="OpenAlex author id, short form (e.g. A5087456839).") + display_name: str | None = Field(default=None) + career_bucket: CareerBucket | None = Field( + default=None, description="Career stage; all peer ranks are computed within it." + ) + active_years: int = Field(default=0, description="Distinct calendar years with at least one publication.") + n_works: int = Field(default=0) + suspicious_profile: bool = Field( + default=False, + description="Merged-identity heuristic (debut before 1970 or a span over 60 years). Treat evidence as low confidence.", + ) + tags: list[MultiplierTag] = Field( + default=[], description="Archetypes this person qualifies for; a person can hold 0-3." + ) + multiplier_peer_ranks: MultiplierPeerRanks = Field(default_factory=MultiplierPeerRanks) + max_multiplier_peer_rank: float = Field( + default=0.0, description="Best of the three sub-scores (0-1)." + ) + + +class FounderCandidate(ResearcherSummary): + """A researcher with their founder-potential block and screen verdict.""" + + founder_potential: FounderPotential = Field(default_factory=FounderPotential) + founder_features: FounderFeatures = Field(default_factory=FounderFeatures) + screen: FounderScreen + + +class ResearcherDetail(ResearcherSummary): + """Everything the index holds for one researcher.""" + + institution_id: str = Field(description="The primary institution this document belongs to.") + metrics: ResearcherMetrics = Field(default_factory=ResearcherMetrics) + founder_potential: FounderPotential = Field(default_factory=FounderPotential) + founder_features: FounderFeatures = Field(default_factory=FounderFeatures) + computed_at: str | None = Field(default=None, description="When the pipeline last wrote this document.") + config_hash: str | None = Field( + default=None, + description="Which scoring configuration produced these numbers. Scores are weight-dependent.", + ) + + +class FounderCandidatePage(Page[FounderCandidate]): + """A paginated list of founder candidates.""" + + +class ResearcherSummaryPage(Page[ResearcherSummary]): + """A paginated list of researchers.""" + + +class EgoNetworkNode(MultiplicatorsBase): + """One person in an ego network. No layout coordinates - the client lays out.""" + + id: str = Field(description="OpenAlex author id, short form.") + name: str | None = Field(default=None) + role: str = Field( + description=( + "One of: ego, mentee, cohort, industry, external. `industry` is ego-relative: " + "the person holds a company affiliation on a work shared with the ego (see " + "`company_insts`). Typed as a string rather than an enum because the index is " + "rebuilt independently of this API." + ) + ) + inst: str | None = Field( + default=None, + description="The person's most frequent institution across their works.", + ) + active_years: int = Field(default=0) + suspicious: bool = Field(default=False) + company_insts: list[str] | None = Field( + default=None, + description=( + "Companies this person was affiliated with on works shared with the ego - " + "the basis for the industry role. Present on any role: a mentee or cohort " + "member with a company link keeps their role but still carries the names." + ), + ) + + +class EgoNetworkEdge(MultiplicatorsBase): + """A collaboration tie between two nodes.""" + + a: str = Field(description="First author id (lexicographically smaller).") + b: str = Field(description="Second author id.") + w: float = Field(default=0.0, description="Decayed, team-size-weighted collaboration strength.") + n_works: int = Field(default=0, description="Raw shared-work count.") + cross: bool = Field(default=False, description="Whether the tie is mostly cross-institution.") + first_year: int | None = Field(default=None) + last_year: int | None = Field(default=None) + + +class EgoNetwork(MultiplicatorsBase): + """One researcher's ego co-author network. + + Node and edge positions are deliberately absent: a force layout on the client + (e.g. echarts' `graph` series) positions them at render time. + """ + + author_id: str + display_name: str | None = Field(default=None) + career_bucket: CareerBucket | None = Field(default=None) + active_years: int = Field(default=0) + n_works: int = Field(default=0) + suspicious_profile: bool = Field(default=False) + tags: list[MultiplierTag] = Field(default=[]) + multiplier_peer_ranks: MultiplierPeerRanks = Field(default_factory=MultiplierPeerRanks) + max_multiplier_peer_rank: float = Field(default=0.0) + total_coauthors: int = Field(default=0, description="All co-authors, not just the drawn ones.") + cohort_coauthors: int = Field(default=0, description="Co-authors inside this university's cohort.") + mentee_count: int = Field(default=0) + shown: int = Field(default=0, description="How many co-authors are in `nodes` (excluding the ego).") + shown_mentees: int = Field(default=0) + nodes: list[EgoNetworkNode] = Field( + default=[], description="nodes[0] is always the ego." + ) + edges: list[EgoNetworkEdge] = Field(default=[]) + computed_at: str | None = Field(default=None) + config_hash: str | None = Field(default=None) + + +class ShowcaseEntry(MultiplicatorsBase): + kind: ShowcaseKind = Field( + description="Which archetype this person illustrates; 'example' is the top scorer who just misses the tag threshold." + ) + researcher: ResearcherSummary + + +class Showcase(MultiplicatorsBase): + institution_id: str + entries: list[ShowcaseEntry] = Field( + default=[], description="Up to four entries; fewer if an archetype has no tagged people." + ) + + +class FunnelStage(MultiplicatorsBase): + """One cumulative stage of the data-quality funnel.""" + + key: FunnelStageKey + label: str = Field(description="Human-readable description of the rule applied at this stage.") + count: int = Field(description="How many researchers survive this stage and every earlier one.") + lost_from_previous: int = Field(default=0, description="How many the previous stage's set lost here.") + share_of_total: float = Field(default=0.0, description="count divided by the stage-0 total (0-1).") + + +class CareerStageStatistics(MultiplicatorsBase): + """Founder-score distribution for one career stage (or all of them).""" + + career_bucket: str = Field(description="A career stage name, or 'ALL' for the whole cohort.") + total: int = Field(default=0) + in_population: int = Field(default=0, description="Scoreable researchers - the pool percentiles are drawn from.") + screened: int = Field(default=0, description="How many pass the data-quality screen.") + shortlist_plain: int = Field(default=0, description="At or above the percentile threshold.") + shortlist_robust: int = Field(default=0, description="Also meeting the minimum publication count.") + percentile_p50: float | None = Field(default=None, description="Median founder percentile (approximate).") + percentile_p90: float | None = Field(default=None) + above_75: int = Field(default=0) + above_90: int = Field(default=0) + robust_percentile_p50: float | None = Field(default=None) + robust_percentile_p90: float | None = Field(default=None) + robust_above_75: int = Field(default=0) + robust_above_90: int = Field(default=0) + + +class ResearchAreaStatistics(MultiplicatorsBase): + """How one research area is represented in the cohort versus the shortlist.""" + + code: str = Field(description="Dimensions FOR 2-digit division code.") + label: str | None = Field(default=None, description="Human-readable name; null if the code is unknown.") + cohort_count: int = Field(default=0) + cohort_share: float = Field(default=0.0, description="Share of the scoreable cohort (0-1).") + shortlist_count: int = Field(default=0) + shortlist_share: float = Field(default=0.0) + robust_count: int = Field(default=0) + robust_share: float = Field(default=0.0) + ratio: float | None = Field( + default=None, + description="shortlist_share / cohort_share. Above 1 means over-represented. Null when the area is absent from the cohort.", + ) + + +class ArchetypeOverlap(MultiplicatorsBase): + """Overlap between one multiplier archetype and founder potential. + + Counts are NOT mutually exclusive: a person holding two tags is counted under + both, so these do not sum to the shortlist size. + """ + + tag: MultiplierTag + shortlist_count: int = Field(default=0, description="Shortlisted people carrying this tag.") + robust_count: int = Field(default=0) + soft_shortlist_count: int = Field( + default=0, description="Shortlisted people whose sub-score clears the softer threshold." + ) + soft_robust_count: int = Field(default=0) + tagged_in_population: int = Field( + default=0, description="Scoreable people carrying this tag - the reverse direction." + ) + tagged_percentile_p50: float | None = Field(default=None) + tagged_percentile_p90: float | None = Field(default=None) + tagged_above_band: int = Field( + default=0, description="Tagged people at or above the `tagged_band` percentile." + ) + + +class FounderStatisticsProvenance(MultiplicatorsBase): + institution_id: str + document_count: int = Field(description="Researchers indexed for this institution.") + computed_at: str | None = Field(default=None, description="When the pipeline last ran.") + config_hash: str | None = Field(default=None) + as_of_year: int | None = Field(default=None) + patent_sources: list[str] = Field( + default=[], description="Distinct patent link qualities present in this cohort." + ) + + +class FounderStatisticsParameters(MultiplicatorsBase): + """The cutoffs these statistics were computed with, echoed back.""" + + percentile_threshold: float + min_publications: int + soft_peer_rank_threshold: float + max_career_age: int + tagged_band: float + + +class FounderStatistics(MultiplicatorsBase): + """Everything the founder dashboard needs, in one response.""" + + provenance: FounderStatisticsProvenance + parameters: FounderStatisticsParameters + funnel: list[FunnelStage] = Field(default=[]) + overall: CareerStageStatistics + career_stages: list[CareerStageStatistics] = Field(default=[]) + research_areas: list[ResearchAreaStatistics] = Field(default=[]) + archetypes: list[ArchetypeOverlap] = Field(default=[]) + untagged_shortlist_count: int = Field( + default=0, description="Shortlisted people carrying no archetype tag at all." + ) + untagged_robust_count: int = Field(default=0) + + +class FounderFeatureImportance(MultiplicatorsBase): + feature: str + importance_mean: float + importance_std: float | None = Field(default=None) + + +class FounderHorizonModel(MultiplicatorsBase): + horizon_years: int + model: str + oof_roc_auc: float | None = Field(default=None) + oof_pr_auc: float | None = Field(default=None) + + +class FounderModelInfo(MultiplicatorsBase): + """Which model produced the founder scores, and what drives it. + + These numbers describe the trained model itself, not any one university, so + they are identical for every caller. + """ + + model_config = ConfigDict(extra="ignore", protected_namespaces=()) + + model: str = Field(description="The production model bundle name.") + design: str | None = Field(default=None) + reference_cohort_size: int | None = Field( + default=None, description="Rows in the training/reference cohort." + ) + reference_founders: int | None = Field(default=None) + oof_roc_auc: float | None = Field(default=None, description="Out-of-fold ROC-AUC.") + oof_pr_auc: float | None = Field(default=None, description="Out-of-fold PR-AUC.") + importance_metric: str | None = Field( + default=None, description="What the importance numbers measure." + ) + importances: list[FounderFeatureImportance] = Field(default=[]) + horizon_models: list[FounderHorizonModel] = Field(default=[]) + caveats: list[str] = Field( + default=[], description="Deployment caveats that must accompany these numbers." + ) + source: str | None = Field(default=None, description="Where the numbers were exported from.") diff --git a/service/src/main/inse/multiplicators/router.py b/service/src/main/inse/multiplicators/router.py new file mode 100644 index 00000000..72ff4a47 --- /dev/null +++ b/service/src/main/inse/multiplicators/router.py @@ -0,0 +1,296 @@ +"""Routes for the multiplicator and founder-potential indices. + +Every data route is scoped to the university of the logged-in user's +organization, taken from the access token - there is no institution parameter. +""" + +from typing import Annotated + +from fastapi import APIRouter, Depends, HTTPException, Path, Query, status + +from inse.auth.model import AccessTokenMetadata +from inse.auth.service import CurrentUserAccessTokenPayloadDep +from inse.model import SortDirection +from inse.router_prefixes import RouterPrefixes +from inse.tags import Tags + +from . import service +from .model import ( + CareerBucket, + EgoNetwork, + FounderCandidatePage, + FounderModelInfo, + FounderSortBy, + FounderStatistics, + MultiplierTag, + PeerRankField, + ResearcherDetail, + ResearcherSortBy, + ResearcherSummaryPage, + Showcase, +) + +router = APIRouter(prefix=RouterPrefixes.MULTIPLICATORS, tags=[Tags.MULTIPLICATORS]) + + +def _current_institution_id( + access_token_metadata: Annotated[AccessTokenMetadata, CurrentUserAccessTokenPayloadDep], +) -> str: + """The short OpenAlex institution id of the logged-in user's organization.""" + raw = access_token_metadata.effective_institution_id + short = service.short_openalex_id(raw) if raw else "" + if not short: + raise HTTPException( + status_code=status.HTTP_403_FORBIDDEN, + detail="No OpenAlex institution is assigned to the current organization.", + ) + return short + + +InstitutionIdDep = Annotated[str, Depends(_current_institution_id)] + +_AUTHOR_ID_PATH = Path( + description="The OpenAlex author id, short form (e.g. A5087456839) or full URL." +) + + +@router.get( + "/founder-statistics", + operation_id="getFounderStatistics", + summary="Founder-potential statistics for the current user's university: data-quality funnel, " + "score distributions per career stage, research-area composition and archetype overlap.", +) +async def get_founder_statistics( + institution_id: InstitutionIdDep, + percentile_threshold: Annotated[ + float, + Query( + description="Founder percentile (0-100) at or above which a researcher counts as shortlisted.", + ge=0, + le=100, + ), + ] = 90.0, + min_publications: Annotated[ + int, + Query( + description="Minimum publication count for the robust shortlist and the funnel's last stage.", + ge=0, + ), + ] = 7, + soft_peer_rank_threshold: Annotated[ + float, + Query( + description="Sub-score (0-1) at or above which a shortlisted researcher counts as a soft archetype match.", + ge=0, + le=1, + ), + ] = 0.7, + max_career_age: Annotated[ + int, + Query(description="Career ages above this count as implausible in the screen.", ge=0), + ] = 40, + tagged_band: Annotated[ + float, + Query( + description="Founder percentile band used in the reverse archetype view (how many tagged people exceed it).", + ge=0, + le=100, + ), + ] = 40.0, +) -> FounderStatistics: + return await service.get_founder_statistics( + institution_id=institution_id, + percentile_threshold=percentile_threshold, + min_publications=min_publications, + soft_peer_rank_threshold=soft_peer_rank_threshold, + max_career_age=max_career_age, + tagged_band=tagged_band, + ) + + +@router.get( + "/founders", + operation_id="searchFounderCandidates", + summary="Search the current university's researchers by founder potential.", +) +async def search_founder_candidates( + institution_id: InstitutionIdDep, + page: Annotated[int, Query(description="The page number to retrieve. (0-based)", ge=0)] = 0, + size: Annotated[ + int, Query(description="The number of researchers to retrieve per page.", ge=1, le=100) + ] = 25, + in_population: Annotated[ + bool | None, + Query( + description="Restrict to researchers the model can score (default). " + "Pass false for the unscored, or leave unset for everyone." + ), + ] = True, + min_external_percentile: Annotated[ + float | None, + Query(description="Minimum founder percentile (0-100, vs the external reference cohort).", ge=0, le=100), + ] = None, + max_external_percentile: Annotated[ + float | None, Query(description="Maximum founder percentile (0-100).", ge=0, le=100) + ] = None, + career_bucket: Annotated[ + list[CareerBucket] | None, Query(description="Career stages to include.") + ] = None, + screened: Annotated[ + bool | None, + Query( + description="true: only researchers passing the data-quality screen; " + "false: only the rejects; unset: everyone." + ), + ] = None, + min_publications: Annotated[ + int | None, Query(description="Minimum publication count.", ge=0) + ] = None, + has_patents: Annotated[ + bool | None, Query(description="Whether the researcher has at least one patent.") + ] = None, + research_area: Annotated[ + list[str] | None, + Query(description="Dimensions FOR 2-digit division codes to include (e.g. 32, 40)."), + ] = None, + tags: Annotated[ + list[MultiplierTag] | None, + Query(description="Multiplier tags to include (any-of semantics)."), + ] = None, + name: Annotated[ + str | None, Query(description="A name to filter by (prefix matches allowed).") + ] = None, + screen_min_publications: Annotated[ + int, Query(description="Publication count below which the screen flags a thin profile.", ge=0) + ] = 7, + screen_max_career_age: Annotated[ + int, Query(description="Career age above which the screen flags an implausible length.", ge=0) + ] = 40, + sort_by: Annotated[ + FounderSortBy, Query(description="The field to sort by.") + ] = FounderSortBy.EXTERNAL_PERCENTILE, + sort_order: Annotated[ + SortDirection, Query(description="The order to sort by.") + ] = SortDirection.DESCENDING, +) -> FounderCandidatePage: + return await service.search_founder_candidates( + institution_id=institution_id, + page=page, + size=size, + in_population=in_population, + min_external_percentile=min_external_percentile, + max_external_percentile=max_external_percentile, + career_bucket=career_bucket, + screened=screened, + min_publications=min_publications, + has_patents=has_patents, + research_area=research_area, + tags=tags, + name=name, + screen_min_publications=screen_min_publications, + screen_max_career_age=screen_max_career_age, + sort_by=sort_by, + sort_order=sort_order, + ) + + +@router.get( + "/researchers", + operation_id="searchMultiplicatorResearchers", + summary="Search the current university's researchers by multiplier archetype " + "(bridger / mentor / amplifier).", +) +async def search_researchers( + institution_id: InstitutionIdDep, + page: Annotated[int, Query(description="The page number to retrieve. (0-based)", ge=0)] = 0, + size: Annotated[ + int, Query(description="The number of researchers to retrieve per page.", ge=1, le=100) + ] = 25, + tags: Annotated[ + list[MultiplierTag] | None, + Query(description="Multiplier tags to include (any-of semantics)."), + ] = None, + career_bucket: Annotated[ + list[CareerBucket] | None, Query(description="Career stages to include.") + ] = None, + min_peer_rank: Annotated[ + float | None, + Query(description="Minimum sub-score (0-1, ranked against same-career-stage peers).", ge=0, le=1), + ] = None, + peer_rank_field: Annotated[ + PeerRankField, Query(description="Which sub-score `min_peer_rank` applies to.") + ] = PeerRankField.MAX, + suspicious_profile: Annotated[ + bool | None, Query(description="Filter by the merged-profile flag.") + ] = None, + name: Annotated[ + str | None, Query(description="A name to filter by (prefix matches allowed).") + ] = None, + sort_by: Annotated[ + ResearcherSortBy, Query(description="The sub-score to sort by.") + ] = ResearcherSortBy.MAX, + sort_order: Annotated[ + SortDirection, Query(description="The order to sort by.") + ] = SortDirection.DESCENDING, +) -> ResearcherSummaryPage: + return await service.search_researchers( + institution_id=institution_id, + page=page, + size=size, + tags=tags, + career_bucket=career_bucket, + min_peer_rank=min_peer_rank, + peer_rank_field=peer_rank_field, + suspicious_profile=suspicious_profile, + name=name, + sort_by=sort_by, + sort_order=sort_order, + ) + + +@router.get( + "/researchers/{author_id}", + operation_id="getMultiplicatorResearcher", + summary="Full multiplier and founder-potential detail for one researcher: every raw metric " + "next to its peer rank, so a coach can see why the person scored what they scored.", +) +async def get_researcher( + institution_id: InstitutionIdDep, + author_id: Annotated[str, _AUTHOR_ID_PATH], +) -> ResearcherDetail: + return await service.get_researcher_detail(institution_id, author_id) + + +@router.get( + "/researchers/{author_id}/network", + operation_id="getMultiplicatorResearcherNetwork", + summary="One researcher's ego co-author network (nodes and edges, no layout - " + "position them client-side with a force layout).", +) +async def get_researcher_network( + institution_id: InstitutionIdDep, + author_id: Annotated[str, _AUTHOR_ID_PATH], +) -> EgoNetwork: + return await service.get_researcher_network(institution_id, author_id) + + +@router.get( + "/showcase", + operation_id="getMultiplicatorShowcase", + summary="Four representative researchers: the top bridger, mentor and amplifier, " + "plus the best scorer who just misses the tag threshold.", +) +async def get_showcase(institution_id: InstitutionIdDep) -> Showcase: + return await service.get_showcase(institution_id) + + +@router.get( + "/founder-model-info", + operation_id="getFounderModelInfo", + summary="Which model produced the founder scores: performance and permutation " + "importances. Identical for every university.", +) +async def get_founder_model_info( + access_token_metadata: Annotated[AccessTokenMetadata, CurrentUserAccessTokenPayloadDep], +) -> FounderModelInfo: + return service.get_founder_model_info() diff --git a/service/src/main/inse/multiplicators/service.py b/service/src/main/inse/multiplicators/service.py new file mode 100644 index 00000000..5268d197 --- /dev/null +++ b/service/src/main/inse/multiplicators/service.py @@ -0,0 +1,1119 @@ +"""Service layer for the multiplicator and founder-potential endpoints. + +Reads the `multiplicators_v1` and `multiplicator_networks_v1` indices on the +INSE cluster. Every query is scoped with a `{"term": {"institution_id": ...}}` +filter; the institution id always arrives here already normalized to its short +form (e.g. "I62318514"). + +The summary statistics are computed by Elasticsearch aggregations in a single +request; nothing is precomputed or cached beyond the shared ETag middleware. +""" + +import json +from functools import lru_cache +from pathlib import Path +from typing import Any + +from inse.exceptions import ( + BadRequestException, + ElasticsearchNotFoundException, + NotFoundException, +) +from inse.integrations import elasticsearch +from inse.model import ESIndex, SortDirection + +from .model import ( + FOR_DIVISION_NAMES, + UNKNOWN_RESEARCH_AREA, + ArchetypeOverlap, + CareerBucket, + CareerStageStatistics, + EgoNetwork, + EgoNetworkEdge, + EgoNetworkNode, + FounderCandidate, + FounderCandidatePage, + FounderFeatures, + FounderModelInfo, + FounderPotential, + FounderScreen, + FounderScreenReason, + FounderSortBy, + FounderStatistics, + FounderStatisticsParameters, + FounderStatisticsProvenance, + FounderTiming, + FunnelStage, + FunnelStageKey, + MetricValue, + MultiplierPeerRanks, + MultiplierTag, + PeerRankField, + ResearcherDetail, + ResearcherMetrics, + ResearcherSortBy, + ResearcherSummary, + ResearcherSummaryPage, + ResearchAreaStatistics, + Showcase, + ShowcaseEntry, + ShowcaseKind, +) + +MAX_RESULT_WINDOW = 10_000 + +MODEL_INFO_PATH = Path(__file__).parent / "data" / "founder_model_info.json" + +# _source projection for list endpoints and the showcase. +SUMMARY_SOURCE_FIELDS = [ + "author_id", + "display_name", + "career_bucket", + "active_years", + "n_works", + "suspicious_profile", + "tags", + "sub_scores", + "max_sub_score", + "founding", + "founding_features", +] + +# Raw metrics paired with their peer ranks on the detail endpoint. +METRIC_NAMES = [ + "betweenness", + "brokerage", + "constraint", + "field_entropy", + "cross_institution_share", + "strength", + "n_coauthors", + "juniors_mentored", + "junior_progression_rate", + "mentoring_rate", + "last_author_with_junior_first", + "industry_coauthor_share", + "industry_coauthor_share_shrunk", + "patent_count", + "cordis_eu_projects", + "news_mentions", +] + +_PEER_RANK_ES_FIELD = { + PeerRankField.BRIDGER: "sub_scores.bridger", + PeerRankField.MENTOR: "sub_scores.mentor", + PeerRankField.AMPLIFIER: "sub_scores.amplifier", + PeerRankField.MAX: "max_sub_score", +} + +_RESEARCHER_SORT_ES_FIELD = { + ResearcherSortBy.BRIDGER: "sub_scores.bridger", + ResearcherSortBy.MENTOR: "sub_scores.mentor", + ResearcherSortBy.AMPLIFIER: "sub_scores.amplifier", + ResearcherSortBy.MAX: "max_sub_score", +} + +_FOUNDER_SORT_ES_FIELD = { + FounderSortBy.EXTERNAL_PERCENTILE: "founding.percentile", + FounderSortBy.WITHIN_1Y: "founding.p_within_1y_percentile", + FounderSortBy.WITHIN_3Y: "founding.p_within_3y_percentile", + FounderSortBy.WITHIN_5Y: "founding.p_within_5y_percentile", + FounderSortBy.PUBLICATIONS: "founding_features.publications", + FounderSortBy.PATENTS: "founding_features.patents", + FounderSortBy.ACTIVE_YEARS: "active_years", +} + + +def short_openalex_id(raw: str) -> str: + """Normalizes an OpenAlex id or URL to its short form ("I62318514").""" + return raw.strip().rstrip("/").rsplit("/", 1)[-1] + + +# --------------------------------------------------------------------------- +# Reusable query clauses +# --------------------------------------------------------------------------- + + +def _institution_clause(institution_id: str) -> dict[str, Any]: + return {"term": {"institution_id": institution_id}} + + +def _in_population_clause() -> dict[str, Any]: + return {"term": {"founding.in_population": True}} + + +def _not_suspicious_clause() -> dict[str, Any]: + # must_not-term-true rather than term-false, so a doc missing the field + # is not silently dropped. + return {"bool": {"must_not": [{"term": {"suspicious_profile": True}}]}} + + +def _career_age_ok_clause(max_career_age: int) -> dict[str, Any]: + return {"range": {"founding.current_career_age": {"lte": max_career_age}}} + + +def _min_publications_clause(min_publications: int) -> dict[str, Any]: + return {"range": {"founding_features.publications": {"gte": min_publications}}} + + +def _shortlist_clause(percentile_threshold: float) -> dict[str, Any]: + return {"range": {"founding.percentile": {"gte": percentile_threshold}}} + + +# --------------------------------------------------------------------------- +# The data-quality screen: one source of truth for the ES filter and the +# per-person verdict, so `screened=true` can never return a failing row. +# Order defines reason precedence: reasons[0] is the headline reason. +# --------------------------------------------------------------------------- + + +def _screen_rules( + min_publications: int, max_career_age: int +) -> list[tuple[FounderScreenReason, dict[str, Any]]]: + """(reason, ES clause that PASSES the rule) in precedence order.""" + return [ + (FounderScreenReason.MERGED_PROFILE, _not_suspicious_clause()), + ( + FounderScreenReason.IMPLAUSIBLE_CAREER_LENGTH, + # A range never matches a missing field, so this clause also fails + # docs with an unknown career age - mirrored below in the verdict + # as UNKNOWN_CAREER_LENGTH. + _career_age_ok_clause(max_career_age), + ), + (FounderScreenReason.THIN_PROFILE, _min_publications_clause(min_publications)), + ] + + +def _screen_clauses(min_publications: int, max_career_age: int) -> list[dict[str, Any]]: + return [clause for _, clause in _screen_rules(min_publications, max_career_age)] + + +def screen_verdict( + source: dict[str, Any], min_publications: int, max_career_age: int +) -> FounderScreen: + """The Python twin of `_screen_clauses`, evaluated on one document.""" + founding = source.get("founding") or {} + features = source.get("founding_features") or {} + reasons: list[FounderScreenReason] = [] + + if source.get("suspicious_profile"): + reasons.append(FounderScreenReason.MERGED_PROFILE) + + career_age = founding.get("current_career_age") + if career_age is None: + reasons.append(FounderScreenReason.UNKNOWN_CAREER_LENGTH) + elif career_age > max_career_age: + reasons.append(FounderScreenReason.IMPLAUSIBLE_CAREER_LENGTH) + + if (features.get("publications") or 0) < min_publications: + reasons.append(FounderScreenReason.THIN_PROFILE) + + if not founding.get("in_population"): + reasons.append(FounderScreenReason.OUT_OF_POPULATION) + + return FounderScreen(passed=not reasons, reasons=reasons) + + +# --------------------------------------------------------------------------- +# Document -> model mapping (explicit whitelists; the live mapping still +# carries retired v1 founder fields that must never surface) +# --------------------------------------------------------------------------- + + +def _to_tags(raw: Any) -> list[MultiplierTag]: + tags = [] + for tag in raw or []: + try: + tags.append(MultiplierTag(tag)) + except ValueError: + continue + return tags + + +def _to_career_bucket(raw: Any) -> CareerBucket | None: + try: + return CareerBucket(raw) + except ValueError: + return None + + +def _to_peer_ranks(source: dict[str, Any]) -> MultiplierPeerRanks: + sub_scores = source.get("sub_scores") or {} + return MultiplierPeerRanks( + bridger=sub_scores.get("bridger") or 0.0, + mentor=sub_scores.get("mentor") or 0.0, + amplifier=sub_scores.get("amplifier") or 0.0, + ) + + +def _research_area_label(code: str | None) -> str | None: + if code is None: + return None + return FOR_DIVISION_NAMES.get(code) + + +def _to_founder_potential(source: dict[str, Any]) -> FounderPotential: + founding = source.get("founding") or {} + timing_applicable = bool(founding.get("timing_applicable")) + timing = ( + FounderTiming( + predicted_founding_age=founding.get("predicted_founding_age"), + predicted_founding_age_cross_check=founding.get( + "predicted_founding_age_cross_check" + ), + years_to_founding=founding.get("years_to_founding"), + ) + if timing_applicable + else None + ) + return FounderPotential( + external_percentile=founding.get("percentile"), + external_percentile_within_1y=founding.get("p_within_1y_percentile"), + external_percentile_within_3y=founding.get("p_within_3y_percentile"), + external_percentile_within_5y=founding.get("p_within_5y_percentile"), + in_reference_population=bool(founding.get("in_population")), + timing_applicable=timing_applicable, + current_career_age=founding.get("current_career_age"), + timing=timing, + as_of_year=founding.get("as_of_year"), + patent_source=founding.get("patent_source"), + classifier_model=founding.get("classifier_model"), + ) + + +def _to_founder_features(source: dict[str, Any]) -> FounderFeatures: + features = source.get("founding_features") or {} + publication_area = features.get("publication_research_area") + grant_area = features.get("grant_research_area") + return FounderFeatures( + publications=features.get("publications") or 0, + patents=features.get("patents") or 0, + grants=features.get("grants") or 0, + grants_capped=features.get("grants_capped"), + industry_collab_papers=features.get("industry_collab_papers") or 0, + linked_patents_to_publications=features.get("linked_patents_to_publications") + or 0, + first_publication_year=features.get("first_publication_year") or None, + first_patent_year=features.get("first_patent_year") or None, + first_grant_year=features.get("first_grant_year") or None, + publication_research_area=publication_area, + publication_research_area_label=_research_area_label(publication_area), + grant_research_area=grant_area, + grant_research_area_label=_research_area_label(grant_area), + ) + + +def _summary_kwargs(source: dict[str, Any]) -> dict[str, Any]: + return { + "author_id": source.get("author_id") or "", + "display_name": source.get("display_name"), + "career_bucket": _to_career_bucket(source.get("career_bucket")), + "active_years": source.get("active_years") or 0, + "n_works": source.get("n_works") or 0, + "suspicious_profile": bool(source.get("suspicious_profile")), + "tags": _to_tags(source.get("tags")), + "multiplier_peer_ranks": _to_peer_ranks(source), + "max_multiplier_peer_rank": source.get("max_sub_score") or 0.0, + } + + +def _to_summary(source: dict[str, Any]) -> ResearcherSummary: + return ResearcherSummary(**_summary_kwargs(source)) + + +def _to_candidate( + source: dict[str, Any], min_publications: int, max_career_age: int +) -> FounderCandidate: + return FounderCandidate( + **_summary_kwargs(source), + founder_potential=_to_founder_potential(source), + founder_features=_to_founder_features(source), + screen=screen_verdict(source, min_publications, max_career_age), + ) + + +def _metric_value(source: dict[str, Any], name: str) -> MetricValue: + raw = source.get(name) + peer_rank = (source.get("percentiles") or {}).get(name) + return MetricValue( + raw=float(raw) if raw is not None else None, + peer_rank=float(peer_rank) if peer_rank is not None else None, + ) + + +def _to_detail(source: dict[str, Any]) -> ResearcherDetail: + return ResearcherDetail( + **_summary_kwargs(source), + institution_id=source.get("institution_id") or "", + metrics=ResearcherMetrics( + **{name: _metric_value(source, name) for name in METRIC_NAMES} + ), + founder_potential=_to_founder_potential(source), + founder_features=_to_founder_features(source), + computed_at=source.get("computed_at"), + config_hash=source.get("config_hash"), + ) + + +# --------------------------------------------------------------------------- +# Shared search plumbing +# --------------------------------------------------------------------------- + + +def _check_pagination(page: int, size: int) -> None: + if (page + 1) * size > MAX_RESULT_WINDOW: + raise BadRequestException( + f"Pagination window exceeds {MAX_RESULT_WINDOW} results " + f"(page {page} at size {size}); narrow the filters instead." + ) + + +def _build_sort(es_field: str, sort_order: SortDirection) -> list[dict[str, Any]]: + # missing: _last keeps null percentiles (out-of-population researchers) at + # the end; the author_id tiebreaker makes pagination deterministic. + return [ + {es_field: {"order": sort_order.value, "missing": "_last"}}, + {"author_id": {"order": "asc"}}, + ] + + +async def _search_summaries( + query: dict[str, Any], + sort: list[dict[str, Any]], + page: int, + size: int, +) -> tuple[list[dict[str, Any]], int]: + response = await elasticsearch.search( + ESIndex.MULTIPLICATORS_V1, + query=query, + source=SUMMARY_SOURCE_FIELDS, + size=size, + offset=page * size, + sort=sort, + ) + hits_block = response.get("hits", {}) + sources = [hit.get("_source", {}) for hit in hits_block.get("hits", [])] + total = hits_block.get("total", {}).get("value", len(sources)) + return sources, total + + +# --------------------------------------------------------------------------- +# Founder candidates +# --------------------------------------------------------------------------- + + +async def search_founder_candidates( + institution_id: str, + page: int = 0, + size: int = 25, + in_population: bool | None = True, + min_external_percentile: float | None = None, + max_external_percentile: float | None = None, + career_bucket: list[CareerBucket] | None = None, + screened: bool | None = None, + min_publications: int | None = None, + has_patents: bool | None = None, + research_area: list[str] | None = None, + tags: list[MultiplierTag] | None = None, + name: str | None = None, + screen_min_publications: int = 7, + screen_max_career_age: int = 40, + sort_by: FounderSortBy = FounderSortBy.EXTERNAL_PERCENTILE, + sort_order: SortDirection = SortDirection.DESCENDING, +) -> FounderCandidatePage: + _check_pagination(page, size) + + filters: list[dict[str, Any]] = [_institution_clause(institution_id)] + must: list[dict[str, Any]] = [] + + if in_population is not None: + filters.append({"term": {"founding.in_population": in_population}}) + + percentile_range: dict[str, float] = {} + if min_external_percentile is not None: + percentile_range["gte"] = min_external_percentile + if max_external_percentile is not None: + percentile_range["lte"] = max_external_percentile + if percentile_range: + filters.append({"range": {"founding.percentile": percentile_range}}) + + if career_bucket: + filters.append({"terms": {"career_bucket": [b.value for b in career_bucket]}}) + + if screened is True: + filters.extend(_screen_clauses(screen_min_publications, screen_max_career_age)) + elif screened is False: + filters.append( + { + "bool": { + "should": [ + {"bool": {"must_not": [clause]}} + for clause in _screen_clauses( + screen_min_publications, screen_max_career_age + ) + ], + "minimum_should_match": 1, + } + } + ) + + if min_publications is not None: + filters.append(_min_publications_clause(min_publications)) + + if has_patents is True: + filters.append({"range": {"founding_features.patents": {"gte": 1}}}) + elif has_patents is False: + filters.append( + { + "bool": { + "should": [ + {"term": {"founding_features.patents": 0}}, + { + "bool": { + "must_not": [ + {"exists": {"field": "founding_features.patents"}} + ] + } + }, + ], + "minimum_should_match": 1, + } + } + ) + + if research_area: + filters.append( + {"terms": {"founding_features.publication_research_area": research_area}} + ) + + if tags: + filters.append({"terms": {"tags": [t.value for t in tags]}}) + + if name: + must.append({"match_phrase_prefix": {"display_name": name}}) + + query: dict[str, Any] = {"bool": {"filter": filters}} + if must: + query["bool"]["must"] = must + + sort = _build_sort(_FOUNDER_SORT_ES_FIELD[sort_by], sort_order) + sources, total = await _search_summaries(query, sort, page, size) + return FounderCandidatePage( + elements=[ + _to_candidate(s, screen_min_publications, screen_max_career_age) + for s in sources + ], + page=page, + size=size, + total=total, + ) + + +# --------------------------------------------------------------------------- +# Multiplier researchers +# --------------------------------------------------------------------------- + + +async def search_researchers( + institution_id: str, + page: int = 0, + size: int = 25, + tags: list[MultiplierTag] | None = None, + career_bucket: list[CareerBucket] | None = None, + min_peer_rank: float | None = None, + peer_rank_field: PeerRankField = PeerRankField.MAX, + suspicious_profile: bool | None = None, + name: str | None = None, + sort_by: ResearcherSortBy = ResearcherSortBy.MAX, + sort_order: SortDirection = SortDirection.DESCENDING, +) -> ResearcherSummaryPage: + _check_pagination(page, size) + + filters: list[dict[str, Any]] = [_institution_clause(institution_id)] + must: list[dict[str, Any]] = [] + + if tags: + filters.append({"terms": {"tags": [t.value for t in tags]}}) + if career_bucket: + filters.append({"terms": {"career_bucket": [b.value for b in career_bucket]}}) + if min_peer_rank is not None: + filters.append( + {"range": {_PEER_RANK_ES_FIELD[peer_rank_field]: {"gte": min_peer_rank}}} + ) + if suspicious_profile is not None: + filters.append({"term": {"suspicious_profile": suspicious_profile}}) + if name: + must.append({"match_phrase_prefix": {"display_name": name}}) + + query: dict[str, Any] = {"bool": {"filter": filters}} + if must: + query["bool"]["must"] = must + + sort = _build_sort(_RESEARCHER_SORT_ES_FIELD[sort_by], sort_order) + sources, total = await _search_summaries(query, sort, page, size) + return ResearcherSummaryPage( + elements=[_to_summary(s) for s in sources], + page=page, + size=size, + total=total, + ) + + +# --------------------------------------------------------------------------- +# Single-researcher endpoints (direct _doc lookups) +# --------------------------------------------------------------------------- + + +async def _get_doc(index: ESIndex, institution_id: str, author_id: str) -> dict[str, Any]: + short_author = short_openalex_id(author_id) + doc_id = f"{institution_id}_{short_author}" + try: + response = await elasticsearch.get(index, doc_id) + except ElasticsearchNotFoundException: + raise NotFoundException( + f"No multiplicator data for author {short_author} at institution {institution_id}." + ) + source = response.get("_source") or {} + if not response.get("found") or not source: + raise NotFoundException( + f"No multiplicator data for author {short_author} at institution {institution_id}." + ) + # The composite id already scopes the lookup; this guards a future id-scheme change. + if source.get("institution_id") != institution_id: + raise NotFoundException( + f"No multiplicator data for author {short_author} at institution {institution_id}." + ) + return source + + +async def get_researcher_detail( + institution_id: str, author_id: str +) -> ResearcherDetail: + source = await _get_doc(ESIndex.MULTIPLICATORS_V1, institution_id, author_id) + return _to_detail(source) + + +async def get_researcher_network(institution_id: str, author_id: str) -> EgoNetwork: + source = await _get_doc(ESIndex.MULTIPLICATOR_NETWORKS_V1, institution_id, author_id) + ego = source.get("ego") or {} + return EgoNetwork( + author_id=source.get("author_id") or short_openalex_id(author_id), + display_name=source.get("display_name"), + career_bucket=_to_career_bucket(ego.get("career_bucket")), + active_years=ego.get("active_years") or 0, + n_works=ego.get("n_works") or 0, + suspicious_profile=bool(ego.get("suspicious_profile")), + tags=_to_tags(ego.get("tags")), + multiplier_peer_ranks=_to_peer_ranks(ego), + max_multiplier_peer_rank=ego.get("max_sub_score") or 0.0, + total_coauthors=source.get("total_coauthors") or 0, + cohort_coauthors=source.get("cohort_coauthors") or 0, + mentee_count=source.get("mentee_count") or 0, + shown=source.get("shown") or 0, + shown_mentees=source.get("shown_mentees") or 0, + nodes=[ + EgoNetworkNode( + id=n.get("id") or "", + name=n.get("name"), + role=n.get("role") or "external", + inst=n.get("inst"), + active_years=n.get("active_years") or 0, + suspicious=bool(n.get("suspicious")), + company_insts=n.get("company_insts") or None, + ) + for n in source.get("nodes") or [] + ], + edges=[ + EgoNetworkEdge( + a=e.get("a") or "", + b=e.get("b") or "", + w=e.get("w") or 0.0, + n_works=e.get("n_works") or 0, + cross=bool(e.get("cross")), + first_year=e.get("first_year"), + last_year=e.get("last_year"), + ) + for e in source.get("edges") or [] + ], + computed_at=source.get("computed_at"), + config_hash=source.get("config_hash"), + ) + + +# --------------------------------------------------------------------------- +# Showcase +# --------------------------------------------------------------------------- + + +async def get_showcase(institution_id: str) -> Showcase: + """Top bridger / mentor / amplifier plus the best untagged near-miss. + + Each search over-fetches (size 5) and the first not-yet-featured person is + taken, because one person can hold several tags. + """ + tag_kinds = [ShowcaseKind.BRIDGER, ShowcaseKind.MENTOR, ShowcaseKind.AMPLIFIER] + searches: list[tuple[ESIndex, dict[str, Any]]] = [ + ( + ESIndex.MULTIPLICATORS_V1, + { + "size": 5, + "_source": SUMMARY_SOURCE_FIELDS, + "query": { + "bool": { + "filter": [ + _institution_clause(institution_id), + {"term": {"tags": kind.value}}, + ] + } + }, + "sort": [{f"sub_scores.{kind.value}": {"order": "desc"}}], + }, + ) + for kind in tag_kinds + ] + searches.append( + ( + ESIndex.MULTIPLICATORS_V1, + { + "size": 5, + "_source": SUMMARY_SOURCE_FIELDS, + "query": { + "bool": { + "filter": [_institution_clause(institution_id)], + "must_not": [{"exists": {"field": "tags"}}], + } + }, + "sort": [{"max_sub_score": {"order": "desc"}}], + }, + ) + ) + + responses = await elasticsearch.msearch(searches) + + entries: list[ShowcaseEntry] = [] + seen: set[str] = set() + kinds = tag_kinds + [ShowcaseKind.EXAMPLE] + for kind, response in zip(kinds, responses): + for hit in response.get("hits", {}).get("hits", []): + source = hit.get("_source", {}) + author_id = source.get("author_id") + if not author_id or author_id in seen: + continue + seen.add(author_id) + entries.append(ShowcaseEntry(kind=kind, researcher=_to_summary(source))) + break + + if not entries: + raise NotFoundException( + f"No multiplicator data indexed for institution {institution_id}." + ) + return Showcase(institution_id=institution_id, entries=entries) + + +# --------------------------------------------------------------------------- +# Founder statistics (one aggregation-only search) +# --------------------------------------------------------------------------- + + +def _bucket_aggs( + percentile_threshold: float, min_publications: int, max_career_age: int +) -> dict[str, Any]: + """Distribution + shortlist aggs, spliced per career bucket AND at top level.""" + percentile_stats = { + "percentiles": { + "field": "founding.percentile", + "percents": [50, 90], + "tdigest": {"compression": 200}, + } + } + return { + "screened": { + "filter": { + "bool": {"filter": _screen_clauses(min_publications, max_career_age)} + } + }, + "in_population": { + "filter": _in_population_clause(), + "aggs": { + "percentile_stats": percentile_stats, + "above_75": {"filter": {"range": {"founding.percentile": {"gte": 75}}}}, + "above_90": {"filter": {"range": {"founding.percentile": {"gte": 90}}}}, + "robust": { + "filter": _min_publications_clause(min_publications), + "aggs": { + "percentile_stats": percentile_stats, + "above_75": { + "filter": {"range": {"founding.percentile": {"gte": 75}}} + }, + "above_90": { + "filter": {"range": {"founding.percentile": {"gte": 90}}} + }, + }, + }, + }, + }, + "shortlist_plain": {"filter": _shortlist_clause(percentile_threshold)}, + "shortlist_robust": { + "filter": { + "bool": { + "filter": [ + _shortlist_clause(percentile_threshold), + _min_publications_clause(min_publications), + ] + } + } + }, + } + + +def _founder_statistics_body( + institution_id: str, + percentile_threshold: float, + min_publications: int, + soft_peer_rank_threshold: float, + max_career_age: int, + tagged_band: float, +) -> dict[str, Any]: + # Built fresh per request: elasticsearch.search() mutates the body it receives. + shortlist = _shortlist_clause(percentile_threshold) + robust = { + "bool": {"filter": [shortlist, _min_publications_clause(min_publications)]} + } + + def _tag_overlap_aggs() -> dict[str, Any]: + return { + "tags": {"terms": {"field": "tags", "size": 10}}, + "no_tag": {"filter": {"bool": {"must_not": [{"exists": {"field": "tags"}}]}}}, + **{ + f"soft_{tag.value}": { + "filter": { + "range": { + f"sub_scores.{tag.value}": {"gte": soft_peer_rank_threshold} + } + } + } + for tag in MultiplierTag + }, + } + + aggs: dict[str, Any] = { + "funnel": { + "filter": _in_population_clause(), + "aggs": { + "not_suspicious": { + "filter": _not_suspicious_clause(), + "aggs": { + "career_age_ok": { + "filter": _career_age_ok_clause(max_career_age), + "aggs": { + "pubs_ok": { + "filter": _min_publications_clause(min_publications) + } + }, + } + }, + } + }, + }, + "by_bucket": { + "terms": {"field": "career_bucket", "size": 10}, + "aggs": _bucket_aggs(percentile_threshold, min_publications, max_career_age), + }, + "overall": { + "filter": {"match_all": {}}, + "aggs": _bucket_aggs(percentile_threshold, min_publications, max_career_age), + }, + "areas": { + "filter": _in_population_clause(), + "aggs": { + "shortlist_total": {"filter": shortlist}, + "robust_total": {"filter": robust}, + "by_area": { + "terms": { + "field": "founding_features.publication_research_area", + "size": 20, + "missing": UNKNOWN_RESEARCH_AREA, + }, + "aggs": { + "shortlist": {"filter": shortlist}, + "robust": {"filter": robust}, + }, + }, + }, + }, + "shortlist": { + "filter": shortlist, + "aggs": { + **_tag_overlap_aggs(), + "robust": { + "filter": _min_publications_clause(min_publications), + "aggs": _tag_overlap_aggs(), + }, + }, + }, + **{ + f"tagged_{tag.value}": { + "filter": { + "bool": { + "filter": [ + {"term": {"tags": tag.value}}, + _in_population_clause(), + ] + } + }, + "aggs": { + "percentile_stats": { + "percentiles": { + "field": "founding.percentile", + "percents": [50, 90], + "tdigest": {"compression": 200}, + } + }, + "above_band": { + "filter": {"range": {"founding.percentile": {"gte": tagged_band}}} + }, + }, + } + for tag in MultiplierTag + }, + "patent_sources": {"terms": {"field": "founding.patent_source", "size": 10}}, + "provenance": { + "top_hits": { + "size": 1, + "sort": [{"computed_at": {"order": "desc"}}], + "_source": ["computed_at", "config_hash", "founding.as_of_year"], + } + }, + } + + return { + "size": 0, + "_source": False, + "query": {"bool": {"filter": [_institution_clause(institution_id)]}}, + "aggs": aggs, + } + + +def _agg_percentile(agg: dict[str, Any], key: str) -> float | None: + value = (agg.get("percentile_stats") or {}).get("values", {}).get(key) + if value is None: + return None + return round(float(value), 1) + + +def _to_stage_statistics( + label: str, total: int, agg: dict[str, Any] +) -> CareerStageStatistics: + in_pop = agg.get("in_population") or {} + robust = in_pop.get("robust") or {} + return CareerStageStatistics( + career_bucket=label, + total=total, + in_population=in_pop.get("doc_count") or 0, + screened=(agg.get("screened") or {}).get("doc_count") or 0, + shortlist_plain=(agg.get("shortlist_plain") or {}).get("doc_count") or 0, + shortlist_robust=(agg.get("shortlist_robust") or {}).get("doc_count") or 0, + percentile_p50=_agg_percentile(in_pop, "50.0"), + percentile_p90=_agg_percentile(in_pop, "90.0"), + above_75=(in_pop.get("above_75") or {}).get("doc_count") or 0, + above_90=(in_pop.get("above_90") or {}).get("doc_count") or 0, + robust_percentile_p50=_agg_percentile(robust, "50.0"), + robust_percentile_p90=_agg_percentile(robust, "90.0"), + robust_above_75=(robust.get("above_75") or {}).get("doc_count") or 0, + robust_above_90=(robust.get("above_90") or {}).get("doc_count") or 0, + ) + + +async def get_founder_statistics( + institution_id: str, + percentile_threshold: float = 90.0, + min_publications: int = 7, + soft_peer_rank_threshold: float = 0.7, + max_career_age: int = 40, + tagged_band: float = 40.0, +) -> FounderStatistics: + # Rounded so a UI slider cannot mint a fresh cache key per drag frame. + percentile_threshold = round(percentile_threshold, 1) + soft_peer_rank_threshold = round(soft_peer_rank_threshold, 2) + tagged_band = round(tagged_band, 1) + + body = _founder_statistics_body( + institution_id, + percentile_threshold, + min_publications, + soft_peer_rank_threshold, + max_career_age, + tagged_band, + ) + response = await elasticsearch.search(ESIndex.MULTIPLICATORS_V1, body=body) + + total = response.get("hits", {}).get("total", {}).get("value", 0) + if total == 0: + raise NotFoundException( + f"No multiplicator data indexed for institution {institution_id}." + ) + aggs = response.get("aggregations", {}) + + # -- funnel -- + funnel_agg = aggs.get("funnel") or {} + not_suspicious = funnel_agg.get("not_suspicious") or {} + career_ok = not_suspicious.get("career_age_ok") or {} + pubs_ok = career_ok.get("pubs_ok") or {} + funnel_counts = [ + (FunnelStageKey.ALL, "All researchers in the index", total), + ( + FunnelStageKey.IN_POPULATION, + "Scoreable by the model (at least 4 publications)", + funnel_agg.get("doc_count") or 0, + ), + ( + FunnelStageKey.NOT_SUSPICIOUS, + "Not a merged/duplicate profile", + not_suspicious.get("doc_count") or 0, + ), + ( + FunnelStageKey.CAREER_AGE_PLAUSIBLE, + f"Career length plausible (at most {max_career_age} years)", + career_ok.get("doc_count") or 0, + ), + ( + FunnelStageKey.MIN_PUBLICATIONS, + f"Has at least {min_publications} publications", + pubs_ok.get("doc_count") or 0, + ), + ] + funnel = [ + FunnelStage( + key=key, + label=label, + count=count, + lost_from_previous=(funnel_counts[i - 1][2] - count) if i else 0, + share_of_total=round(count / total, 4), + ) + for i, (key, label, count) in enumerate(funnel_counts) + ] + + # -- career stages -- + overall_agg = aggs.get("overall") or {} + overall = _to_stage_statistics("ALL", total, overall_agg) + bucket_stats = { + b.get("key"): _to_stage_statistics(b.get("key"), b.get("doc_count") or 0, b) + for b in (aggs.get("by_bucket") or {}).get("buckets", []) + } + known_buckets = {bucket.value for bucket in CareerBucket} + career_stages = [ + bucket_stats[bucket.value] + for bucket in CareerBucket + if bucket.value in bucket_stats + ] + [stats for key, stats in bucket_stats.items() if key not in known_buckets] + + # -- research areas -- + areas_agg = aggs.get("areas") or {} + cohort_total = areas_agg.get("doc_count") or 0 + shortlist_total = (areas_agg.get("shortlist_total") or {}).get("doc_count") or 0 + robust_total = (areas_agg.get("robust_total") or {}).get("doc_count") or 0 + research_areas = [] + for bucket in (areas_agg.get("by_area") or {}).get("buckets", []): + code = str(bucket.get("key")) + cohort_count = bucket.get("doc_count") or 0 + shortlist_count = (bucket.get("shortlist") or {}).get("doc_count") or 0 + robust_count = (bucket.get("robust") or {}).get("doc_count") or 0 + cohort_share = cohort_count / cohort_total if cohort_total else 0.0 + shortlist_share = shortlist_count / shortlist_total if shortlist_total else 0.0 + robust_share = robust_count / robust_total if robust_total else 0.0 + research_areas.append( + ResearchAreaStatistics( + code=code, + label=FOR_DIVISION_NAMES.get(code), + cohort_count=cohort_count, + cohort_share=round(cohort_share, 4), + shortlist_count=shortlist_count, + shortlist_share=round(shortlist_share, 4), + robust_count=robust_count, + robust_share=round(robust_share, 4), + ratio=round(shortlist_share / cohort_share, 2) if cohort_share else None, + ) + ) + + # -- archetype overlap -- + shortlist_agg = aggs.get("shortlist") or {} + robust_overlap_agg = shortlist_agg.get("robust") or {} + + def _tag_count(agg: dict[str, Any], tag: MultiplierTag) -> int: + for bucket in (agg.get("tags") or {}).get("buckets", []): + if bucket.get("key") == tag.value: + return bucket.get("doc_count") or 0 + return 0 + + archetypes = [] + for tag in MultiplierTag: + tagged_agg = aggs.get(f"tagged_{tag.value}") or {} + archetypes.append( + ArchetypeOverlap( + tag=tag, + shortlist_count=_tag_count(shortlist_agg, tag), + robust_count=_tag_count(robust_overlap_agg, tag), + soft_shortlist_count=(shortlist_agg.get(f"soft_{tag.value}") or {}).get( + "doc_count" + ) + or 0, + soft_robust_count=(robust_overlap_agg.get(f"soft_{tag.value}") or {}).get( + "doc_count" + ) + or 0, + tagged_in_population=tagged_agg.get("doc_count") or 0, + tagged_percentile_p50=_agg_percentile(tagged_agg, "50.0"), + tagged_percentile_p90=_agg_percentile(tagged_agg, "90.0"), + tagged_above_band=(tagged_agg.get("above_band") or {}).get("doc_count") + or 0, + ) + ) + + # -- provenance -- + provenance_hits = ( + (aggs.get("provenance") or {}).get("hits", {}).get("hits", []) + ) + provenance_source = provenance_hits[0].get("_source", {}) if provenance_hits else {} + patent_sources = sorted( + b.get("key") + for b in (aggs.get("patent_sources") or {}).get("buckets", []) + if b.get("key") + ) + + return FounderStatistics( + provenance=FounderStatisticsProvenance( + institution_id=institution_id, + document_count=total, + computed_at=provenance_source.get("computed_at"), + config_hash=provenance_source.get("config_hash"), + as_of_year=(provenance_source.get("founding") or {}).get("as_of_year"), + patent_sources=patent_sources, + ), + parameters=FounderStatisticsParameters( + percentile_threshold=percentile_threshold, + min_publications=min_publications, + soft_peer_rank_threshold=soft_peer_rank_threshold, + max_career_age=max_career_age, + tagged_band=tagged_band, + ), + funnel=funnel, + overall=overall, + career_stages=career_stages, + research_areas=research_areas, + archetypes=archetypes, + untagged_shortlist_count=(shortlist_agg.get("no_tag") or {}).get("doc_count") + or 0, + untagged_robust_count=(robust_overlap_agg.get("no_tag") or {}).get("doc_count") + or 0, + ) + + +# --------------------------------------------------------------------------- +# Model info (bundled static file) +# --------------------------------------------------------------------------- + + +@lru_cache(maxsize=1) +def get_founder_model_info() -> FounderModelInfo: + with open(MODEL_INFO_PATH, encoding="utf-8") as f: + return FounderModelInfo.model_validate(json.load(f)) diff --git a/service/src/main/inse/multiplicators/test_service.py b/service/src/main/inse/multiplicators/test_service.py new file mode 100644 index 00000000..42de512c --- /dev/null +++ b/service/src/main/inse/multiplicators/test_service.py @@ -0,0 +1,810 @@ +from unittest.mock import AsyncMock, patch + +import pytest + +from inse.exceptions import BadRequestException, NotFoundException +from inse.integrations.elasticsearch import _index_to_cluster +from inse.model import ESCluster, ESIndex, SortDirection + +from . import service +from .model import ( + CareerBucket, + FounderScreenReason, + FounderSortBy, + MultiplierTag, + PeerRankField, + ResearcherSortBy, + ShowcaseKind, +) + + +@pytest.fixture +def anyio_backend(): + return "asyncio" + + +INSTITUTION = "I62318514" + + +def _empty_search_response(total: int = 0) -> dict: + return {"hits": {"hits": [], "total": {"value": total}}} + + +def _search_response(sources: list[dict], total: int | None = None) -> dict: + return { + "hits": { + "hits": [{"_source": s} for s in sources], + "total": {"value": total if total is not None else len(sources)}, + } + } + + +# --------------------------------------------------------------------------- +# Infrastructure +# --------------------------------------------------------------------------- + + +def test_index_enums_route_to_the_inse_cluster(): + # Without this, every query silently targets the NES cluster and surfaces + # as a 404 that looks like "no data for this institution". + assert _index_to_cluster(ESIndex.MULTIPLICATORS_V1) == ESCluster.INSE + assert _index_to_cluster(ESIndex.MULTIPLICATOR_NETWORKS_V1) == ESCluster.INSE + + +def test_short_id_normalizes_full_openalex_url(): + assert service.short_openalex_id("https://openalex.org/I62318514") == "I62318514" + assert service.short_openalex_id("https://openalex.org/I62318514/") == "I62318514" + assert service.short_openalex_id("I62318514") == "I62318514" + assert service.short_openalex_id(" A5087456839 ") == "A5087456839" + + +# --------------------------------------------------------------------------- +# Screen: the ES filter and the Python verdict must agree +# --------------------------------------------------------------------------- + + +def _doc( + suspicious: bool = False, + career_age: int | None = 10, + publications: int = 20, + in_population: bool = True, +) -> dict: + founding: dict = {"in_population": in_population} + if career_age is not None: + founding["current_career_age"] = career_age + return { + "suspicious_profile": suspicious, + "founding": founding, + "founding_features": {"publications": publications}, + } + + +def _matches_screen_clauses(doc: dict, min_publications: int, max_career_age: int) -> bool: + """Evaluates the generated ES clauses in Python, clause semantics included + (a range never matches a missing field).""" + founding = doc.get("founding") or {} + passes_not_suspicious = not doc.get("suspicious_profile") + career_age = founding.get("current_career_age") + passes_career = career_age is not None and career_age <= max_career_age + passes_pubs = (doc.get("founding_features") or {}).get( + "publications", 0 + ) >= min_publications + return passes_not_suspicious and passes_career and passes_pubs + + +@pytest.mark.parametrize( + "doc", + [ + _doc(), # clean + _doc(suspicious=True), + _doc(career_age=41), + _doc(career_age=None), + _doc(publications=3), + _doc(suspicious=True, publications=3), + _doc(suspicious=True, career_age=50, publications=1), + _doc(in_population=False), + ], +) +def test_screen_filter_and_verdict_agree(doc): + verdict = service.screen_verdict(doc, min_publications=7, max_career_age=40) + es_passes = _matches_screen_clauses(doc, min_publications=7, max_career_age=40) + # OUT_OF_POPULATION is a verdict-only annotation and not part of the ES + # screen clauses (population filtering is its own query parameter). + screen_reasons = [ + r for r in verdict.reasons if r != FounderScreenReason.OUT_OF_POPULATION + ] + assert (not screen_reasons) == es_passes + + +def test_screen_reason_precedence_matches_report(): + # "merged profile" outranks "only N papers", as in the reference dashboard. + verdict = service.screen_verdict( + _doc(suspicious=True, publications=3), min_publications=7, max_career_age=40 + ) + assert verdict.reasons[0] == FounderScreenReason.MERGED_PROFILE + assert FounderScreenReason.THIN_PROFILE in verdict.reasons + + verdict = service.screen_verdict( + _doc(career_age=55, publications=3), min_publications=7, max_career_age=40 + ) + assert verdict.reasons[0] == FounderScreenReason.IMPLAUSIBLE_CAREER_LENGTH + + +def test_screen_unknown_career_length_is_distinct(): + verdict = service.screen_verdict(_doc(career_age=None), min_publications=7, max_career_age=40) + assert verdict.reasons == [FounderScreenReason.UNKNOWN_CAREER_LENGTH] + + +# --------------------------------------------------------------------------- +# /founders +# --------------------------------------------------------------------------- + + +@pytest.mark.anyio +async def test_founders_builds_expected_filter_clauses(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_empty_search_response()), + ) as search: + await service.search_founder_candidates( + INSTITUTION, + min_external_percentile=90, + career_bucket=[CareerBucket.EMERGING], + screened=True, + has_patents=True, + research_area=["32"], + tags=[MultiplierTag.MENTOR], + name="Pak", + ) + + query = search.await_args.kwargs["query"] + filters = query["bool"]["filter"] + assert {"term": {"institution_id": INSTITUTION}} in filters + assert {"term": {"founding.in_population": True}} in filters + assert {"range": {"founding.percentile": {"gte": 90}}} in filters + assert {"terms": {"career_bucket": ["Emerging"]}} in filters + assert {"range": {"founding_features.patents": {"gte": 1}}} in filters + assert {"terms": {"founding_features.publication_research_area": ["32"]}} in filters + assert {"terms": {"tags": ["mentor"]}} in filters + # the three screen clauses + assert {"bool": {"must_not": [{"term": {"suspicious_profile": True}}]}} in filters + assert {"range": {"founding.current_career_age": {"lte": 40}}} in filters + assert {"range": {"founding_features.publications": {"gte": 7}}} in filters + assert query["bool"]["must"] == [{"match_phrase_prefix": {"display_name": "Pak"}}] + + +@pytest.mark.anyio +async def test_founders_screened_false_returns_the_rejects_clause(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_empty_search_response()), + ) as search: + await service.search_founder_candidates(INSTITUTION, screened=False) + + filters = search.await_args.kwargs["query"]["bool"]["filter"] + rejects = [f for f in filters if "should" in f.get("bool", {})] + assert len(rejects) == 1 + should = rejects[0]["bool"]["should"] + assert rejects[0]["bool"]["minimum_should_match"] == 1 + # each option negates one screen clause + assert len(should) == 3 + assert all("must_not" in option["bool"] for option in should) + + +@pytest.mark.anyio +async def test_founders_sort_uses_missing_last_and_author_id_tiebreaker(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_empty_search_response()), + ) as search: + await service.search_founder_candidates( + INSTITUTION, sort_by=FounderSortBy.WITHIN_3Y, sort_order=SortDirection.ASCENDING + ) + + assert search.await_args.kwargs["sort"] == [ + {"founding.p_within_3y_percentile": {"order": "asc", "missing": "_last"}}, + {"author_id": {"order": "asc"}}, + ] + + +@pytest.mark.anyio +async def test_founders_out_of_population_percentile_stays_null(): + source = { + "author_id": "A1", + "display_name": "Test Person", + "career_bucket": "Early", + "founding": {"in_population": False}, + "founding_features": {"publications": 2}, + } + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_search_response([source])), + ): + page = await service.search_founder_candidates(INSTITUTION, in_population=None) + + candidate = page.elements[0] + assert candidate.founder_potential.external_percentile is None # null, not 0.0 + assert candidate.founder_potential.in_reference_population is False + assert FounderScreenReason.OUT_OF_POPULATION in candidate.screen.reasons + + +@pytest.mark.anyio +async def test_pagination_beyond_max_result_window_raises_bad_request(): + with pytest.raises(BadRequestException): + await service.search_founder_candidates(INSTITUTION, page=101, size=100) + + +# --------------------------------------------------------------------------- +# /researchers +# --------------------------------------------------------------------------- + + +@pytest.mark.anyio +async def test_researchers_min_peer_rank_targets_selected_field(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_empty_search_response()), + ) as search: + await service.search_researchers( + INSTITUTION, + min_peer_rank=0.7, + peer_rank_field=PeerRankField.BRIDGER, + sort_by=ResearcherSortBy.MENTOR, + ) + + filters = search.await_args.kwargs["query"]["bool"]["filter"] + assert {"range": {"sub_scores.bridger": {"gte": 0.7}}} in filters + assert search.await_args.kwargs["sort"][0] == { + "sub_scores.mentor": {"order": "desc", "missing": "_last"} + } + + +@pytest.mark.anyio +async def test_researchers_default_peer_rank_field_is_max(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_empty_search_response()), + ) as search: + await service.search_researchers(INSTITUTION, min_peer_rank=0.5) + + filters = search.await_args.kwargs["query"]["bool"]["filter"] + assert {"range": {"max_sub_score": {"gte": 0.5}}} in filters + + +# --------------------------------------------------------------------------- +# Detail + network (_doc lookups) +# --------------------------------------------------------------------------- + + +def _detail_source() -> dict: + return { + "institution_id": INSTITUTION, + "author_id": "A5113304257", + "display_name": "Test Person", + "career_bucket": "Senior", + "active_years": 20, + "n_works": 150, + "suspicious_profile": False, + "tags": ["mentor"], + "sub_scores": {"bridger": 0.5, "mentor": 0.9, "amplifier": 0.3}, + "max_sub_score": 0.9, + "betweenness": 0.012, + "juniors_mentored": 14, + "percentiles": {"betweenness": 0.88, "juniors_mentored": 0.95}, + "founding": { + "percentile": 55.2, + "in_population": True, + "timing_applicable": False, + "predicted_founding_age": 8.5, + "years_to_founding": -3.1, + "current_career_age": 25, + # retired v1 fields still present in old documents: + "probability": 0.996, + "applicable": True, + "p_within_2y": 1.0, + "models_agree": True, + }, + "founding_features": { + "publications": 150, + "patents": 2, + "publication_research_area": "32", + "h_index": 40, # retired v1 field + }, + "computed_at": "2026-08-07T00:00:00Z", + "config_hash": "abc123", + } + + +@pytest.mark.anyio +async def test_researcher_detail_uses_doc_get_with_composite_id(): + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": True, "_source": _detail_source()}), + ) as get: + detail = await service.get_researcher_detail( + INSTITUTION, "https://openalex.org/A5113304257" + ) + + assert get.await_args.args[:2] == ( + ESIndex.MULTIPLICATORS_V1, + f"{INSTITUTION}_A5113304257", + ) + assert detail.author_id == "A5113304257" + assert detail.career_bucket == CareerBucket.SENIOR + + +@pytest.mark.anyio +async def test_researcher_detail_omits_retired_v1_fields(): + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": True, "_source": _detail_source()}), + ): + detail = await service.get_researcher_detail(INSTITUTION, "A5113304257") + + dumped = detail.model_dump() + as_text = str(dumped) + assert "probability" not in as_text + assert "p_within_2y" not in as_text + assert "models_agree" not in as_text + assert "h_index" not in as_text + + +@pytest.mark.anyio +async def test_researcher_detail_timing_block_is_null_when_not_applicable(): + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": True, "_source": _detail_source()}), + ): + detail = await service.get_researcher_detail(INSTITUTION, "A5113304257") + + assert detail.founder_potential.timing_applicable is False + assert detail.founder_potential.timing is None + assert detail.founder_potential.current_career_age == 25 # still visible + + +@pytest.mark.anyio +async def test_researcher_detail_pairs_raw_metrics_with_peer_ranks(): + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": True, "_source": _detail_source()}), + ): + detail = await service.get_researcher_detail(INSTITUTION, "A5113304257") + + assert detail.metrics.betweenness.raw == 0.012 + assert detail.metrics.betweenness.peer_rank == 0.88 + assert detail.metrics.juniors_mentored.raw == 14 + assert detail.metrics.juniors_mentored.peer_rank == 0.95 + # a metric absent from the doc stays fully null + assert detail.metrics.patent_count.raw is None + assert detail.metrics.patent_count.peer_rank is None + + +@pytest.mark.anyio +async def test_researcher_detail_rejects_document_from_another_institution(): + source = {**_detail_source(), "institution_id": "I999"} + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": True, "_source": source}), + ): + with pytest.raises(NotFoundException): + await service.get_researcher_detail(INSTITUTION, "A5113304257") + + +def _network_source() -> dict: + return { + "institution_id": INSTITUTION, + "author_id": "A5113304257", + "display_name": "Test Person", + "ego": { + "career_bucket": "Senior", + "active_years": 20, + "n_works": 150, + "suspicious_profile": False, + "tags": ["mentor"], + "sub_scores": {"bridger": 0.5, "mentor": 0.9, "amplifier": 0.3}, + "max_sub_score": 0.9, + }, + "total_coauthors": 300, + "cohort_coauthors": 120, + "mentee_count": 14, + "shown": 42, + "shown_mentees": 14, + "nodes": [ + {"id": "A5113304257", "name": "Test Person", "role": "ego", + "inst": "UDE", "active_years": 20, "suspicious": False}, + {"id": "A2", "name": "Mentee", "role": "mentee", + "inst": "UDE", "active_years": 3, "suspicious": True}, + {"id": "A3", "name": "Industry Partner", "role": "industry", + "inst": "Some University", "active_years": 8, "suspicious": False, + "company_insts": ["Acme Corp"]}, + ], + "edges": [ + {"a": "A2", "b": "A5113304257", "w": 1.5, "n_works": 7, + "cross": False, "first_year": 2019, "last_year": 2025}, + ], + "computed_at": "2026-08-07T00:00:00Z", + "config_hash": "abc123", + } + + +@pytest.mark.anyio +async def test_researcher_network_returns_nodes_and_edges_verbatim(): + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": True, "_source": _network_source()}), + ) as get: + network = await service.get_researcher_network(INSTITUTION, "A5113304257") + + assert get.await_args.args[:2] == ( + ESIndex.MULTIPLICATOR_NETWORKS_V1, + f"{INSTITUTION}_A5113304257", + ) + assert network.nodes[0].role == "ego" + assert network.nodes[1].suspicious is True # kept, unlike the report script + assert network.nodes[1].company_insts is None + assert network.nodes[2].company_insts == ["Acme Corp"] # passed through verbatim + assert network.edges[0].last_year == 2025 # kept, unlike the report script + # no layout coordinates anywhere - the client lays out + dumped = str(network.model_dump()) + assert "'x'" not in dumped and "'y'" not in dumped + + +@pytest.mark.anyio +async def test_researcher_network_missing_document_raises_not_found(): + from inse.exceptions import ElasticsearchNotFoundException + + with patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(side_effect=ElasticsearchNotFoundException("missing")), + ): + with pytest.raises(NotFoundException): + await service.get_researcher_network(INSTITUTION, "A404") + + +# --------------------------------------------------------------------------- +# Showcase +# --------------------------------------------------------------------------- + + +def _summary_source(author_id: str, tags: list[str] | None = None) -> dict: + return { + "author_id": author_id, + "display_name": author_id, + "career_bucket": "Senior", + "tags": tags or [], + "sub_scores": {"bridger": 0.9, "mentor": 0.8, "amplifier": 0.4}, + "max_sub_score": 0.9, + } + + +@pytest.mark.anyio +async def test_showcase_issues_one_msearch_with_four_bodies(): + responses = [ + _search_response([_summary_source("A1", ["bridger"])]), + _search_response([_summary_source("A2", ["mentor"])]), + _search_response([_summary_source("A3", ["amplifier"])]), + _search_response([_summary_source("A4")]), + ] + with patch( + "inse.multiplicators.service.elasticsearch.msearch", + new=AsyncMock(return_value=responses), + ) as msearch: + showcase = await service.get_showcase(INSTITUTION) + + searches = msearch.await_args.args[0] + assert len(searches) == 4 + assert all(index == ESIndex.MULTIPLICATORS_V1 for index, _ in searches) + assert all(body["size"] == 5 for _, body in searches) + # the near-miss search excludes tagged people and sorts by max_sub_score + _, example_body = searches[3] + assert example_body["query"]["bool"]["must_not"] == [{"exists": {"field": "tags"}}] + assert example_body["sort"] == [{"max_sub_score": {"order": "desc"}}] + assert [e.kind for e in showcase.entries] == [ + ShowcaseKind.BRIDGER, + ShowcaseKind.MENTOR, + ShowcaseKind.AMPLIFIER, + ShowcaseKind.EXAMPLE, + ] + + +@pytest.mark.anyio +async def test_showcase_deduplicates_people_holding_several_tags(): + both_tags = _summary_source("A1", ["bridger", "mentor"]) + responses = [ + _search_response([both_tags]), + _search_response([both_tags, _summary_source("A2", ["mentor"])]), + _search_response([_summary_source("A3", ["amplifier"])]), + _search_response([_summary_source("A4")]), + ] + with patch( + "inse.multiplicators.service.elasticsearch.msearch", + new=AsyncMock(return_value=responses), + ): + showcase = await service.get_showcase(INSTITUTION) + + ids = [e.researcher.author_id for e in showcase.entries] + assert ids == ["A1", "A2", "A3", "A4"] # mentor slot takes the second hit + + +@pytest.mark.anyio +async def test_showcase_tolerates_missing_categories(): + responses = [ + _search_response([_summary_source("A1", ["bridger"])]), + _empty_search_response(), + _empty_search_response(), + _search_response([_summary_source("A4")]), + ] + with patch( + "inse.multiplicators.service.elasticsearch.msearch", + new=AsyncMock(return_value=responses), + ): + showcase = await service.get_showcase(INSTITUTION) + + assert [e.kind for e in showcase.entries] == [ + ShowcaseKind.BRIDGER, + ShowcaseKind.EXAMPLE, + ] + + +@pytest.mark.anyio +async def test_showcase_with_no_documents_raises_not_found(): + with patch( + "inse.multiplicators.service.elasticsearch.msearch", + new=AsyncMock(return_value=[_empty_search_response()] * 4), + ): + with pytest.raises(NotFoundException): + await service.get_showcase(INSTITUTION) + + +# --------------------------------------------------------------------------- +# Founder statistics +# --------------------------------------------------------------------------- + + +def _stats_response() -> dict: + percentile_stats = {"values": {"50.0": 33.1, "90.0": 82.4}} + bucket_block = { + "screened": {"doc_count": 400}, + "in_population": { + "doc_count": 1000, + "percentile_stats": percentile_stats, + "above_75": {"doc_count": 120}, + "above_90": {"doc_count": 60}, + "robust": { + "doc_count": 700, + "percentile_stats": percentile_stats, + "above_75": {"doc_count": 80}, + "above_90": {"doc_count": 30}, + }, + }, + "shortlist_plain": {"doc_count": 60}, + "shortlist_robust": {"doc_count": 20}, + } + tag_overlap = { + "tags": {"buckets": [{"key": "bridger", "doc_count": 4}]}, + "no_tag": {"doc_count": 50}, + "soft_bridger": {"doc_count": 10}, + "soft_mentor": {"doc_count": 8}, + "soft_amplifier": {"doc_count": 6}, + } + tagged_block = { + "doc_count": 150, + "percentile_stats": {"values": {"50.0": 10.0, "90.0": 47.0}}, + "above_band": {"doc_count": 30}, + } + return { + "hits": {"hits": [], "total": {"value": 9474}}, + "aggregations": { + "funnel": { + "doc_count": 5712, + "not_suspicious": { + "doc_count": 5317, + "career_age_ok": { + "doc_count": 4858, + "pubs_ok": {"doc_count": 3742}, + }, + }, + }, + "by_bucket": { + "buckets": [ + {"key": "Early", "doc_count": 5361, **bucket_block}, + {"key": "Senior", "doc_count": 1745, **bucket_block}, + ] + }, + "overall": {"doc_count": 9474, **bucket_block}, + "areas": { + "doc_count": 5712, + "shortlist_total": {"doc_count": 270}, + "robust_total": {"doc_count": 100}, + "by_area": { + "buckets": [ + { + "key": "32", + "doc_count": 2856, + "shortlist": {"doc_count": 100}, + "robust": {"doc_count": 40}, + }, + { + "key": "43", # unknown FOR code + "doc_count": 10, + "shortlist": {"doc_count": 0}, + "robust": {"doc_count": 0}, + }, + ] + }, + }, + "shortlist": { + "doc_count": 270, + **tag_overlap, + "robust": {"doc_count": 100, **tag_overlap}, + }, + "tagged_bridger": tagged_block, + "tagged_mentor": tagged_block, + "tagged_amplifier": tagged_block, + "patent_sources": { + "buckets": [{"key": "api+org_patents", "doc_count": 9474}] + }, + "provenance": { + "hits": { + "hits": [ + { + "_source": { + "computed_at": "2026-08-07T12:00:00Z", + "config_hash": "abc123def456", + "founding": {"as_of_year": 2026}, + } + } + ] + } + }, + }, + } + + +@pytest.mark.anyio +async def test_founder_statistics_issues_a_single_search_with_size_zero(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_stats_response()), + ) as search: + await service.get_founder_statistics(INSTITUTION) + + assert search.await_count == 1 + body = search.await_args.kwargs["body"] + assert body["size"] == 0 + assert body["query"] == { + "bool": {"filter": [{"term": {"institution_id": INSTITUTION}}]} + } + + +@pytest.mark.anyio +async def test_founder_statistics_funnel_is_cumulative_and_nested(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_stats_response()), + ) as search: + stats = await service.get_founder_statistics(INSTITUTION) + + funnel_agg = search.await_args.kwargs["body"]["aggs"]["funnel"] + assert funnel_agg["filter"] == {"term": {"founding.in_population": True}} + nested = funnel_agg["aggs"]["not_suspicious"] + assert nested["filter"] == { + "bool": {"must_not": [{"term": {"suspicious_profile": True}}]} + } + deeper = nested["aggs"]["career_age_ok"] + assert deeper["filter"] == {"range": {"founding.current_career_age": {"lte": 40}}} + assert deeper["aggs"]["pubs_ok"]["filter"] == { + "range": {"founding_features.publications": {"gte": 7}} + } + + counts = [stage.count for stage in stats.funnel] + assert counts == [9474, 5712, 5317, 4858, 3742] + assert [stage.lost_from_previous for stage in stats.funnel] == [ + 0, 3762, 395, 459, 1116, + ] + + +@pytest.mark.anyio +async def test_founder_statistics_threshold_params_reach_the_dsl(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_stats_response()), + ) as search: + await service.get_founder_statistics( + INSTITUTION, + percentile_threshold=75, + min_publications=3, + soft_peer_rank_threshold=0.5, + ) + + aggs = search.await_args.kwargs["body"]["aggs"] + assert aggs["by_bucket"]["aggs"]["shortlist_plain"]["filter"] == { + "range": {"founding.percentile": {"gte": 75}} + } + assert aggs["shortlist"]["aggs"]["soft_mentor"]["filter"] == { + "range": {"sub_scores.mentor": {"gte": 0.5}} + } + assert aggs["funnel"]["aggs"]["not_suspicious"]["aggs"]["career_age_ok"]["aggs"][ + "pubs_ok" + ]["filter"] == {"range": {"founding_features.publications": {"gte": 3}}} + + +@pytest.mark.anyio +async def test_founder_statistics_maps_for_codes_to_labels_and_shares(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_stats_response()), + ): + stats = await service.get_founder_statistics(INSTITUTION) + + by_code = {area.code: area for area in stats.research_areas} + assert by_code["32"].label == "Biomedical & Clinical Sciences" + assert by_code["43"].label is None # unknown code stays visible, not renamed + area = by_code["32"] + assert area.cohort_share == 0.5 # 2856 / 5712 + assert area.shortlist_share == round(100 / 270, 4) + assert area.ratio == round((100 / 270) / 0.5, 2) + assert by_code["43"].ratio is None or by_code["43"].ratio == 0.0 + + +@pytest.mark.anyio +async def test_founder_statistics_ratio_is_none_when_cohort_share_is_zero(): + response = _stats_response() + response["aggregations"]["areas"]["by_area"]["buckets"].append( + {"key": "51", "doc_count": 0, "shortlist": {"doc_count": 0}, "robust": {"doc_count": 0}} + ) + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=response), + ): + stats = await service.get_founder_statistics(INSTITUTION) + + by_code = {area.code: area for area in stats.research_areas} + assert by_code["51"].ratio is None + + +@pytest.mark.anyio +async def test_founder_statistics_raises_not_found_when_no_documents(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value={"hits": {"hits": [], "total": {"value": 0}}}), + ): + with pytest.raises(NotFoundException): + await service.get_founder_statistics(INSTITUTION) + + +@pytest.mark.anyio +async def test_founder_statistics_provenance_and_overlap(): + with patch( + "inse.multiplicators.service.elasticsearch.search", + new=AsyncMock(return_value=_stats_response()), + ): + stats = await service.get_founder_statistics(INSTITUTION) + + assert stats.provenance.document_count == 9474 + assert stats.provenance.config_hash == "abc123def456" + assert stats.provenance.as_of_year == 2026 + assert stats.provenance.patent_sources == ["api+org_patents"] + assert stats.overall.career_bucket == "ALL" + assert stats.untagged_shortlist_count == 50 + + bridger = next(a for a in stats.archetypes if a.tag == MultiplierTag.BRIDGER) + assert bridger.shortlist_count == 4 + assert bridger.soft_shortlist_count == 10 + assert bridger.tagged_in_population == 150 + assert bridger.tagged_above_band == 30 + + +# --------------------------------------------------------------------------- +# Model info +# --------------------------------------------------------------------------- + + +def test_founder_model_info_loads_bundled_file(): + info = service.get_founder_model_info() + assert info.model == "lightgbm_symmetric_founder_classifier_v2" + assert info.oof_roc_auc == 0.8659 + assert len(info.importances) == 12 + assert info.importances[0].feature == "patent_research_area_n." + assert any("constant" in caveat for caveat in info.caveats) + assert {h.horizon_years for h in info.horizon_models} == {1, 3, 5} diff --git a/service/src/main/inse/persons/service.py b/service/src/main/inse/persons/service.py index d95ca046..bf24fc1f 100644 --- a/service/src/main/inse/persons/service.py +++ b/service/src/main/inse/persons/service.py @@ -68,7 +68,7 @@ async def get_person_by_id( "Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, " "last_known_institutions, ..." ), - examples="topics_full,topic_share", + examples=["topics_full,topic_share"], ), ] = None, ): @@ -91,11 +91,11 @@ async def search_persons_by_name( "Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, " "last_known_institutions, ..." ), - examples="topics_full,topic_share", + examples=["topics_full,topic_share"], ), ], - limit:Annotated[int | None, Query(description=("Limit of search page results"),examples ="2")]= None, - page_offset : Annotated[int | None, Query(description=("Offset of the result page"),examples="2")] = None, + limit:Annotated[int | None, Query(description=("Limit of search page results"),examples=["2"])]= None, + page_offset : Annotated[int | None, Query(description=("Offset of the result page"),examples=["2"])] = None, ): return await logic.search_persons_by_name(author_name=author_name, include=include, page_offset=page_offset, limit=limit) @@ -113,7 +113,7 @@ async def search_persons_autocomplete( "Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, " "last_known_institutions, ..." ), - examples="topics_full,topic_share" + examples=["topics_full,topic_share"] )]): return await logic.search_persons_autocomplete(author_name=author_name, include=include) @@ -153,7 +153,7 @@ async def search_persons_list( str | None, Query( description="Comma-separated include tags", - examples="topics_full,topic_share", + examples=["topics_full,topic_share"], ), ] = None, year_filter_enabled: Annotated[ diff --git a/service/src/main/inse/router_prefixes.py b/service/src/main/inse/router_prefixes.py index 24d682b0..6422e47d 100644 --- a/service/src/main/inse/router_prefixes.py +++ b/service/src/main/inse/router_prefixes.py @@ -8,3 +8,4 @@ class RouterPrefixes(StrEnum): TOPICS_V2 = "/api/topics/v2" AUTHORS_V2 = "/api/authors/v2" WORKS_V2 = "/api/works/v2" + MULTIPLICATORS = "/api/multiplicators" diff --git a/service/src/main/inse/tags.py b/service/src/main/inse/tags.py index c3bf0f89..b4f606c5 100644 --- a/service/src/main/inse/tags.py +++ b/service/src/main/inse/tags.py @@ -26,3 +26,5 @@ class Tags(StrEnum): BACKGROUND_JOBS = "Background Jobs" BUND_INSTITUTIONS = "BUND Institutions" + + MULTIPLICATORS = "Multiplicators" diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index 3f8e63e4..86dc56c5 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -17,6 +17,7 @@ api/funding.service.ts api/institutions.service.ts api/institutionsV2.service.ts api/keywords.service.ts +api/multiplicators.service.ts api/news.service.ts api/organization.service.ts api/patents.service.ts @@ -37,6 +38,7 @@ model/accessToken.ts model/accountPage.ts model/accountProfile.ts model/allPatentsResponse.ts +model/archetypeOverlap.ts model/author.ts model/authorAffiliationsInner.ts model/authorCountsByYearInner.ts @@ -77,8 +79,10 @@ model/bundProjectHighlight.ts model/bundProjectPage.ts model/bundProjectSummary.ts model/bundProjectTopics.ts +model/careerBucket.ts model/careerMetrics.ts model/careerStage.ts +model/careerStageStatistics.ts model/collaborationGraph.ts model/collaborationGraphStatus.ts model/collaborationGraphStatusResponse.ts @@ -93,6 +97,7 @@ model/createPersonBookmark.ts model/customAuthor.ts model/customAuthorsListResponse.ts model/dFGProjectFachgebieteInner.ts +model/dashboardInstitution.ts model/dashboardStatisticValue.ts model/dashboardStatistics.ts model/dehydratedAuthor.ts @@ -121,6 +126,9 @@ model/domain.ts model/domainFieldsInner.ts model/domainIds.ts model/edge.ts +model/egoNetwork.ts +model/egoNetworkEdge.ts +model/egoNetworkNode.ts model/euCordisEurosciVocSummary.ts model/euCordisOrganizationSelectorPage.ts model/euCordisOrganizationSelectorSummary.ts @@ -139,6 +147,20 @@ model/extractedKeywordsLLM.ts model/extractedKeywordsResponse.ts model/fieldNode.ts model/fileUpload.ts +model/founderCandidate.ts +model/founderCandidatePage.ts +model/founderFeatureImportance.ts +model/founderFeatures.ts +model/founderHorizonModel.ts +model/founderModelInfo.ts +model/founderPotential.ts +model/founderScreen.ts +model/founderScreenReason.ts +model/founderSortBy.ts +model/founderStatistics.ts +model/founderStatisticsParameters.ts +model/founderStatisticsProvenance.ts +model/founderTiming.ts model/fp7EurosciVoc.ts model/fp7LegalBasis.ts model/fp7Organization.ts @@ -152,6 +174,8 @@ model/funderByAuthor.ts model/fundersByAuthorResponse.ts model/fundingProject.ts model/fundingProjectPage.ts +model/funnelStage.ts +model/funnelStageKey.ts model/fwci.ts model/groupByResult.ts model/h2020Deliverable.ts @@ -198,6 +222,7 @@ model/keywordEntry.ts model/keywordEntryWithTopic.ts model/keywordEvidence.ts model/keywordOperator.ts +model/keywordPatentHighlight.ts model/keywordPatentLevel.ts model/keywordPatentMappingStatus.ts model/keywordPatentMatch.ts @@ -217,9 +242,12 @@ model/matchedOfficer.ts model/matchedTopic.ts model/mentionedPerson.ts model/meta.ts +model/metricValue.ts model/model2YrMeanCitedness.ts model/modelField.ts model/models.ts +model/multiplierPeerRanks.ts +model/multiplierTag.ts model/newsArticle.ts model/newsArticleDetail.ts model/newsPage.ts @@ -234,6 +262,7 @@ model/patentsByAuthorResponse.ts model/patentsByInstitutionResponse.ts model/patentsByKeywordsRequest.ts model/patentsByKeywordsResponse.ts +model/peerRankField.ts model/personBio.ts model/personBookmarkResponse.ts model/primaryCategoryYearAggregation.ts @@ -252,8 +281,17 @@ model/rankingResponse.ts model/rankingWeights.ts model/rebuildResponse.ts model/registryHealth.ts +model/researchAreaStatistics.ts +model/researcherDetail.ts +model/researcherMetrics.ts +model/researcherSortBy.ts +model/researcherSummary.ts +model/researcherSummaryPage.ts model/score.ts model/selectedAuthorsRequest.ts +model/showcase.ts +model/showcaseEntry.ts +model/showcaseKind.ts model/sortDirection.ts model/startCollaborationGraphResponse.ts model/subfield.ts diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index 7310dd62..6757105f 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -24,6 +24,8 @@ export * from './institutionsV2.service'; import { InstitutionsV2Service } from './institutionsV2.service'; export * from './keywords.service'; import { KeywordsService } from './keywords.service'; +export * from './multiplicators.service'; +import { MultiplicatorsService } from './multiplicators.service'; export * from './news.service'; import { NewsService } from './news.service'; export * from './organization.service'; @@ -46,29 +48,4 @@ export * from './works.service'; import { WorksService } from './works.service'; export * from './worksV2.service'; import { WorksV2Service } from './worksV2.service'; -export const APIS = [ - AuthService, - AuthorsV2Service, - BUNDInstitutionsService, - BackgroundJobsService, - BookmarksService, - CompanyConnectionsService, - DFGInstitutionsService, - DFGPersonsService, - DashboardService, - FundingService, - InstitutionsService, - InstitutionsV2Service, - KeywordsService, - NewsService, - OrganizationService, - PatentsService, - PersonsService, - ProjectsService, - RankingService, - TopicsService, - TopicsV2Service, - UniversityRankingsService, - WorksService, - WorksV2Service, -]; +export const APIS = [AuthService, AuthorsV2Service, BUNDInstitutionsService, BackgroundJobsService, BookmarksService, CompanyConnectionsService, DFGInstitutionsService, DFGPersonsService, DashboardService, FundingService, InstitutionsService, InstitutionsV2Service, KeywordsService, MultiplicatorsService, NewsService, OrganizationService, PatentsService, PersonsService, ProjectsService, RankingService, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service]; diff --git a/webapp/src/app/api/api/auth.service.ts b/webapp/src/app/api/api/auth.service.ts index e8a5b735..bae5fd40 100644 --- a/webapp/src/app/api/api/auth.service.ts +++ b/webapp/src/app/api/api/auth.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AccessResponse } from '../model/accessResponse'; @@ -58,1995 +52,1095 @@ import { OtkResponse } from '../model/otkResponse'; import { UpdateAccountRequest } from '../model/updateAccountRequest'; // @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 AuthService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Check if user can fetch GDPR-relevant data - * Check if the authenticated user can fetch GDPR-relevant data for a given author and institution. - * @endpoint get /api/auth/v2/can-fetch-gdpr-relevant-data - * @param rawOaAuthorId OpenAlex author ID to check access for - * @param rawOaInstitutionId OpenAlex institution ID to check access for - * @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 canFetchGdprRelevantData( - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public canFetchGdprRelevantData( - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public canFetchGdprRelevantData( - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public canFetchGdprRelevantData( - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaAuthorId, - 'raw_oa_author_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - - 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, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Check if user can fetch GDPR-relevant data + * Check if the authenticated user can fetch GDPR-relevant data for a given author and institution. + * @endpoint get /api/auth/v2/can-fetch-gdpr-relevant-data + * @param rawOaAuthorId OpenAlex author ID to check access for + * @param rawOaInstitutionId OpenAlex institution ID to check access for + * @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 canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaAuthorId, 'raw_oa_author_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/auth/v2/can-fetch-gdpr-relevant-data`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/auth/v2/can-fetch-gdpr-relevant-data`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Change Password + * Change the user\'s password and invalidate existing tokens. + * @endpoint post /api/auth/v2/change-password + * @param bodyChangePassword + * @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 changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyChangePassword === null || bodyChangePassword === undefined) { + throw new Error('Required parameter bodyChangePassword was null or undefined when calling changePassword.'); + } - /** - * Change Password - * Change the user\'s password and invalidate existing tokens. - * @endpoint post /api/auth/v2/change-password - * @param bodyChangePassword - * @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 changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyChangePassword === null || bodyChangePassword === undefined) { - throw new Error( - 'Required parameter bodyChangePassword was null or undefined when calling changePassword.', - ); + 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/auth/v2/change-password`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyChangePassword, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Create Account + * @endpoint post /api/accounts + * @param createAccountRequest + * @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 createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (createAccountRequest === null || createAccountRequest === undefined) { + throw new Error('Required parameter createAccountRequest was null or undefined when calling createAccount.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createAccountRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Delete Account + * @endpoint delete /api/accounts/{account_id} + * @param accountId + * @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 deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteAccount(accountId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling deleteAccount.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts/${this.configuration.encodeParam({name: "accountId", value: accountId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: 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 Access Token + * Retrieve an access token for the authenticated user. + * @endpoint post /api/auth/v2/access + * @param bodyGetAccessToken + * @param idToken + * @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 getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyGetAccessToken === null || bodyGetAccessToken === undefined) { + throw new Error('Required parameter bodyGetAccessToken was null or undefined when calling getAccessToken.'); + } + + 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/auth/v2/access`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyGetAccessToken, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/auth/v2/change-password`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: bodyChangePassword, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } + /** + * Get Current Account + * @endpoint get /api/accounts/me + * @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 getCurrentAccount(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCurrentAccount(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCurrentAccount(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCurrentAccount(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Create Account - * @endpoint post /api/accounts - * @param createAccountRequest - * @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 createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (createAccountRequest === null || createAccountRequest === undefined) { - throw new Error( - 'Required parameter createAccountRequest was null or undefined when calling createAccount.', - ); + 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/accounts/me`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Health Check + * @endpoint get /api/auth/v2/health + * @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 healthCheckApiAuthV2HealthGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public healthCheckApiAuthV2HealthGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public healthCheckApiAuthV2HealthGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public healthCheckApiAuthV2HealthGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + 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/auth/v2/health`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * List Organizations + * @endpoint get /api/accounts/organizations + * @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 listAccountOrganizations(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listAccountOrganizations(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listAccountOrganizations(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listAccountOrganizations(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts/organizations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - 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'; - } + /** + * List Accounts + * @endpoint get /api/accounts + * @param page + * @param pageSize + * @param offset + * @param search + * @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 listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + offset, 'offset'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + organizationId, 'organization_id'); + + 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/accounts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/accounts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createAccountRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Login with One-Time Key + * Login using a one-time key (OTK) sent to the user\'s email. + * @endpoint post /api/auth/v2/login + * @param bodyLogin + * @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 login(bodyLogin: BodyLogin, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public login(bodyLogin: BodyLogin, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public login(bodyLogin: BodyLogin, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public login(bodyLogin: BodyLogin, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyLogin === null || bodyLogin === undefined) { + throw new Error('Required parameter bodyLogin was null or undefined when calling login.'); + } - /** - * Delete Account - * @endpoint delete /api/accounts/{account_id} - * @param accountId - * @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 deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (accountId === null || accountId === undefined) { - throw new Error( - 'Required parameter accountId was null or undefined when calling deleteAccount.', - ); + 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/auth/v2/login`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyLogin, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Logout + * Logout the authenticated user. + * @endpoint post /api/auth/v2/logout + * @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 logout(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public logout(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public logout(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public logout(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/logout`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Refresh Access Token + * Refresh the access token using a valid refresh token. + * @endpoint post /api/auth/v2/refresh + * @param refreshToken + * @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 refreshAccessToken(refreshToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public refreshAccessToken(refreshToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public refreshAccessToken(refreshToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public refreshAccessToken(refreshToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/refresh`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/accounts/${this.configuration.encodeParam({ name: 'accountId', value: accountId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Request One-Time Key + * Request a one-time key (OTK) for authentication using email and password. + * @endpoint post /api/auth/v2/request-otk + * @param bodyRequestOtk + * @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 requestOtk(bodyRequestOtk: BodyRequestOtk, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyRequestOtk === null || bodyRequestOtk === undefined) { + throw new Error('Required parameter bodyRequestOtk was null or undefined when calling requestOtk.'); + } - /** - * Get Access Token - * Retrieve an access token for the authenticated user. - * @endpoint post /api/auth/v2/access - * @param bodyGetAccessToken - * @param idToken - * @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 getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyGetAccessToken === null || bodyGetAccessToken === undefined) { - throw new Error( - 'Required parameter bodyGetAccessToken was null or undefined when calling getAccessToken.', - ); + 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/auth/v2/request-otk`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyRequestOtk, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Request Password Reset + * Request a one-time password reset link for the given email address. + * @endpoint post /api/auth/v2/request-password-reset + * @param bodyRequestPasswordReset + * @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 requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyRequestPasswordReset === null || bodyRequestPasswordReset === undefined) { + throw new Error('Required parameter bodyRequestPasswordReset was null or undefined when calling requestPasswordReset.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/request-password-reset`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyRequestPasswordReset, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Reset Password + * Reset the user\'s password using a one-time password reset token. + * @endpoint post /api/auth/v2/reset-password + * @param bodyResetPassword + * @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 resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public resetPassword(bodyResetPassword: BodyResetPassword, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyResetPassword === null || bodyResetPassword === undefined) { + throw new Error('Required parameter bodyResetPassword was null or undefined when calling resetPassword.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + 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/auth/v2/reset-password`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyResetPassword, + responseType: 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 Account + * @endpoint put /api/accounts/{account_id} + * @param accountId + * @param updateAccountRequest + * @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 updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling updateAccount.'); + } + if (updateAccountRequest === null || updateAccountRequest === undefined) { + throw new Error('Required parameter updateAccountRequest was null or undefined when calling updateAccount.'); + } + + 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/accounts/${this.configuration.encodeParam({name: "accountId", value: accountId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: updateAccountRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/auth/v2/access`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyGetAccessToken, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Validate Password Reset Token + * Validate a password reset token without consuming it. + * @endpoint post /api/auth/v2/validate-password-reset-token + * @param bodyValidatePasswordResetToken + * @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 validatePasswordResetToken(bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<{ [key: string]: boolean | null; }>; + public validatePasswordResetToken(bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public validatePasswordResetToken(bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public validatePasswordResetToken(bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyValidatePasswordResetToken === null || bodyValidatePasswordResetToken === undefined) { + throw new Error('Required parameter bodyValidatePasswordResetToken was null or undefined when calling validatePasswordResetToken.'); + } - /** - * Get Current Account - * @endpoint get /api/accounts/me - * @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 getCurrentAccount( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCurrentAccount( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCurrentAccount( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCurrentAccount( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; + 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 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/auth/v2/validate-password-reset-token`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request<{ [key: string]: boolean | null; }>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyValidatePasswordResetToken, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts/me`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Health Check - * @endpoint get /api/auth/v2/health - * @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 healthCheckApiAuthV2HealthGet( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public healthCheckApiAuthV2HealthGet( - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public healthCheckApiAuthV2HealthGet( - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public healthCheckApiAuthV2HealthGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/auth/v2/health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * List Organizations - * @endpoint get /api/accounts/organizations - * @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 listAccountOrganizations( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listAccountOrganizations( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpResponse> - >; - public listAccountOrganizations( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpEvent> - >; - public listAccountOrganizations( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/accounts/organizations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request< - Array - >('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * List Accounts - * @endpoint get /api/accounts - * @param page - * @param pageSize - * @param offset - * @param search - * @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 listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - offset, - 'offset', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - search, - 'search', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - organizationId, - 'organization_id', - ); - - 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/accounts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Login with One-Time Key - * Login using a one-time key (OTK) sent to the user\'s email. - * @endpoint post /api/auth/v2/login - * @param bodyLogin - * @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 login( - bodyLogin: BodyLogin, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public login( - bodyLogin: BodyLogin, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public login( - bodyLogin: BodyLogin, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public login( - bodyLogin: BodyLogin, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyLogin === null || bodyLogin === undefined) { - throw new Error( - 'Required parameter bodyLogin was null or undefined when calling login.', - ); - } - - 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/auth/v2/login`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyLogin, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Logout - * Logout the authenticated user. - * @endpoint post /api/auth/v2/logout - * @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 logout( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public logout( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public logout( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public logout( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/auth/v2/logout`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Refresh Access Token - * Refresh the access token using a valid refresh token. - * @endpoint post /api/auth/v2/refresh - * @param refreshToken - * @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 refreshAccessToken( - refreshToken?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public refreshAccessToken( - refreshToken?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public refreshAccessToken( - refreshToken?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public refreshAccessToken( - refreshToken?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/auth/v2/refresh`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Request One-Time Key - * Request a one-time key (OTK) for authentication using email and password. - * @endpoint post /api/auth/v2/request-otk - * @param bodyRequestOtk - * @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 requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyRequestOtk === null || bodyRequestOtk === undefined) { - throw new Error( - 'Required parameter bodyRequestOtk was null or undefined when calling requestOtk.', - ); - } - - 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/auth/v2/request-otk`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyRequestOtk, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Request Password Reset - * Request a one-time password reset link for the given email address. - * @endpoint post /api/auth/v2/request-password-reset - * @param bodyRequestPasswordReset - * @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 requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - bodyRequestPasswordReset === null || - bodyRequestPasswordReset === undefined - ) { - throw new Error( - 'Required parameter bodyRequestPasswordReset was null or undefined when calling requestPasswordReset.', - ); - } - - 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/auth/v2/request-password-reset`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: bodyRequestPasswordReset, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Reset Password - * Reset the user\'s password using a one-time password reset token. - * @endpoint post /api/auth/v2/reset-password - * @param bodyResetPassword - * @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 resetPassword( - bodyResetPassword: BodyResetPassword, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyResetPassword === null || bodyResetPassword === undefined) { - throw new Error( - 'Required parameter bodyResetPassword was null or undefined when calling resetPassword.', - ); - } - - 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/auth/v2/reset-password`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: bodyResetPassword, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Update Account - * @endpoint put /api/accounts/{account_id} - * @param accountId - * @param updateAccountRequest - * @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 updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (accountId === null || accountId === undefined) { - throw new Error( - 'Required parameter accountId was null or undefined when calling updateAccount.', - ); - } - if (updateAccountRequest === null || updateAccountRequest === undefined) { - throw new Error( - 'Required parameter updateAccountRequest was null or undefined when calling updateAccount.', - ); - } - - 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/accounts/${this.configuration.encodeParam({ name: 'accountId', value: accountId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'put', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: updateAccountRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Validate Password Reset Token - * Validate a password reset token without consuming it. - * @endpoint post /api/auth/v2/validate-password-reset-token - * @param bodyValidatePasswordResetToken - * @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 validatePasswordResetToken( - bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable<{ [key: string]: boolean | null }>; - public validatePasswordResetToken( - bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public validatePasswordResetToken( - bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public validatePasswordResetToken( - bodyValidatePasswordResetToken: BodyValidatePasswordResetToken, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - bodyValidatePasswordResetToken === null || - bodyValidatePasswordResetToken === undefined - ) { - throw new Error( - 'Required parameter bodyValidatePasswordResetToken was null or undefined when calling validatePasswordResetToken.', - ); - } - - 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/auth/v2/validate-password-reset-token`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request<{ [key: string]: boolean | null }>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyValidatePasswordResetToken, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/authorsV2.service.ts b/webapp/src/app/api/api/authorsV2.service.ts index 3facf7f0..05f90608 100644 --- a/webapp/src/app/api/api/authorsV2.service.ts +++ b/webapp/src/app/api/api/authorsV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { Author } from '../model/author'; @@ -34,613 +28,333 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { StartCollaborationGraphResponse } from '../model/startCollaborationGraphResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class AuthorsV2Service extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a paginated list of authors for a given search term based on their display name. - * @endpoint get /api/authors/v2/autocomplete/selector - * @param query A search term to filter authors by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public autocompleteAuthorsForSelector( - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public autocompleteAuthorsForSelector( - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteAuthorsForSelector( - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteAuthorsForSelector( - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a paginated list of authors for a given search term based on their display name. + * @endpoint get /api/authors/v2/autocomplete/selector + * @param query A search term to filter authors by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public autocompleteAuthorsForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public autocompleteAuthorsForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteAuthorsForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteAuthorsForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/authors/v2/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - /** - * Returns an author for a given author ID. - * @endpoint get /api/authors/v2/{raw_oa_author_id} - * @param rawOaAuthorId The ID of the author to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorById( - rawOaAuthorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorById( - rawOaAuthorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorById( - rawOaAuthorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorById( - rawOaAuthorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling getAuthorById.', - ); - } + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/authors/v2/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a paginated list of authors for a given list of author IDs. - * @endpoint get /api/authors/v2/authors/id - * @param authorIds A list of author IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorsByIds( - authorIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorsByIds( - authorIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorsByIds( - authorIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorsByIds( - authorIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', + let localVarPath = `/api/authors/v2/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns an author for a given author ID. + * @endpoint get /api/authors/v2/{raw_oa_author_id} + * @param rawOaAuthorId The ID of the author to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorById(rawOaAuthorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorById(rawOaAuthorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorById(rawOaAuthorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorById(rawOaAuthorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorById.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/authors/v2/authors/id`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Returns the status of a collaboration graph generation task. - * @endpoint get /api/authors/v2/collaboration-graph/{graph_id}/status - * @param graphId The ID of the collaboration graph generation task. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCollaborationGraphStatus( - graphId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCollaborationGraphStatus( - graphId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationGraphStatus( - graphId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationGraphStatus( - graphId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (graphId === null || graphId === undefined) { - throw new Error( - 'Required parameter graphId was null or undefined when calling getCollaborationGraphStatus.', - ); - } + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/authors/v2/collaboration-graph/${this.configuration.encodeParam({ name: 'graphId', value: graphId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a collaboration graph for a given author ID. - * @endpoint post /api/authors/v2/collaboration-graph - * @param rawOaAuthorId The raw OpenAlex author ID for which to retrieve the collaboration graph. - * @param yearFrom The starting year to filter the works by (optional). - * @param yearTo The ending year to filter the works by (optional). - * @param minCollaborators The minimum number of collaborators to filter the works by (optional). - * @param maxCollaborators The maximum number of collaborators to filter the works by (optional). - * @param topicIds A list of topic IDs to filter the works by (optional). - * @param institutionIds A list of institution IDs to filter the works by (optional). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public startCollaborationGraph( - rawOaAuthorId: string, - yearFrom?: number, - yearTo?: number, - minCollaborators?: number, - maxCollaborators?: number, - topicIds?: Array, - institutionIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public startCollaborationGraph( - rawOaAuthorId: string, - yearFrom?: number, - yearTo?: number, - minCollaborators?: number, - maxCollaborators?: number, - topicIds?: Array, - institutionIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public startCollaborationGraph( - rawOaAuthorId: string, - yearFrom?: number, - yearTo?: number, - minCollaborators?: number, - maxCollaborators?: number, - topicIds?: Array, - institutionIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public startCollaborationGraph( - rawOaAuthorId: string, - yearFrom?: number, - yearTo?: number, - minCollaborators?: number, - maxCollaborators?: number, - topicIds?: Array, - institutionIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling startCollaborationGraph.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaAuthorId, - 'raw_oa_author_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'year_from', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'year_to', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - minCollaborators, - 'min_collaborators', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - maxCollaborators, - 'max_collaborators', - ); - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', + let localVarPath = `/api/authors/v2/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + + /** + * Returns a paginated list of authors for a given list of author IDs. + * @endpoint get /api/authors/v2/authors/id + * @param authorIds A list of author IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorsByIds(authorIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorsByIds(authorIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorsByIds(authorIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorsByIds(authorIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/authors/v2/authors/id`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns the status of a collaboration graph generation task. + * @endpoint get /api/authors/v2/collaboration-graph/{graph_id}/status + * @param graphId The ID of the collaboration graph generation task. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCollaborationGraphStatus(graphId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCollaborationGraphStatus(graphId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationGraphStatus(graphId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationGraphStatus(graphId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (graphId === null || graphId === undefined) { + throw new Error('Required parameter graphId was null or undefined when calling getCollaborationGraphStatus.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/authors/v2/collaboration-graph/${this.configuration.encodeParam({name: "graphId", value: graphId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a collaboration graph for a given author ID. + * @endpoint post /api/authors/v2/collaboration-graph + * @param rawOaAuthorId The raw OpenAlex author ID for which to retrieve the collaboration graph. + * @param yearFrom The starting year to filter the works by (optional). + * @param yearTo The ending year to filter the works by (optional). + * @param minCollaborators The minimum number of collaborators to filter the works by (optional). + * @param maxCollaborators The maximum number of collaborators to filter the works by (optional). + * @param topicIds A list of topic IDs to filter the works by (optional). + * @param institutionIds A list of institution IDs to filter the works by (optional). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling startCollaborationGraph.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaAuthorId, 'raw_oa_author_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'year_from'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'year_to'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + minCollaborators, 'min_collaborators'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + maxCollaborators, 'max_collaborators'); + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/authors/v2/collaboration-graph`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/authors/v2/collaboration-graph`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/bUNDInstitutions.service.ts b/webapp/src/app/api/api/bUNDInstitutions.service.ts index 1e01fb85..ca741d43 100644 --- a/webapp/src/app/api/api/bUNDInstitutions.service.ts +++ b/webapp/src/app/api/api/bUNDInstitutions.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { BundInstitutionSummaryPage } from '../model/bundInstitutionSummaryPage'; @@ -28,231 +22,137 @@ import { BundInstitutionSummaryPage } from '../model/bundInstitutionSummaryPage' import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class BUNDInstitutionsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a list of institutions based on a search term for autocomplete functionality. - * @endpoint get /api/bund/institutions/autocomplete/selector - * @param query A search term to filter institutions by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBundInstitutionAutocompleteForSelector( - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getBundInstitutionAutocompleteForSelector( - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBundInstitutionAutocompleteForSelector( - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBundInstitutionAutocompleteForSelector( - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a list of institutions based on a search term for autocomplete functionality. + * @endpoint get /api/bund/institutions/autocomplete/selector + * @param query A search term to filter institutions by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/bund/institutions/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - /** - * Returns a list of institutions based on their names. - * @endpoint get /api/bund/institutions/names - * @param institutionNames A list of institution names to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBundInstitutionsByName( - institutionNames?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getBundInstitutionsByName( - institutionNames?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBundInstitutionsByName( - institutionNames?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBundInstitutionsByName( - institutionNames?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (institutionNames) { - institutionNames.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_names', + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bund/institutions/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns a list of institutions based on their names. + * @endpoint get /api/bund/institutions/names + * @param institutionNames A list of institution names to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundInstitutionsByName(institutionNames?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBundInstitutionsByName(institutionNames?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundInstitutionsByName(institutionNames?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundInstitutionsByName(institutionNames?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (institutionNames) { + institutionNames.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_names'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bund/institutions/names`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bund/institutions/names`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/backgroundJobs.service.ts b/webapp/src/app/api/api/backgroundJobs.service.ts index c8b6c411..ce17b079 100644 --- a/webapp/src/app/api/api/backgroundJobs.service.ts +++ b/webapp/src/app/api/api/backgroundJobs.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AvailableImages } from '../model/availableImages'; @@ -42,1293 +36,682 @@ import { JobRunLogs } from '../model/jobRunLogs'; import { RegistryHealth } from '../model/registryHealth'; // @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 BackgroundJobsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Create Task - * @endpoint post /api/background-jobs/tasks - * @param jobDefinitionCreateRequest - * @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 createBackgroundJobTask( - jobDefinitionCreateRequest: JobDefinitionCreateRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public createBackgroundJobTask( - jobDefinitionCreateRequest: JobDefinitionCreateRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createBackgroundJobTask( - jobDefinitionCreateRequest: JobDefinitionCreateRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createBackgroundJobTask( - jobDefinitionCreateRequest: JobDefinitionCreateRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - jobDefinitionCreateRequest === null || - jobDefinitionCreateRequest === undefined - ) { - throw new Error( - 'Required parameter jobDefinitionCreateRequest was null or undefined when calling createBackgroundJobTask.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Create Task + * @endpoint post /api/background-jobs/tasks + * @param jobDefinitionCreateRequest + * @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 createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (jobDefinitionCreateRequest === null || jobDefinitionCreateRequest === undefined) { + throw new Error('Required parameter jobDefinitionCreateRequest was null or undefined when calling createBackgroundJobTask.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: jobDefinitionCreateRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Delete Task + * @endpoint delete /api/background-jobs/tasks/{task_id} + * @param taskId + * @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 deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling deleteBackgroundJobTask.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: 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 Available Images + * @endpoint get /api/background-jobs/available-images + * @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 getBackgroundJobAvailableImages(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + 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/background-jobs/available-images`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/background-jobs/tasks`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: jobDefinitionCreateRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Get Run Logs + * @endpoint get /api/background-jobs/runs/{run_id}/logs + * @param runId + * @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 getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (runId === null || runId === undefined) { + throw new Error('Required parameter runId was null or undefined when calling getBackgroundJobRunLogs.'); + } - /** - * Delete Task - * @endpoint delete /api/background-jobs/tasks/{task_id} - * @param taskId - * @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 deleteBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (taskId === null || taskId === undefined) { - throw new Error( - 'Required parameter taskId was null or undefined when calling deleteBackgroundJobTask.', - ); + 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/background-jobs/runs/${this.configuration.encodeParam({name: "runId", value: runId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/logs`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Get Task Runs + * @endpoint get /api/background-jobs/tasks/{task_id}/runs + * @param taskId + * @param limit + * @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 getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling getBackgroundJobTaskRuns.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + // 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/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/runs`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Get Tasks + * @endpoint get /api/background-jobs/tasks + * @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 getBackgroundJobTasks(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobTasks(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getBackgroundJobTasks(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getBackgroundJobTasks(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Docker Health + * @endpoint get /api/background-jobs/docker-health + * @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 getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Get Available Images - * @endpoint get /api/background-jobs/available-images - * @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 getBackgroundJobAvailableImages( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getBackgroundJobAvailableImages( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobAvailableImages( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobAvailableImages( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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 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/background-jobs/docker-health`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Registry Health + * @endpoint get /api/background-jobs/registry-health + * @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 getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/registry-health`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/background-jobs/available-images`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Run Task + * @endpoint post /api/background-jobs/tasks/{task_id}/run + * @param taskId + * @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 runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling runBackgroundJobTask.'); + } - /** - * Get Run Logs - * @endpoint get /api/background-jobs/runs/{run_id}/logs - * @param runId - * @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 getBackgroundJobRunLogs( - runId: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getBackgroundJobRunLogs( - runId: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobRunLogs( - runId: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobRunLogs( - runId: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (runId === null || runId === undefined) { - throw new Error( - 'Required parameter runId was null or undefined when calling getBackgroundJobRunLogs.', - ); + 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/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/run`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Stop Run + * @endpoint post /api/background-jobs/runs/{run_id}/stop + * @param runId + * @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 stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (runId === null || runId === undefined) { + throw new Error('Required parameter runId was null or undefined when calling stopBackgroundJobRun.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/runs/${this.configuration.encodeParam({name: "runId", value: runId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/stop`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Update Task + * @endpoint patch /api/background-jobs/tasks/{task_id} + * @param taskId + * @param jobDefinitionUpdateRequest + * @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 updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (taskId === null || taskId === undefined) { + throw new Error('Required parameter taskId was null or undefined when calling updateBackgroundJobTask.'); + } + if (jobDefinitionUpdateRequest === null || jobDefinitionUpdateRequest === undefined) { + throw new Error('Required parameter jobDefinitionUpdateRequest was null or undefined when calling updateBackgroundJobTask.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('patch', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: jobDefinitionUpdateRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/background-jobs/runs/${this.configuration.encodeParam({ name: 'runId', value: runId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/logs`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Task Runs - * @endpoint get /api/background-jobs/tasks/{task_id}/runs - * @param taskId - * @param limit - * @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 getBackgroundJobTaskRuns( - taskId: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobTaskRuns( - taskId: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getBackgroundJobTaskRuns( - taskId: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getBackgroundJobTaskRuns( - taskId: number, - limit?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (taskId === null || taskId === undefined) { - throw new Error( - 'Required parameter taskId was null or undefined when calling getBackgroundJobTaskRuns.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - - 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/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/runs`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Tasks - * @endpoint get /api/background-jobs/tasks - * @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 getBackgroundJobTasks( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobTasks( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getBackgroundJobTasks( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getBackgroundJobTasks( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/background-jobs/tasks`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Docker Health - * @endpoint get /api/background-jobs/docker-health - * @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 getBackgroundJobsDockerHealth( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getBackgroundJobsDockerHealth( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobsDockerHealth( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobsDockerHealth( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/background-jobs/docker-health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Registry Health - * @endpoint get /api/background-jobs/registry-health - * @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 getBackgroundJobsRegistryHealth( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getBackgroundJobsRegistryHealth( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobsRegistryHealth( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getBackgroundJobsRegistryHealth( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/background-jobs/registry-health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Run Task - * @endpoint post /api/background-jobs/tasks/{task_id}/run - * @param taskId - * @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 runBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public runBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public runBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public runBackgroundJobTask( - taskId: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (taskId === null || taskId === undefined) { - throw new Error( - 'Required parameter taskId was null or undefined when calling runBackgroundJobTask.', - ); - } - - 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/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/run`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Stop Run - * @endpoint post /api/background-jobs/runs/{run_id}/stop - * @param runId - * @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 stopBackgroundJobRun( - runId: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public stopBackgroundJobRun( - runId: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public stopBackgroundJobRun( - runId: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public stopBackgroundJobRun( - runId: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (runId === null || runId === undefined) { - throw new Error( - 'Required parameter runId was null or undefined when calling stopBackgroundJobRun.', - ); - } - - 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/background-jobs/runs/${this.configuration.encodeParam({ name: 'runId', value: runId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/stop`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Update Task - * @endpoint patch /api/background-jobs/tasks/{task_id} - * @param taskId - * @param jobDefinitionUpdateRequest - * @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 updateBackgroundJobTask( - taskId: number, - jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateBackgroundJobTask( - taskId: number, - jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateBackgroundJobTask( - taskId: number, - jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateBackgroundJobTask( - taskId: number, - jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (taskId === null || taskId === undefined) { - throw new Error( - 'Required parameter taskId was null or undefined when calling updateBackgroundJobTask.', - ); - } - if ( - jobDefinitionUpdateRequest === null || - jobDefinitionUpdateRequest === undefined - ) { - throw new Error( - 'Required parameter jobDefinitionUpdateRequest was null or undefined when calling updateBackgroundJobTask.', - ); - } - - 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/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'patch', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: jobDefinitionUpdateRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/bookmarks.service.ts b/webapp/src/app/api/api/bookmarks.service.ts index 198f796e..3e0ec2e8 100644 --- a/webapp/src/app/api/api/bookmarks.service.ts +++ b/webapp/src/app/api/api/bookmarks.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CreatePersonBookmark } from '../model/createPersonBookmark'; @@ -30,375 +24,206 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { PersonBookmarkResponse } from '../model/personBookmarkResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class BookmarksService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Bookmark Person - * @endpoint put /api/bookmarks/persons/{person_id} - * @param personId - * @param createPersonBookmark - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (personId === null || personId === undefined) { - throw new Error( - 'Required parameter personId was null or undefined when calling bookmarkPerson.', - ); - } - if (createPersonBookmark === null || createPersonBookmark === undefined) { - throw new Error( - 'Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Bookmark Person + * @endpoint put /api/bookmarks/persons/{person_id} + * @param personId + * @param createPersonBookmark + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (personId === null || personId === undefined) { + throw new Error('Required parameter personId was null or undefined when calling bookmarkPerson.'); + } + if (createPersonBookmark === null || createPersonBookmark === undefined) { + throw new Error('Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createPersonBookmark, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * List Person Bookmarks + * @endpoint get /api/bookmarks/persons + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listPersonBookmarks(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listPersonBookmarks(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listPersonBookmarks(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listPersonBookmarks(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bookmarks/persons`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + /** + * Remove Person Bookmark + * @endpoint delete /api/bookmarks/persons/{person_id} + * @param personId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (personId === null || personId === undefined) { + throw new Error('Required parameter personId was null or undefined when calling removePersonBookmark.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'put', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createPersonBookmark, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * List Person Bookmarks - * @endpoint get /api/bookmarks/persons - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listPersonBookmarks( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listPersonBookmarks( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public listPersonBookmarks( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public listPersonBookmarks( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bookmarks/persons`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Remove Person Bookmark - * @endpoint delete /api/bookmarks/persons/{person_id} - * @param personId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (personId === null || personId === undefined) { - throw new Error( - 'Required parameter personId was null or undefined when calling removePersonBookmark.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/companyConnections.service.ts b/webapp/src/app/api/api/companyConnections.service.ts index e9018fad..133e8298 100644 --- a/webapp/src/app/api/api/companyConnections.service.ts +++ b/webapp/src/app/api/api/companyConnections.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CompanyConnectionsAvailability } from '../model/companyConnectionsAvailability'; @@ -30,249 +24,137 @@ import { CompanyConnectionsResponse } from '../model/companyConnectionsResponse' import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class CompanyConnectionsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Check whether company connections are available for an author. - * @endpoint get /api/inse-service/authors/{author_id}/company-connections/availability - * @param authorId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompanyConnectionsAvailability( - authorId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCompanyConnectionsAvailability( - authorId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCompanyConnectionsAvailability( - authorId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCompanyConnectionsAvailability( - authorId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getCompanyConnectionsAvailability.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Check whether company connections are available for an author. + * @endpoint get /api/inse-service/authors/{author_id}/company-connections/availability + * @param authorId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getCompanyConnectionsAvailability.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections/availability`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Get possible company connections by OpenAlex author ID. + * @endpoint get /api/inse-service/authors/{author_id}/company-connections + * @param authorId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getCompanyConnectionsByAuthor.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections/availability`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get possible company connections by OpenAlex author ID. - * @endpoint get /api/inse-service/authors/{author_id}/company-connections - * @param authorId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompanyConnectionsByAuthor( - authorId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCompanyConnectionsByAuthor( - authorId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCompanyConnectionsByAuthor( - authorId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCompanyConnectionsByAuthor( - authorId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getCompanyConnectionsByAuthor.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/dFGInstitutions.service.ts b/webapp/src/app/api/api/dFGInstitutions.service.ts index 811cb490..2582d69a 100644 --- a/webapp/src/app/api/api/dFGInstitutions.service.ts +++ b/webapp/src/app/api/api/dFGInstitutions.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage'; @@ -28,231 +22,137 @@ import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage'; import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class DFGInstitutionsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a list of institutions based on a search term for autocomplete functionality. - * @endpoint get /api/dfg/institutions/autocomplete/selector - * @param query A search term to filter institutions by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgInstitutionAutocompleteForSelector( - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDfgInstitutionAutocompleteForSelector( - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgInstitutionAutocompleteForSelector( - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgInstitutionAutocompleteForSelector( - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a list of institutions based on a search term for autocomplete functionality. + * @endpoint get /api/dfg/institutions/autocomplete/selector + * @param query A search term to filter institutions by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/dfg/institutions/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - /** - * Returns a list of institutions based on their IDs. - * @endpoint get /api/dfg/institutions/ids - * @param institutionIds A list of institution IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgInstitutionsByIds( - institutionIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDfgInstitutionsByIds( - institutionIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgInstitutionsByIds( - institutionIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgInstitutionsByIds( - institutionIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dfg/institutions/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns a list of institutions based on their IDs. + * @endpoint get /api/dfg/institutions/ids + * @param institutionIds A list of institution IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgInstitutionsByIds(institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDfgInstitutionsByIds(institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgInstitutionsByIds(institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgInstitutionsByIds(institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dfg/institutions/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dfg/institutions/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/dFGPersons.service.ts b/webapp/src/app/api/api/dFGPersons.service.ts index 19c2589a..edfcf946 100644 --- a/webapp/src/app/api/api/dFGPersons.service.ts +++ b/webapp/src/app/api/api/dFGPersons.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage'; @@ -28,231 +22,137 @@ import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage'; import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class DFGPersonsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a list of persons based on a search term for autocomplete functionality. - * @endpoint get /api/dfg/persons/autocomplete/selector - * @param query A search term to filter persons by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgPersonAutocompleteForSelector( - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDfgPersonAutocompleteForSelector( - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgPersonAutocompleteForSelector( - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgPersonAutocompleteForSelector( - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a list of persons based on a search term for autocomplete functionality. + * @endpoint get /api/dfg/persons/autocomplete/selector + * @param query A search term to filter persons by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgPersonAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/dfg/persons/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - /** - * Returns a list of persons based on their IDs. - * @endpoint get /api/dfg/persons/ids - * @param personIds A list of person IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgPersonsByIds( - personIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDfgPersonsByIds( - personIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgPersonsByIds( - personIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgPersonsByIds( - personIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (personIds) { - personIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'person_ids', + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dfg/persons/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns a list of persons based on their IDs. + * @endpoint get /api/dfg/persons/ids + * @param personIds A list of person IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgPersonsByIds(personIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDfgPersonsByIds(personIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgPersonsByIds(personIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgPersonsByIds(personIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (personIds) { + personIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'person_ids'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dfg/persons/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dfg/persons/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/dashboard.service.ts b/webapp/src/app/api/api/dashboard.service.ts index e72520db..c82b9325 100644 --- a/webapp/src/app/api/api/dashboard.service.ts +++ b/webapp/src/app/api/api/dashboard.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,20 @@ */ /* 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 { BmbfProjectStatusStatistics } from '../model/bmbfProjectStatusStatistics'; // @ts-ignore import { BundProjectTopics } from '../model/bundProjectTopics'; // @ts-ignore +import { DashboardInstitution } from '../model/dashboardInstitution'; +// @ts-ignore import { DashboardStatisticValue } from '../model/dashboardStatisticValue'; // @ts-ignore import { DashboardStatistics } from '../model/dashboardStatistics'; @@ -50,2719 +46,1487 @@ import { TopicHeatmap } from '../model/topicHeatmap'; import { TopicWordCloud } from '../model/topicWordCloud'; // @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 DashboardService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Dashboard Bmbf Project Statuses - * @endpoint get /api/dashboard/projects/bmbf/status - * @param fromYear - * @param toYear - * @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 getDashboardBmbfProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardBmbfProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBmbfProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBmbfProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Bmbf Project Statuses + * @endpoint get /api/dashboard/projects/bmbf/status + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/projects/bmbf/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/projects/bmbf/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Bmbf Projects + * @endpoint get /api/dashboard/statistics/projects/bmbf + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Bmbf Projects - * @endpoint get /api/dashboard/statistics/projects/bmbf - * @param fromYear - * @param toYear - * @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 getDashboardBmbfProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardBmbfProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBmbfProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBmbfProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/statistics/projects/bmbf`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Bund Project Topics + * @endpoint get /api/dashboard/projects/bund/topics + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/projects/bund/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/statistics/projects/bmbf`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Dfg Project Statuses + * @endpoint get /api/dashboard/projects/dfg/status + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Bund Project Topics - * @endpoint get /api/dashboard/projects/bund/topics - * @param fromYear - * @param toYear - * @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 getDashboardBundProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardBundProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBundProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBundProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/projects/dfg/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Dfg Project Topics + * @endpoint get /api/dashboard/projects/dfg/topics + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/projects/dfg/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/projects/bund/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Dfg Projects + * @endpoint get /api/dashboard/statistics/projects/dfg + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Dfg Project Statuses - * @endpoint get /api/dashboard/projects/dfg/status - * @param fromYear - * @param toYear - * @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 getDashboardDfgProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardDfgProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/statistics/projects/dfg`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Eu Project Statuses + * @endpoint get /api/dashboard/projects/eu/status + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/projects/eu/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/projects/dfg/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Eu Project Topics + * @endpoint get /api/dashboard/projects/eu/topics + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Dfg Project Topics - * @endpoint get /api/dashboard/projects/dfg/topics - * @param fromYear - * @param toYear - * @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 getDashboardDfgProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardDfgProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/projects/eu/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Eu Projects + * @endpoint get /api/dashboard/statistics/projects/eu + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/statistics/projects/eu`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/projects/dfg/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Institutions + * @endpoint get /api/dashboard/institutions + * @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 getDashboardInstitutions(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardInstitutions(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getDashboardInstitutions(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getDashboardInstitutions(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Dfg Projects - * @endpoint get /api/dashboard/statistics/projects/dfg - * @param fromYear - * @param toYear - * @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 getDashboardDfgProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardDfgProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + 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 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/dashboard/institutions`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Patents + * @endpoint get /api/dashboard/statistics/patents + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/statistics/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/statistics/projects/dfg`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Persons + * @endpoint get /api/dashboard/statistics/persons + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Eu Project Statuses - * @endpoint get /api/dashboard/projects/eu/status - * @param fromYear - * @param toYear - * @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 getDashboardEuProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardEuProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjectStatuses( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/statistics/persons`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Publications + * @endpoint get /api/dashboard/statistics/publications + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/statistics/publications`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/projects/eu/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Statistics + * @endpoint get /api/dashboard/statistics + * @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 getDashboardStatistics(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardStatistics(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardStatistics(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardStatistics(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Eu Project Topics - * @endpoint get /api/dashboard/projects/eu/topics - * @param fromYear - * @param toYear - * @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 getDashboardEuProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardEuProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjectTopics( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + 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 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/dashboard/statistics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Top Authors + * @endpoint get /api/dashboard/top-authors + * @param worksPeriod + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + worksPeriod, 'works_period'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/top-authors`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/projects/eu/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Top Eu Project Authors + * @endpoint get /api/dashboard/top-authors/eu-projects + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Eu Projects - * @endpoint get /api/dashboard/statistics/projects/eu - * @param fromYear - * @param toYear - * @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 getDashboardEuProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardEuProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjects( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/top-authors/eu-projects`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Top News Authors + * @endpoint get /api/dashboard/top-authors/news + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/top-authors/news`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/statistics/projects/eu`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Top Patent Authors + * @endpoint get /api/dashboard/top-authors/patents + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Patents - * @endpoint get /api/dashboard/statistics/patents - * @param fromYear - * @param toYear - * @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 getDashboardPatents( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardPatents( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPatents( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPatents( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/top-authors/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Top Project Authors + * @endpoint get /api/dashboard/top-authors/projects + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/top-authors/projects`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/statistics/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Top Work Authors + * @endpoint get /api/dashboard/top-authors/works + * @param worksPeriod + * @param institutionId + * @param fromYear + * @param toYear + * @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 getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Persons - * @endpoint get /api/dashboard/statistics/persons - * @param fromYear - * @param toYear - * @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 getDashboardPersons( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardPersons( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPersons( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPersons( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + worksPeriod, 'works_period'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); - 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 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/dashboard/top-authors/works`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Topic Heatmap + * @endpoint get /api/dashboard/topic-heatmap + * @param institutionId + * @param fromYear + * @param toYear + * @param limit + * @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 getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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/dashboard/topic-heatmap`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/statistics/persons`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Topic Word Cloud + * @endpoint get /api/dashboard/topic-wordcloud + * @param topicId + * @param institutionId + * @param fromYear + * @param toYear + * @param limit + * @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 getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (topicId === null || topicId === undefined) { + throw new Error('Required parameter topicId was null or undefined when calling getDashboardTopicWordCloud.'); + } - /** - * Dashboard Publications - * @endpoint get /api/dashboard/statistics/publications - * @param fromYear - * @param toYear - * @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 getDashboardPublications( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardPublications( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPublications( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPublications( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + topicId, 'topicId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); - 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 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/dashboard/topic-wordcloud`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/publications`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Statistics - * @endpoint get /api/dashboard/statistics - * @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 getDashboardStatistics( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardStatistics( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardStatistics( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardStatistics( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/dashboard/statistics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top Authors - * @endpoint get /api/dashboard/top-authors - * @param worksPeriod - * @param fromYear - * @param toYear - * @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 getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - worksPeriod, - 'works_period', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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/dashboard/top-authors`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top Eu Project Authors - * @endpoint get /api/dashboard/top-authors/eu-projects - * @param fromYear - * @param toYear - * @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 getDashboardTopEuProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopEuProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopEuProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopEuProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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/dashboard/top-authors/eu-projects`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top News Authors - * @endpoint get /api/dashboard/top-authors/news - * @param fromYear - * @param toYear - * @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 getDashboardTopNewsAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopNewsAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopNewsAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopNewsAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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/dashboard/top-authors/news`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top Patent Authors - * @endpoint get /api/dashboard/top-authors/patents - * @param fromYear - * @param toYear - * @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 getDashboardTopPatentAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopPatentAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopPatentAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopPatentAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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/dashboard/top-authors/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top Project Authors - * @endpoint get /api/dashboard/top-authors/projects - * @param fromYear - * @param toYear - * @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 getDashboardTopProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopProjectAuthors( - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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/dashboard/top-authors/projects`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top Work Authors - * @endpoint get /api/dashboard/top-authors/works - * @param worksPeriod - * @param fromYear - * @param toYear - * @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 getDashboardTopWorkAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopWorkAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopWorkAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopWorkAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - fromYear?: number, - toYear?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - worksPeriod, - 'works_period', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - - 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/dashboard/top-authors/works`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Topic Heatmap - * @endpoint get /api/dashboard/topic-heatmap - * @param fromYear - * @param toYear - * @param limit - * @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 getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - - 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/dashboard/topic-heatmap`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Topic Word Cloud - * @endpoint get /api/dashboard/topic-wordcloud - * @param topicId - * @param fromYear - * @param toYear - * @param limit - * @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 getDashboardTopicWordCloud( - topicId: string, - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopicWordCloud( - topicId: string, - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopicWordCloud( - topicId: string, - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopicWordCloud( - topicId: string, - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (topicId === null || topicId === undefined) { - throw new Error( - 'Required parameter topicId was null or undefined when calling getDashboardTopicWordCloud.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - topicId, - 'topicId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - - 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/dashboard/topic-wordcloud`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/institutionsV2.service.ts b/webapp/src/app/api/api/institutionsV2.service.ts index dba5034e..45877996 100644 --- a/webapp/src/app/api/api/institutionsV2.service.ts +++ b/webapp/src/app/api/api/institutionsV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -30,333 +24,192 @@ import { Institution } from '../model/institution'; import { InstitutionPageV2 } from '../model/institutionPageV2'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class InstitutionsV2Service extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a list of institutions based on a search term for autocomplete functionality. - * @endpoint get /api/institutions/v2/autocomplete/selector - * @param query A search term to filter institutions by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionAutocompleteForSelector( - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionAutocompleteForSelector( - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionAutocompleteForSelector( - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionAutocompleteForSelector( - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a list of institutions based on a search term for autocomplete functionality. + * @endpoint get /api/institutions/v2/autocomplete/selector + * @param query A search term to filter institutions by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/institutions/v2/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - /** - * Returns an institution based on its ID. - * @endpoint get /api/institutions/v2/single/{institution_id} - * @param institutionId The ID of the institution to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionById2( - institutionId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionById2( - institutionId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionById2( - institutionId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionById2( - institutionId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (institutionId === null || institutionId === undefined) { - throw new Error( - 'Required parameter institutionId was null or undefined when calling getInstitutionById2.', - ); - } + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/institutions/v2/single/${this.configuration.encodeParam({ name: 'institutionId', value: institutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a list of institutions based on their IDs. - * @endpoint get /api/institutions/v2/multiple/ids - * @param institutionIds A list of institution IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionsByIds( - institutionIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionsByIds( - institutionIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionsByIds( - institutionIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionsByIds( - institutionIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + let localVarPath = `/api/institutions/v2/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns an institution based on its ID. + * @endpoint get /api/institutions/v2/single/{institution_id} + * @param institutionId The ID of the institution to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionById2(institutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionById2(institutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionById2(institutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionById2(institutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (institutionId === null || institutionId === undefined) { + throw new Error('Required parameter institutionId was null or undefined when calling getInstitutionById2.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/institutions/v2/single/${this.configuration.encodeParam({name: "institutionId", value: institutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a list of institutions based on their IDs. + * @endpoint get /api/institutions/v2/multiple/ids + * @param institutionIds A list of institution IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionsByIds(institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionsByIds(institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionsByIds(institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionsByIds(institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/institutions/v2/multiple/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/institutions/v2/multiple/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/multiplicators.service.ts b/webapp/src/app/api/api/multiplicators.service.ts new file mode 100644 index 00000000..1ca47a44 --- /dev/null +++ b/webapp/src/app/api/api/multiplicators.service.ts @@ -0,0 +1,579 @@ +/** + * 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 { CareerBucket } from '../model/careerBucket'; +// @ts-ignore +import { EgoNetwork } from '../model/egoNetwork'; +// @ts-ignore +import { FounderCandidatePage } from '../model/founderCandidatePage'; +// @ts-ignore +import { FounderModelInfo } from '../model/founderModelInfo'; +// @ts-ignore +import { FounderSortBy } from '../model/founderSortBy'; +// @ts-ignore +import { FounderStatistics } from '../model/founderStatistics'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; +// @ts-ignore +import { MultiplierTag } from '../model/multiplierTag'; +// @ts-ignore +import { PeerRankField } from '../model/peerRankField'; +// @ts-ignore +import { ResearcherDetail } from '../model/researcherDetail'; +// @ts-ignore +import { ResearcherSortBy } from '../model/researcherSortBy'; +// @ts-ignore +import { ResearcherSummaryPage } from '../model/researcherSummaryPage'; +// @ts-ignore +import { Showcase } from '../model/showcase'; +// @ts-ignore +import { SortDirection } from '../model/sortDirection'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + + +@Injectable({ + providedIn: 'root' +}) +export class MultiplicatorsService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Which model produced the founder scores: performance and permutation importances. Identical for every university. + * @endpoint get /api/multiplicators/founder-model-info + * @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 getFounderModelInfo(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getFounderModelInfo(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFounderModelInfo(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFounderModelInfo(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + 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/multiplicators/founder-model-info`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Founder-potential statistics for the current user\'s university: data-quality funnel, score distributions per career stage, research-area composition and archetype overlap. + * @endpoint get /api/multiplicators/founder-statistics + * @param percentileThreshold Founder percentile (0-100) at or above which a researcher counts as shortlisted. + * @param minPublications Minimum publication count for the robust shortlist and the funnel\'s last stage. + * @param softPeerRankThreshold Sub-score (0-1) at or above which a shortlisted researcher counts as a soft archetype match. + * @param maxCareerAge Career ages above this count as implausible in the screen. + * @param taggedBand Founder percentile band used in the reverse archetype view (how many tagged people exceed it). + * @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 getFounderStatistics(percentileThreshold?: number, minPublications?: number, softPeerRankThreshold?: number, maxCareerAge?: number, taggedBand?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getFounderStatistics(percentileThreshold?: number, minPublications?: number, softPeerRankThreshold?: number, maxCareerAge?: number, taggedBand?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFounderStatistics(percentileThreshold?: number, minPublications?: number, softPeerRankThreshold?: number, maxCareerAge?: number, taggedBand?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFounderStatistics(percentileThreshold?: number, minPublications?: number, softPeerRankThreshold?: number, maxCareerAge?: number, taggedBand?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + percentileThreshold, 'percentile_threshold'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + minPublications, 'min_publications'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + softPeerRankThreshold, 'soft_peer_rank_threshold'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + maxCareerAge, 'max_career_age'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + taggedBand, 'tagged_band'); + + 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/multiplicators/founder-statistics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Full multiplier and founder-potential detail for one researcher: every raw metric next to its peer rank, so a coach can see why the person scored what they scored. + * @endpoint get /api/multiplicators/researchers/{author_id} + * @param authorId The OpenAlex author id, short form (e.g. A5087456839) or full URL. + * @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 getMultiplicatorResearcher(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getMultiplicatorResearcher(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getMultiplicatorResearcher(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getMultiplicatorResearcher(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getMultiplicatorResearcher.'); + } + + 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/multiplicators/researchers/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * One researcher\'s ego co-author network (nodes and edges, no layout - position them client-side with a force layout). + * @endpoint get /api/multiplicators/researchers/{author_id}/network + * @param authorId The OpenAlex author id, short form (e.g. A5087456839) or full URL. + * @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 getMultiplicatorResearcherNetwork(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getMultiplicatorResearcherNetwork(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getMultiplicatorResearcherNetwork(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getMultiplicatorResearcherNetwork(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getMultiplicatorResearcherNetwork.'); + } + + 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/multiplicators/researchers/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/network`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Four representative researchers: the top bridger, mentor and amplifier, plus the best scorer who just misses the tag threshold. + * @endpoint get /api/multiplicators/showcase + * @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 getMultiplicatorShowcase(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getMultiplicatorShowcase(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getMultiplicatorShowcase(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getMultiplicatorShowcase(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + 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/multiplicators/showcase`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Search the current university\'s researchers by founder potential. + * @endpoint get /api/multiplicators/founders + * @param page The page number to retrieve. (0-based) + * @param size The number of researchers to retrieve per page. + * @param inPopulation Restrict to researchers the model can score (default). Pass false for the unscored, or leave unset for everyone. + * @param minExternalPercentile Minimum founder percentile (0-100, vs the external reference cohort). + * @param maxExternalPercentile Maximum founder percentile (0-100). + * @param careerBucket Career stages to include. + * @param screened true: only researchers passing the data-quality screen; false: only the rejects; unset: everyone. + * @param minPublications Minimum publication count. + * @param hasPatents Whether the researcher has at least one patent. + * @param researchArea Dimensions FOR 2-digit division codes to include (e.g. 32, 40). + * @param tags Multiplier tags to include (any-of semantics). + * @param name A name to filter by (prefix matches allowed). + * @param screenMinPublications Publication count below which the screen flags a thin profile. + * @param screenMaxCareerAge Career age above which the screen flags an implausible length. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @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 searchFounderCandidates(page?: number, size?: number, inPopulation?: boolean, minExternalPercentile?: number, maxExternalPercentile?: number, careerBucket?: Array, screened?: boolean, minPublications?: number, hasPatents?: boolean, researchArea?: Array, tags?: Array, name?: string, screenMinPublications?: number, screenMaxCareerAge?: number, sortBy?: FounderSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchFounderCandidates(page?: number, size?: number, inPopulation?: boolean, minExternalPercentile?: number, maxExternalPercentile?: number, careerBucket?: Array, screened?: boolean, minPublications?: number, hasPatents?: boolean, researchArea?: Array, tags?: Array, name?: string, screenMinPublications?: number, screenMaxCareerAge?: number, sortBy?: FounderSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchFounderCandidates(page?: number, size?: number, inPopulation?: boolean, minExternalPercentile?: number, maxExternalPercentile?: number, careerBucket?: Array, screened?: boolean, minPublications?: number, hasPatents?: boolean, researchArea?: Array, tags?: Array, name?: string, screenMinPublications?: number, screenMaxCareerAge?: number, sortBy?: FounderSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchFounderCandidates(page?: number, size?: number, inPopulation?: boolean, minExternalPercentile?: number, maxExternalPercentile?: number, careerBucket?: Array, screened?: boolean, minPublications?: number, hasPatents?: boolean, researchArea?: Array, tags?: Array, name?: string, screenMinPublications?: number, screenMaxCareerAge?: number, sortBy?: FounderSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + inPopulation, 'in_population'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + minExternalPercentile, 'min_external_percentile'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + maxExternalPercentile, 'max_external_percentile'); + if (careerBucket) { + careerBucket.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'career_bucket'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + screened, 'screened'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + minPublications, 'min_publications'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + hasPatents, 'has_patents'); + if (researchArea) { + researchArea.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'research_area'); + }) + } + if (tags) { + tags.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'tags'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + name, 'name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + screenMinPublications, 'screen_min_publications'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + screenMaxCareerAge, 'screen_max_career_age'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/multiplicators/founders`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Search the current university\'s researchers by multiplier archetype (bridger / mentor / amplifier). + * @endpoint get /api/multiplicators/researchers + * @param page The page number to retrieve. (0-based) + * @param size The number of researchers to retrieve per page. + * @param tags Multiplier tags to include (any-of semantics). + * @param careerBucket Career stages to include. + * @param minPeerRank Minimum sub-score (0-1, ranked against same-career-stage peers). + * @param peerRankField Which sub-score `min_peer_rank` applies to. + * @param suspiciousProfile Filter by the merged-profile flag. + * @param name A name to filter by (prefix matches allowed). + * @param sortBy The sub-score to sort by. + * @param sortOrder The order to sort by. + * @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 searchMultiplicatorResearchers(page?: number, size?: number, tags?: Array, careerBucket?: Array, minPeerRank?: number, peerRankField?: PeerRankField, suspiciousProfile?: boolean, name?: string, sortBy?: ResearcherSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchMultiplicatorResearchers(page?: number, size?: number, tags?: Array, careerBucket?: Array, minPeerRank?: number, peerRankField?: PeerRankField, suspiciousProfile?: boolean, name?: string, sortBy?: ResearcherSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchMultiplicatorResearchers(page?: number, size?: number, tags?: Array, careerBucket?: Array, minPeerRank?: number, peerRankField?: PeerRankField, suspiciousProfile?: boolean, name?: string, sortBy?: ResearcherSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchMultiplicatorResearchers(page?: number, size?: number, tags?: Array, careerBucket?: Array, minPeerRank?: number, peerRankField?: PeerRankField, suspiciousProfile?: boolean, name?: string, sortBy?: ResearcherSortBy, sortOrder?: SortDirection, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (tags) { + tags.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'tags'); + }) + } + if (careerBucket) { + careerBucket.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'career_bucket'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + minPeerRank, 'min_peer_rank'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + peerRankField, 'peer_rank_field'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + suspiciousProfile, 'suspicious_profile'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + name, 'name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/multiplicators/researchers`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/webapp/src/app/api/api/news.service.ts b/webapp/src/app/api/api/news.service.ts index b789f410..fcd0aa27 100644 --- a/webapp/src/app/api/api/news.service.ts +++ b/webapp/src/app/api/api/news.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -30,1583 +24,765 @@ import { NewsArticleDetail } from '../model/newsArticleDetail'; import { NewsPage } from '../model/newsPage'; // @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 NewsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns news articles in which the given person is mentioned. - * @endpoint get /api/news/by-author - * @param authorId OpenAlex author id, e.g. A5034365278. - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param query Optional search term, matched against title/author. - * @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 getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getNewsByAuthor.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'authorId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); + /** + * Returns news articles in which the given person is mentioned. + * @endpoint get /api/news/by-author + * @param authorId OpenAlex author id, e.g. A5034365278. + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param query Optional search term, matched against title/author. + * @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 getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getNewsByAuthor.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'authorId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/news/by-author`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Returns news articles in which the given person is mentioned. - * @endpoint get /api/news/by-author - * @param authorId OpenAlex author id, e.g. A5034365278. - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param query Optional search term, matched against title/author. - * @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 getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getNewsByAuthor_1.', - ); - } + 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 localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'authorId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - 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/news/by-author`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a single news article including its full content. - * @endpoint get /api/news/{news_id} - * @param newsId The unique id of the news article (Elasticsearch _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 getNewsById( - newsId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsById( - newsId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById( - newsId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById( - newsId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (newsId === null || newsId === undefined) { - throw new Error( - 'Required parameter newsId was null or undefined when calling getNewsById.', - ); - } - - 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/news/${this.configuration.encodeParam({ name: 'newsId', value: newsId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a single news article including its full content. - * @endpoint get /api/news/{news_id} - * @param newsId The unique id of the news article (Elasticsearch _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 getNewsById_2( - newsId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsById_2( - newsId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById_2( - newsId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById_2( - newsId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (newsId === null || newsId === undefined) { - throw new Error( - 'Required parameter newsId was null or undefined when calling getNewsById_2.', - ); - } - - 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/news/${this.configuration.encodeParam({ name: 'newsId', value: newsId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches news articles by the keywords or matched topics of a keywords search. - * @endpoint get /api/news/keyword/search - * @param keywords Raw keywords to match against title/content. - * @param topicIds OpenAlex topic ids the keywords resolved to. - * @param filterTopicIds Additional topic ids to narrow the results by. - * @param fuzzy Search by resolved topics if True, otherwise by raw keywords. - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @param sortOrder Overrides relevance ranking with a date sort: \'desc\' (newest first) or \'asc\' (oldest first). - * @param title Narrows the results to articles whose title matches this text. - * @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 getNewsByKeywords( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsByKeywords( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByKeywords( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByKeywords( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', + let localVarPath = `/api/news/by-author`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topicIds', + + /** + * Returns news articles in which the given person is mentioned. + * @endpoint get /api/news/by-author + * @param authorId OpenAlex author id, e.g. A5034365278. + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param query Optional search term, matched against title/author. + * @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 getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getNewsByAuthor_1.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'authorId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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/news/by-author`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filterTopicIds', + + /** + * Returns a single news article including its full content. + * @endpoint get /api/news/{news_id} + * @param newsId The unique id of the news article (Elasticsearch _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 getNewsById(newsId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsById(newsId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById(newsId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById(newsId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (newsId === null || newsId === undefined) { + throw new Error('Required parameter newsId was null or undefined when calling getNewsById.'); + } + + 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/news/${this.configuration.encodeParam({name: "newsId", value: newsId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - - 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(); + /** + * Returns a single news article including its full content. + * @endpoint get /api/news/{news_id} + * @param newsId The unique id of the news article (Elasticsearch _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 getNewsById_2(newsId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsById_2(newsId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById_2(newsId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById_2(newsId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (newsId === null || newsId === undefined) { + throw new Error('Required parameter newsId was null or undefined when calling getNewsById_2.'); + } - 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/news/keyword/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - /** - * Searches news articles by the keywords or matched topics of a keywords search. - * @endpoint get /api/news/keyword/search - * @param keywords Raw keywords to match against title/content. - * @param topicIds OpenAlex topic ids the keywords resolved to. - * @param filterTopicIds Additional topic ids to narrow the results by. - * @param fuzzy Search by resolved topics if True, otherwise by raw keywords. - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @param sortOrder Overrides relevance ranking with a date sort: \'desc\' (newest first) or \'asc\' (oldest first). - * @param title Narrows the results to articles whose title matches this text. - * @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 getNewsByKeywords_3( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsByKeywords_3( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByKeywords_3( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByKeywords_3( - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fuzzy?: boolean, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - sortOrder?: string, - title?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', + 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/news/${this.configuration.encodeParam({name: "newsId", value: newsId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topicIds', + + /** + * Searches news articles by the keywords or matched topics of a keywords search. + * @endpoint get /api/news/keyword/search + * @param keywords Raw keywords to match against title/content. + * @param topicIds OpenAlex topic ids the keywords resolved to. + * @param filterTopicIds Additional topic ids to narrow the results by. + * @param fuzzy Search by resolved topics if True, otherwise by raw keywords. + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @param sortOrder Overrides relevance ranking with a date sort: \'desc\' (newest first) or \'asc\' (oldest first). + * @param title Narrows the results to articles whose title matches this text. + * @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 getNewsByKeywords(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsByKeywords(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByKeywords(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByKeywords(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topicIds'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filterTopicIds'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + + 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/news/keyword/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filterTopicIds', + + /** + * Searches news articles by the keywords or matched topics of a keywords search. + * @endpoint get /api/news/keyword/search + * @param keywords Raw keywords to match against title/content. + * @param topicIds OpenAlex topic ids the keywords resolved to. + * @param filterTopicIds Additional topic ids to narrow the results by. + * @param fuzzy Search by resolved topics if True, otherwise by raw keywords. + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @param sortOrder Overrides relevance ranking with a date sort: \'desc\' (newest first) or \'asc\' (oldest first). + * @param title Narrows the results to articles whose title matches this text. + * @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 getNewsByKeywords_3(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsByKeywords_3(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByKeywords_3(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByKeywords_3(keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fuzzy?: boolean, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, sortOrder?: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topicIds'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filterTopicIds'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + + 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/news/keyword/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - - 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(); + /** + * Returns a page of news articles, newest first. + * @endpoint get /api/news + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @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 listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/news/keyword/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Returns a page of news articles, newest first. + * @endpoint get /api/news + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @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 listNews_4(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listNews_4(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews_4(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews_4(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Returns a page of news articles, newest first. - * @endpoint get /api/news - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @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 listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Searches news articles by full text (full_content). + * @endpoint get /api/news/search + * @param query Search term, matched against the full text (full_content). + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @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 searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling searchNews.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/news`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Searches news articles by full text (full_content). + * @endpoint get /api/news/search + * @param query Search term, matched against the full text (full_content). + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @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 searchNews_5(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchNews_5(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews_5(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews_5(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling searchNews_5.'); + } - /** - * Returns a page of news articles, newest first. - * @endpoint get /api/news - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @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 listNews_4( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listNews_4( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews_4( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews_4( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/news`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches news articles by full text (full_content). - * @endpoint get /api/news/search - * @param query Search term, matched against the full text (full_content). - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @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 searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling searchNews.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - - 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/news/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches news articles by full text (full_content). - * @endpoint get /api/news/search - * @param query Search term, matched against the full text (full_content). - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @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 searchNews_5( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchNews_5( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews_5( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews_5( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling searchNews_5.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - - 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/news/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/organization.service.ts b/webapp/src/app/api/api/organization.service.ts index 1d3c7319..dc8496f0 100644 --- a/webapp/src/app/api/api/organization.service.ts +++ b/webapp/src/app/api/api/organization.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CreateOrganizationRequest } from '../model/createOrganizationRequest'; @@ -36,672 +30,355 @@ 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); - } - /** - * 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; - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpResponse - >; - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - createOrganizationRequest === null || - createOrganizationRequest === undefined - ) { - throw new Error( - 'Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * 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; + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (createOrganizationRequest === null || createOrganizationRequest === undefined) { + throw new Error('Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - // 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, - ); - } + 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( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createOrganizationRequest, - responseType: 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); + } - /** - * 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; - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (organizationId === null || organizationId === undefined) { - throw new Error( - 'Required parameter organizationId was null or undefined when calling deleteOrganisation.', - ); - } + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - let localVarHeaders = this.defaultHeaders; - - // 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( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: 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; - public getOrganisations( - page?: number, - pageSize?: number, - offset?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getOrganisations( - page?: number, - pageSize?: number, - offset?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - 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 { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - 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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Organization Institution Associations - * @endpoint get /api/organizations/institutions/associations - * @param institutionIds - * @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 getOrganizationInstitutionAssociations( - institutionIds: Array, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getOrganizationInstitutionAssociations( - institutionIds: Array, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getOrganizationInstitutionAssociations( - institutionIds: Array, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getOrganizationInstitutionAssociations( - institutionIds: Array, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (institutionIds === null || institutionIds === undefined) { - throw new Error( - 'Required parameter institutionIds was null or undefined when calling getOrganizationInstitutionAssociations.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + let localVarPath = `/api/organizations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createOrganizationRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * 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; + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (organizationId === null || organizationId === undefined) { + throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganisation.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/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('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * 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; + public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + 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 { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + offset, 'offset'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // 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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/organizations/institutions/associations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Get Organization Institution Associations + * @endpoint get /api/organizations/institutions/associations + * @param institutionIds + * @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 getOrganizationInstitutionAssociations(institutionIds: Array, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getOrganizationInstitutionAssociations(institutionIds: Array, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getOrganizationInstitutionAssociations(institutionIds: Array, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getOrganizationInstitutionAssociations(institutionIds: Array, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (institutionIds === null || institutionIds === undefined) { + throw new Error('Required parameter institutionIds was null or undefined when calling getOrganizationInstitutionAssociations.'); + } - /** - * 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; - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpResponse - >; - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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 localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + + 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/institutions/associations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * 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; + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + 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.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/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('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: updateOrganizationRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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( - 'put', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: updateOrganizationRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/patents.service.ts b/webapp/src/app/api/api/patents.service.ts index 1694be0b..c3f30c46 100644 --- a/webapp/src/app/api/api/patents.service.ts +++ b/webapp/src/app/api/api/patents.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AllPatentsResponse } from '../model/allPatentsResponse'; @@ -38,769 +32,396 @@ import { PatentsByInstitutionResponse } from '../model/patentsByInstitutionRespo import { RebuildResponse } from '../model/rebuildResponse'; // @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); - } - /** - * 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 yearFrom - * @param yearTo - * @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, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - search, - 'search', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - source, - 'source', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'year_from', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'year_to', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * 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 yearFrom + * @param yearTo + * @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, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + source, 'source'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'year_from'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'year_to'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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; + 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>; + 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>; + 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 { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getOrgPatentsByInstitution.'); + } - /** - * 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; - 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>; - 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>; - 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 { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getOrgPatentsByInstitution.', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + matchType, 'match_type'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - matchType, - 'match_type', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - source, - 'source', - ); + /** + * Get a single patent by identifier with optional title fallback. + * @endpoint get /api/inse-service/patents/{identifier} + * @param identifier + * @param prefix + * @param title + * @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, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (identifier === null || identifier === undefined) { + throw new Error('Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + prefix, 'prefix'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * 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; + public getPatentsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByAuthor(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getPatentsByAuthor.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - 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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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; + public getPatentsByInstitution(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByInstitution(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByInstitution(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getPatentsByInstitution.'); + } - /** - * Get a single patent by identifier with optional title fallback. - * @endpoint get /api/inse-service/patents/{identifier} - * @param identifier - * @param prefix - * @param title - * @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, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (identifier === null || identifier === undefined) { - throw new Error( - 'Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.', - ); + 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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - prefix, - 'prefix', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); + /** + * Trigger a background rebuild of the org_patents index for an institution. + * @endpoint post /api/inse-service/institutions/{id}/org-patents/rebuild + * @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 rebuildOrgPatents(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public rebuildOrgPatents(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public rebuildOrgPatents(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public rebuildOrgPatents(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling rebuildOrgPatents.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/org-patents/rebuild`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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; - public getPatentsByAuthor( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByAuthor( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByAuthor( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling 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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: 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; - public getPatentsByInstitution( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByInstitution( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByInstitution( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Trigger a background rebuild of the org_patents index for an institution. - * @endpoint post /api/inse-service/institutions/{id}/org-patents/rebuild - * @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 rebuildOrgPatents( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public rebuildOrgPatents( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public rebuildOrgPatents( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public rebuildOrgPatents( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling rebuildOrgPatents.', - ); - } - - 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/rebuild`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/persons.service.ts b/webapp/src/app/api/api/persons.service.ts index b8502f7c..c93ef075 100644 --- a/webapp/src/app/api/api/persons.service.ts +++ b/webapp/src/app/api/api/persons.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AuthorsListResponse } from '../model/authorsListResponse'; @@ -32,1449 +26,725 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { PersonBio } from '../model/personBio'; // @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 PersonsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Generates a bio for a person by author ID. - * @endpoint get /api/inse-service/persons/bio - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param 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 generatePersonBio( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public generatePersonBio( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public generatePersonBio( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public generatePersonBio( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling generatePersonBio.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'author_id', - ); + /** + * Generates a bio for a person by author ID. + * @endpoint get /api/inse-service/persons/bio + * @param authorId OpenAlex author ID (e.g., A5093075883) + * @param 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 generatePersonBio(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public generatePersonBio(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public generatePersonBio(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public generatePersonBio(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling generatePersonBio.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/inse-service/persons/bio`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Searches for person by ID. - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @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 getPersonByID( - id: string, - include?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPersonByID( - id: string, - include?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPersonByID( - id: string, - include?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPersonByID( - id: string, - include?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getPersonByID.', - ); - } + 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 localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - - 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/person/${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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for person by ID. - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @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 getPersonByID_1( - id: string, - include?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPersonByID_1( - id: string, - include?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPersonByID_1( - id: string, - include?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPersonByID_1( - id: string, - include?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getPersonByID_1.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - - 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/person/${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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for persons by ID or name. - * @endpoint get /api/inse-service/persons/search - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param query Search query (e.g., Arman AND Arzani) - * @param 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 searchPersons( - authorId?: string, - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersons( - authorId?: string, - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersons( - authorId?: string, - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersons( - authorId?: string, - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'author_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - 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/persons/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for person by name. - * @endpoint get /api/inse-service/persons/autocomplete - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @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 searchPersonsAutocomplete( - authorName: string, - include: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsAutocomplete( - authorName: string, - include: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsAutocomplete( - authorName: string, - include: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsAutocomplete( - authorName: string, - include: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorName === null || authorName === undefined) { - throw new Error( - 'Required parameter authorName was null or undefined when calling searchPersonsAutocomplete.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsAutocomplete.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorName, - 'author_name', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - - 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/persons/autocomplete`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for person by name. - * @endpoint get /api/inse-service/persons/autocomplete - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @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 searchPersonsAutocomplete_2( - authorName: string, - include: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsAutocomplete_2( - authorName: string, - include: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsAutocomplete_2( - authorName: string, - include: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsAutocomplete_2( - authorName: string, - include: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorName === null || authorName === undefined) { - throw new Error( - 'Required parameter authorName was null or undefined when calling searchPersonsAutocomplete_2.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsAutocomplete_2.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorName, - 'author_name', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - - 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/persons/autocomplete`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for person by name. - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - * @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 searchPersonsByName( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsByName( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByName( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByName( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorName === null || authorName === undefined) { - throw new Error( - 'Required parameter authorName was null or undefined when calling searchPersonsByName.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsByName.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorName, - 'author_name', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageOffset, - 'page_offset', - ); - - 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/persons/searchByName`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for person by name. - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - * @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 searchPersonsByName_3( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsByName_3( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByName_3( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByName_3( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorName === null || authorName === undefined) { - throw new Error( - 'Required parameter authorName was null or undefined when calling searchPersonsByName_3.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsByName_3.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorName, - 'author_name', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageOffset, - 'page_offset', - ); - - 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/persons/searchByName`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionId Filter by OpenAlex institution ID - * @param sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param yearFilterEnabled Apply the selected affiliation year rule - * @param filterMode Affiliation year filter mode - * @param filterYear Filter year - * @param filterYearTo Upper filter year for \'between\' - * @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 searchPersonsList( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsList( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - institutionId, - 'institutionId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sortBy', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', + let localVarPath = `/api/inse-service/persons/bio`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFilterEnabled, - 'yearFilterEnabled', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterMode, - 'filterMode', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterYear, - 'filterYear', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterYearTo, - 'filterYearTo', - ); - - 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(); + /** + * Searches for person by ID. + * @endpoint get /api/inse-service/person/{id} + * @param id OpenAlex author ID + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @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 getPersonByID(id: string, include?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPersonByID(id: string, include?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPersonByID(id: string, include?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPersonByID(id: string, include?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getPersonByID.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/inse-service/persons/search-list`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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 persons with advanced filters (Topic & Institution) and pagination. - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionId Filter by OpenAlex institution ID - * @param sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param yearFilterEnabled Apply the selected affiliation year rule - * @param filterMode Affiliation year filter mode - * @param filterYear Filter year - * @param filterYearTo Upper filter year for \'between\' - * @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 searchPersonsList_4( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsList_4( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList_4( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList_4( - query?: string, - institutionId?: string, - sortBy?: string, - sortOrder?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - yearFilterEnabled?: boolean, - filterMode?: 'in' | 'from' | 'between', - filterYear?: number, - filterYearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - institutionId, - 'institutionId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sortBy', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', + 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/person/${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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFilterEnabled, - 'yearFilterEnabled', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterMode, - 'filterMode', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterYear, - 'filterYear', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterYearTo, - 'filterYearTo', - ); - - 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(); + /** + * Searches for person by ID. + * @endpoint get /api/inse-service/person/{id} + * @param id OpenAlex author ID + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @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 getPersonByID_1(id: string, include?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPersonByID_1(id: string, include?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPersonByID_1(id: string, include?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPersonByID_1(id: string, include?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getPersonByID_1.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/person/${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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for persons by ID or name. + * @endpoint get /api/inse-service/persons/search + * @param authorId OpenAlex author ID (e.g., A5093075883) + * @param query Search query (e.g., Arman AND Arzani) + * @param 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 searchPersons(authorId?: string, query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersons(authorId?: string, query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersons(authorId?: string, query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersons(authorId?: string, query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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/persons/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for person by name. + * @endpoint get /api/inse-service/persons/autocomplete + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @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 searchPersonsAutocomplete(authorName: string, include: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsAutocomplete(authorName: string, include: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsAutocomplete(authorName: string, include: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsAutocomplete(authorName: string, include: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorName === null || authorName === undefined) { + throw new Error('Required parameter authorName was null or undefined when calling searchPersonsAutocomplete.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsAutocomplete.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorName, 'author_name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); + + 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/persons/autocomplete`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for person by name. + * @endpoint get /api/inse-service/persons/autocomplete + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @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 searchPersonsAutocomplete_2(authorName: string, include: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsAutocomplete_2(authorName: string, include: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsAutocomplete_2(authorName: string, include: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsAutocomplete_2(authorName: string, include: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorName === null || authorName === undefined) { + throw new Error('Required parameter authorName was null or undefined when calling searchPersonsAutocomplete_2.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsAutocomplete_2.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorName, 'author_name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); + + 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/persons/autocomplete`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for person by name. + * @endpoint get /api/inse-service/persons/searchByName + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + * @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 searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorName === null || authorName === undefined) { + throw new Error('Required parameter authorName was null or undefined when calling searchPersonsByName.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsByName.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorName, 'author_name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageOffset, 'page_offset'); + + 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/persons/searchByName`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for person by name. + * @endpoint get /api/inse-service/persons/searchByName + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + * @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 searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorName === null || authorName === undefined) { + throw new Error('Required parameter authorName was null or undefined when calling searchPersonsByName_3.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsByName_3.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorName, 'author_name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageOffset, 'page_offset'); + + 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/persons/searchByName`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for persons with advanced filters (Topic & Institution) and pagination. + * @endpoint get /api/inse-service/persons/search-list + * @param query Search query (e.g., Arman AND Arzani) + * @param institutionId Filter by OpenAlex institution ID + * @param sortBy Value to sort by + * @param sortOrder asc or desc? + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param yearFilterEnabled Apply the selected affiliation year rule + * @param filterMode Affiliation year filter mode + * @param filterYear Filter year + * @param filterYearTo Upper filter year for \'between\' + * @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 searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institutionId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFilterEnabled, 'yearFilterEnabled'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterMode, 'filterMode'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterYear, 'filterYear'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterYearTo, 'filterYearTo'); + + 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/persons/search-list`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for persons with advanced filters (Topic & Institution) and pagination. + * @endpoint get /api/inse-service/persons/search-list + * @param query Search query (e.g., Arman AND Arzani) + * @param institutionId Filter by OpenAlex institution ID + * @param sortBy Value to sort by + * @param sortOrder asc or desc? + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param yearFilterEnabled Apply the selected affiliation year rule + * @param filterMode Affiliation year filter mode + * @param filterYear Filter year + * @param filterYearTo Upper filter year for \'between\' + * @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 searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, 'institutionId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + include, 'include'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFilterEnabled, 'yearFilterEnabled'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterMode, 'filterMode'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterYear, 'filterYear'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterYearTo, 'filterYearTo'); + + 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/persons/search-list`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/persons/search-list`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/projects.service.ts b/webapp/src/app/api/api/projects.service.ts index 067765d2..938af152 100644 --- a/webapp/src/app/api/api/projects.service.ts +++ b/webapp/src/app/api/api/projects.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { BundProjectDetails } from '../model/bundProjectDetails'; @@ -54,2337 +48,1174 @@ import { ProjectsSortBy } from '../model/projectsSortBy'; import { SortDirection } from '../model/sortDirection'; // @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 ProjectsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Get DFG projects. - * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. - * @endpoint get /api/projects/dfg/search - * @param rawOaInstitutionId The openalex institution ID to filter by. - * @param authorId The openalex author ID to filter by. - * @param authorFilterIds The dfg author IDs to filter by. - * @param institutionIds The institution IDs to filter by. - * @param title The title to filter by. - * @param keywords Raw keywords to search in title/abstract/subject fields. - * @param topicIds The openalex topic IDs to filter by. - * @param filterTopicIds Additional topic IDs to merge into the fuzzy topic-id resolution (union with topic_ids). Only used when fuzzy=True. - * @param fundingStartYears The funding start years to filter by. - * @param fundingEndYears The funding end years to filter by. - * @param page The page number. - * @param size The page size. - * @param sortBy The field to sort by. - * @param sortDirection The sort direction (asc or desc). - * @param fuzzy Use topic_id resolution if True, otherwise use raw keyword search. - * @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 getDfgProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorFilterIds?: Array, - institutionIds?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDfgProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorFilterIds?: Array, - institutionIds?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorFilterIds?: Array, - institutionIds?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorFilterIds?: Array, - institutionIds?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'author_id', - ); - if (authorFilterIds) { - authorFilterIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_filter_ids', + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get DFG projects. + * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/dfg/search + * @param rawOaInstitutionId The openalex institution ID to filter by. + * @param authorId The openalex author ID to filter by. + * @param authorFilterIds The dfg author IDs to filter by. + * @param institutionIds The institution IDs to filter by. + * @param title The title to filter by. + * @param keywords Raw keywords to search in title/abstract/subject fields. + * @param topicIds The openalex topic IDs to filter by. + * @param filterTopicIds Additional topic IDs to merge into the fuzzy topic-id resolution (union with topic_ids). Only used when fuzzy=True. + * @param fundingStartYears The funding start years to filter by. + * @param fundingEndYears The funding end years to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param fuzzy Use topic_id resolution if True, otherwise use raw keyword search. + * @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 getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); + if (authorFilterIds) { + authorFilterIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_filter_ids'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filter_topic_ids'); + }) + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_start_years'); + }) + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_end_years'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + + 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/projects/dfg/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + + /** + * Returns EU CORDIS organizations based on a search term. + * @endpoint get /api/eu/organizations/autocomplete/selector + * @param query Search term for organization autocomplete. + * @param page + * @param size + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, '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/eu/organizations/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', + + /** + * Returns EU CORDIS organizations by organisation IDs. + * @endpoint get /api/eu/organizations/ids + * @param organizationIds CORDIS organisation IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuOrganizationsByIds(organizationIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getEuOrganizationsByIds(organizationIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuOrganizationsByIds(organizationIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuOrganizationsByIds(organizationIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (organizationIds) { + organizationIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'organization_ids'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/eu/organizations/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', + + /** + * Get funding over time for bund projects. + * Returns the funding over time for BUND projects. Accepts the same filters as /bund/search, so the funding total can be made to match whatever the results table is currently filtered to. + * @endpoint get /api/projects/institution/bund/funding-over-time + * @param rawOaInstitutionId The institution ID to filter by. + * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. + * @param fundingArts Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @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 getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + if (executingAgency) { + executingAgency.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'executing_agency'); + }) + } + if (fundingArts) { + fundingArts.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_arts'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filter_topic_ids'); + }) + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_start_years'); + }) + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_end_years'); + }) + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'countries'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/bund/funding-over-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filter_topic_ids', + + /** + * Get funding over time for EU projects. + * Returns the funding over time for EU CORDIS projects. Accepts the same filters as /eu/search, so the funding total can be made to match whatever the results table is currently filtered to. + * @endpoint get /api/projects/institution/eu/funding-over-time + * @param rawOaInstitutionId OpenAlex institution ID to filter by. + * @param authorId OpenAlex author ID to filter by. + * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. + * @param organizationIds CORDIS organisation IDs. All selected organizations must match. + * @param organizationNames CORDIS organization names. All selected organizations must match. + * @param projectTypes Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param frameworkProgrammes Framework programme filters. + * @param fundingSchemes Funding scheme filters. + * @param statuses Project status filters. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @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 getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + if (organizationIds) { + organizationIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'organization_ids'); + }) + } + if (organizationNames) { + organizationNames.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'organization_names'); + }) + } + if (projectTypes) { + projectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'project_types'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filter_topic_ids'); + }) + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_start_years'); + }) + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_end_years'); + }) + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'countries'); + }) + } + if (frameworkProgrammes) { + frameworkProgrammes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'framework_programmes'); + }) + } + if (fundingSchemes) { + fundingSchemes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_schemes'); + }) + } + if (statuses) { + statuses.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'statuses'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/eu/funding-over-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_start_years', + + /** + * Get a single BUND project. + * Returns a single BUND project based on its ID. + * @endpoint get /api/projects/bund/{id} + * @param id The ID of the BUND project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleBundProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSingleBundProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleBundProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleBundProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getSingleBundProject.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_end_years', + + /** + * Get a single DFG project. + * Returns a single DFG project based on its ID. + * @endpoint get /api/projects/dfg/{id} + * @param id The ID of the DFG project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleDfgProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSingleDfgProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleDfgProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleDfgProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getSingleDfgProject.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/dfg/${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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - - 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(); + /** + * Get a single EU Cordis project. + * Returns a single EU Cordis project based on its ID. + * @endpoint get /api/projects/eu/{id} + * @param id The ID of the EU Cordis project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleEuCordisProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSingleEuCordisProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleEuCordisProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleEuCordisProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getSingleEuCordisProject.'); + } - 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/projects/dfg/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - /** - * Returns EU CORDIS organizations based on a search term. - * @endpoint get /api/eu/organizations/autocomplete/selector - * @param query Search term for organization autocomplete. - * @param page - * @param size - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEuOrganizationAutocompleteForSelector( - query?: string, - page?: number, - size?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getEuOrganizationAutocompleteForSelector( - query?: string, - page?: number, - size?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getEuOrganizationAutocompleteForSelector( - query?: string, - page?: number, - size?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getEuOrganizationAutocompleteForSelector( - query?: string, - page?: number, - size?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - '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, - ); - } + 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 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/eu/organizations/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns EU CORDIS organizations by organisation IDs. - * @endpoint get /api/eu/organizations/ids - * @param organizationIds CORDIS organisation IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEuOrganizationsByIds( - organizationIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getEuOrganizationsByIds( - organizationIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getEuOrganizationsByIds( - organizationIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getEuOrganizationsByIds( - organizationIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (organizationIds) { - organizationIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'organization_ids', + let localVarPath = `/api/projects/eu/${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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Get bund projects. + * Returns a page of bund projects based on the provided pagination parameters and optional institution filter. + * @endpoint post /api/projects/institution/bund/search + * @param projectsFilteringProperties + * @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 searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (projectsFilteringProperties === null || projectsFilteringProperties === undefined) { + throw new Error('Required parameter projectsFilteringProperties was null or undefined when calling searchBundProjects.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/eu/organizations/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Get funding over time for bund projects. - * Returns the funding over time for BUND projects. Accepts the same filters as /bund/search, so the funding total can be made to match whatever the results table is currently filtered to. - * @endpoint get /api/projects/institution/bund/funding-over-time - * @param rawOaInstitutionId The institution ID to filter by. - * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. - * @param fundingArts Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @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 getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId?: string, - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - fuzzy?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId?: string, - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - fuzzy?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId?: string, - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - fuzzy?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId?: string, - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - fuzzy?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - if (executingAgency) { - executingAgency.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'executing_agency', + // 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/projects/institution/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: projectsFilteringProperties, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (fundingArts) { - fundingArts.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_arts', + + /** + * Search BUND projects. + * Returns a page of BUND project summaries. + * @endpoint get /api/projects/bund/search + * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. + * @param fundingArts Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param rawOaInstitutionId The ID of the institution to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy Sort field. + * @param sortDirection Sort direction: asc or desc. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @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 searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (executingAgency) { + executingAgency.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'executing_agency'); + }) + } + if (fundingArts) { + fundingArts.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_arts'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filter_topic_ids'); + }) + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_start_years'); + }) + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_end_years'); + }) + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'countries'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + + 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/projects/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', + + /** + * Search EU CORDIS projects. + * Returns a page of EU CORDIS project summaries across FP7, Horizon 2020 and Horizon Europe. Single entry point for EU CORDIS project search: filter by institution, author(s), organization, OpenAlex topic, programme, funding scheme, status, funding years and/or country, in any combination. + * @endpoint get /api/projects/eu/search + * @param rawOaInstitutionId OpenAlex institution ID to filter by. + * @param authorId OpenAlex author ID to filter by. + * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. + * @param organizationIds CORDIS organisation IDs. All selected organizations must match. + * @param organizationNames CORDIS organization names. All selected organizations must match. + * @param projectTypes Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param frameworkProgrammes Framework programme filters. + * @param fundingSchemes Funding scheme filters. + * @param statuses Project status filters. + * @param page The page number. + * @param size The page size. + * @param sortBy Sort field. + * @param sortDirection Sort direction: asc or desc. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @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 searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + if (organizationIds) { + organizationIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'organization_ids'); + }) + } + if (organizationNames) { + organizationNames.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'organization_names'); + }) + } + if (projectTypes) { + projectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'project_types'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filter_topic_ids'); + }) + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_start_years'); + }) + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_end_years'); + }) + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'countries'); + }) + } + if (frameworkProgrammes) { + frameworkProgrammes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'framework_programmes'); + }) + } + if (fundingSchemes) { + fundingSchemes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'funding_schemes'); + }) + } + if (statuses) { + statuses.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'statuses'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + + 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/projects/eu/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', + + /** + * Search projects across all funders. + * Returns a page of projects across all funders based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/search + * @param page The page number. + * @param size The page size. + * @param selectedProjectTypes The set of project types to filter by (e.g., \'bund\', \'eu\', \'dfg\'). If not provided, projects of all types will be included. + * @param title The title to filter by. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (selectedProjectTypes) { + selectedProjectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'selected_project_types'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filter_topic_ids', - ); - }); - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_start_years', - ); - }); - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_end_years', - ); - }); - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'countries', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/bund/funding-over-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get funding over time for EU projects. - * Returns the funding over time for EU CORDIS projects. Accepts the same filters as /eu/search, so the funding total can be made to match whatever the results table is currently filtered to. - * @endpoint get /api/projects/institution/eu/funding-over-time - * @param rawOaInstitutionId OpenAlex institution ID to filter by. - * @param authorId OpenAlex author ID to filter by. - * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. - * @param organizationIds CORDIS organisation IDs. All selected organizations must match. - * @param organizationNames CORDIS organization names. All selected organizations must match. - * @param projectTypes Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param frameworkProgrammes Framework programme filters. - * @param fundingSchemes Funding scheme filters. - * @param statuses Project status filters. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @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 getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - fuzzy?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - fuzzy?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - fuzzy?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - fuzzy?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'author_id', - ); - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', - ); - }); - } - if (organizationIds) { - organizationIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'organization_ids', - ); - }); - } - if (organizationNames) { - organizationNames.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'organization_names', - ); - }); - } - if (projectTypes) { - projectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'project_types', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', - ); - }); - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filter_topic_ids', - ); - }); - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_start_years', - ); - }); - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_end_years', - ); - }); - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'countries', - ); - }); - } - if (frameworkProgrammes) { - frameworkProgrammes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'framework_programmes', - ); - }); - } - if (fundingSchemes) { - fundingSchemes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_schemes', - ); - }); - } - if (statuses) { - statuses.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'statuses', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/eu/funding-over-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get a single BUND project. - * Returns a single BUND project based on its ID. - * @endpoint get /api/projects/bund/{id} - * @param id The ID of the BUND project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleBundProject( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSingleBundProject( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleBundProject( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleBundProject( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getSingleBundProject.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get a single DFG project. - * Returns a single DFG project based on its ID. - * @endpoint get /api/projects/dfg/{id} - * @param id The ID of the DFG project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleDfgProject( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSingleDfgProject( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleDfgProject( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleDfgProject( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getSingleDfgProject.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/dfg/${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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get a single EU Cordis project. - * Returns a single EU Cordis project based on its ID. - * @endpoint get /api/projects/eu/{id} - * @param id The ID of the EU Cordis project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleEuCordisProject( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSingleEuCordisProject( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleEuCordisProject( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleEuCordisProject( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getSingleEuCordisProject.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/eu/${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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get bund projects. - * Returns a page of bund projects based on the provided pagination parameters and optional institution filter. - * @endpoint post /api/projects/institution/bund/search - * @param projectsFilteringProperties - * @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 searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - projectsFilteringProperties === null || - projectsFilteringProperties === undefined - ) { - throw new Error( - 'Required parameter projectsFilteringProperties was null or undefined when calling searchBundProjects.', - ); - } - - 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/projects/institution/bund/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: projectsFilteringProperties, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Search BUND projects. - * Returns a page of BUND project summaries. - * @endpoint get /api/projects/bund/search - * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. - * @param fundingArts Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param rawOaInstitutionId The ID of the institution to filter by. - * @param page The page number. - * @param size The page size. - * @param sortBy Sort field. - * @param sortDirection Sort direction: asc or desc. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @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 searchBundProjectsWithFilters( - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - rawOaInstitutionId?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchBundProjectsWithFilters( - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - rawOaInstitutionId?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchBundProjectsWithFilters( - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - rawOaInstitutionId?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchBundProjectsWithFilters( - executingAgency?: Array, - fundingArts?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - rawOaInstitutionId?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (executingAgency) { - executingAgency.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'executing_agency', - ); - }); - } - if (fundingArts) { - fundingArts.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_arts', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', - ); - }); - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filter_topic_ids', - ); - }); - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_start_years', - ); - }); - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_end_years', - ); - }); - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'countries', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - - 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/projects/bund/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Search EU CORDIS projects. - * Returns a page of EU CORDIS project summaries across FP7, Horizon 2020 and Horizon Europe. Single entry point for EU CORDIS project search: filter by institution, author(s), organization, OpenAlex topic, programme, funding scheme, status, funding years and/or country, in any combination. - * @endpoint get /api/projects/eu/search - * @param rawOaInstitutionId OpenAlex institution ID to filter by. - * @param authorId OpenAlex author ID to filter by. - * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. - * @param organizationIds CORDIS organisation IDs. All selected organizations must match. - * @param organizationNames CORDIS organization names. All selected organizations must match. - * @param projectTypes Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param frameworkProgrammes Framework programme filters. - * @param fundingSchemes Funding scheme filters. - * @param statuses Project status filters. - * @param page The page number. - * @param size The page size. - * @param sortBy Sort field. - * @param sortDirection Sort direction: asc or desc. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @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 searchEuCordisProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchEuCordisProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchEuCordisProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchEuCordisProjects( - rawOaInstitutionId?: string, - authorId?: string, - authorIds?: Array, - organizationIds?: Array, - organizationNames?: Array, - projectTypes?: Array, - title?: string, - keywords?: Array, - topicIds?: Array, - filterTopicIds?: Array, - fundingStartYears?: Array, - fundingEndYears?: Array, - countries?: Array, - frameworkProgrammes?: Array, - fundingSchemes?: Array, - statuses?: Array, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - fuzzy?: boolean, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'author_id', - ); - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', - ); - }); - } - if (organizationIds) { - organizationIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'organization_ids', - ); - }); - } - if (organizationNames) { - organizationNames.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'organization_names', - ); - }); - } - if (projectTypes) { - projectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'project_types', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', - ); - }); - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filter_topic_ids', - ); - }); - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_start_years', - ); - }); - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_end_years', - ); - }); - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'countries', - ); - }); - } - if (frameworkProgrammes) { - frameworkProgrammes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'framework_programmes', - ); - }); - } - if (fundingSchemes) { - fundingSchemes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'funding_schemes', - ); - }); - } - if (statuses) { - statuses.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'statuses', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - - 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/projects/eu/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Search projects across all funders. - * Returns a page of projects across all funders based on the provided pagination parameters and optional institution filter. - * @endpoint get /api/projects/search - * @param page The page number. - * @param size The page size. - * @param selectedProjectTypes The set of project types to filter by (e.g., \'bund\', \'eu\', \'dfg\'). If not provided, projects of all types will be included. - * @param title The title to filter by. - * @param sortBy The field to sort by. - * @param sortDirection The sort direction (asc or desc). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - if (selectedProjectTypes) { - selectedProjectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'selected_project_types', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/ranking.service.ts b/webapp/src/app/api/api/ranking.service.ts index 3d3bbea6..245dca7a 100644 --- a/webapp/src/app/api/api/ranking.service.ts +++ b/webapp/src/app/api/api/ranking.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AuthorMetricsRequest } from '../model/authorMetricsRequest'; @@ -48,758 +42,422 @@ import { RankedAuthor } from '../model/rankedAuthor'; import { SelectedAuthorsRequest } from '../model/selectedAuthorsRequest'; // @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 RankingService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Orientation Profiles - * Compare orientation scores for active members of the account institution. - * @endpoint post /api/rank/orientation-profiles - * @param authorOrientationProfilesRequest - * @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 orientationProfilesApiRankOrientationProfilesPost( - authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public orientationProfilesApiRankOrientationProfilesPost( - authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public orientationProfilesApiRankOrientationProfilesPost( - authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public orientationProfilesApiRankOrientationProfilesPost( - authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - authorOrientationProfilesRequest === null || - authorOrientationProfilesRequest === undefined - ) { - throw new Error( - 'Required parameter authorOrientationProfilesRequest was null or undefined when calling orientationProfilesApiRankOrientationProfilesPost.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Orientation Profiles + * Compare orientation scores for active members of the account institution. + * @endpoint post /api/rank/orientation-profiles + * @param authorOrientationProfilesRequest + * @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 orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorOrientationProfilesRequest === null || authorOrientationProfilesRequest === undefined) { + throw new Error('Required parameter authorOrientationProfilesRequest was null or undefined when calling orientationProfilesApiRankOrientationProfilesPost.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/rank/orientation-profiles`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: authorOrientationProfilesRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Publication Type Counts + * @endpoint post /api/rank/publication-type-counts + * @param publicationTypeCountsRequest + * @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 publicationTypeCountsApiRankPublicationTypeCountsPost(publicationTypeCountsRequest: PublicationTypeCountsRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public publicationTypeCountsApiRankPublicationTypeCountsPost(publicationTypeCountsRequest: PublicationTypeCountsRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public publicationTypeCountsApiRankPublicationTypeCountsPost(publicationTypeCountsRequest: PublicationTypeCountsRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public publicationTypeCountsApiRankPublicationTypeCountsPost(publicationTypeCountsRequest: PublicationTypeCountsRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (publicationTypeCountsRequest === null || publicationTypeCountsRequest === undefined) { + throw new Error('Required parameter publicationTypeCountsRequest was null or undefined when calling publicationTypeCountsApiRankPublicationTypeCountsPost.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/rank/publication-type-counts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: publicationTypeCountsRequest, + responseType: 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'; - } + /** + * Rank Author + * @endpoint post /api/rank/rank-author + * @param keywordToAuthorRequest + * @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 rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (keywordToAuthorRequest === null || keywordToAuthorRequest === undefined) { + throw new Error('Required parameter keywordToAuthorRequest was null or undefined when calling rankAuthorApiRankRankAuthorPost.'); + } + + 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/rank/rank-author`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: keywordToAuthorRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/rank/orientation-profiles`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: authorOrientationProfilesRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Static Stats + * @endpoint post /api/rank/static-stats + * @param authorMetricsRequest + * @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 staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorMetricsRequest === null || authorMetricsRequest === undefined) { + throw new Error('Required parameter authorMetricsRequest was null or undefined when calling staticStatsApiRankStaticStatsPost.'); + } - /** - * Publication Type Counts - * @endpoint post /api/rank/publication-type-counts - * @param publicationTypeCountsRequest - * @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 publicationTypeCountsApiRankPublicationTypeCountsPost( - publicationTypeCountsRequest: PublicationTypeCountsRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public publicationTypeCountsApiRankPublicationTypeCountsPost( - publicationTypeCountsRequest: PublicationTypeCountsRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public publicationTypeCountsApiRankPublicationTypeCountsPost( - publicationTypeCountsRequest: PublicationTypeCountsRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public publicationTypeCountsApiRankPublicationTypeCountsPost( - publicationTypeCountsRequest: PublicationTypeCountsRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - publicationTypeCountsRequest === null || - publicationTypeCountsRequest === undefined - ) { - throw new Error( - 'Required parameter publicationTypeCountsRequest was null or undefined when calling publicationTypeCountsApiRankPublicationTypeCountsPost.', - ); + 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/rank/static-stats`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: authorMetricsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Topic Profile + * @endpoint post /api/rank/topic-profile + * @param selectedAuthorsRequest + * @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 topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (selectedAuthorsRequest === null || selectedAuthorsRequest === undefined) { + throw new Error('Required parameter selectedAuthorsRequest was null or undefined when calling topicProfileApiRankTopicProfilePost.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + 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/rank/topic-profile`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: selectedAuthorsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Topic Stats + * @endpoint post /api/rank/topic-stats + * @param selectedAuthorsRequest + * @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 topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (selectedAuthorsRequest === null || selectedAuthorsRequest === undefined) { + throw new Error('Required parameter selectedAuthorsRequest was null or undefined when calling topicStatsApiRankTopicStatsPost.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + 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/rank/topic-stats`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: selectedAuthorsRequest, + responseType: 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/rank/publication-type-counts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: publicationTypeCountsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Rank Author - * @endpoint post /api/rank/rank-author - * @param keywordToAuthorRequest - * @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 rankAuthorApiRankRankAuthorPost( - keywordToAuthorRequest: KeywordToAuthorRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public rankAuthorApiRankRankAuthorPost( - keywordToAuthorRequest: KeywordToAuthorRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public rankAuthorApiRankRankAuthorPost( - keywordToAuthorRequest: KeywordToAuthorRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public rankAuthorApiRankRankAuthorPost( - keywordToAuthorRequest: KeywordToAuthorRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - keywordToAuthorRequest === null || - keywordToAuthorRequest === undefined - ) { - throw new Error( - 'Required parameter keywordToAuthorRequest was null or undefined when calling rankAuthorApiRankRankAuthorPost.', - ); - } - - 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/rank/rank-author`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: keywordToAuthorRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Static Stats - * @endpoint post /api/rank/static-stats - * @param authorMetricsRequest - * @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 staticStatsApiRankStaticStatsPost( - authorMetricsRequest: AuthorMetricsRequest, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public staticStatsApiRankStaticStatsPost( - authorMetricsRequest: AuthorMetricsRequest, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public staticStatsApiRankStaticStatsPost( - authorMetricsRequest: AuthorMetricsRequest, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public staticStatsApiRankStaticStatsPost( - authorMetricsRequest: AuthorMetricsRequest, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorMetricsRequest === null || authorMetricsRequest === undefined) { - throw new Error( - 'Required parameter authorMetricsRequest was null or undefined when calling staticStatsApiRankStaticStatsPost.', - ); - } - - 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/rank/static-stats`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: authorMetricsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Topic Profile - * @endpoint post /api/rank/topic-profile - * @param selectedAuthorsRequest - * @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 topicProfileApiRankTopicProfilePost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public topicProfileApiRankTopicProfilePost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public topicProfileApiRankTopicProfilePost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public topicProfileApiRankTopicProfilePost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - selectedAuthorsRequest === null || - selectedAuthorsRequest === undefined - ) { - throw new Error( - 'Required parameter selectedAuthorsRequest was null or undefined when calling topicProfileApiRankTopicProfilePost.', - ); - } - - 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/rank/topic-profile`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: selectedAuthorsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Topic Stats - * @endpoint post /api/rank/topic-stats - * @param selectedAuthorsRequest - * @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 topicStatsApiRankTopicStatsPost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public topicStatsApiRankTopicStatsPost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public topicStatsApiRankTopicStatsPost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public topicStatsApiRankTopicStatsPost( - selectedAuthorsRequest: SelectedAuthorsRequest, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - selectedAuthorsRequest === null || - selectedAuthorsRequest === undefined - ) { - throw new Error( - 'Required parameter selectedAuthorsRequest was null or undefined when calling topicStatsApiRankTopicStatsPost.', - ); - } - - 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/rank/topic-stats`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: selectedAuthorsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/topics.service.ts b/webapp/src/app/api/api/topics.service.ts index 818e7d38..0d4285f3 100644 --- a/webapp/src/app/api/api/topics.service.ts +++ b/webapp/src/app/api/api/topics.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AutocompleteResponse } from '../model/autocompleteResponse'; @@ -34,610 +28,309 @@ import { KeywordsTopicsResponse } from '../model/keywordsTopicsResponse'; import { TopicsListResponse } from '../model/topicsListResponse'; // @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 TopicsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns topic options for autocomplete inputs. - * @endpoint get /api/topics/autocomplete - * @param query Topic search text, for example \'machine learning\'. - * @param domainId Optional OpenAlex domain id filter. - * @param fieldId Optional OpenAlex field id filter. - * @param subfieldId Optional OpenAlex subfield id filter. - * @param limit Maximum number of autocomplete options. - * @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 autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling autocompleteTopics.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - domainId, - 'domainId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fieldId, - 'fieldId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - subfieldId, - 'subfieldId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); + /** + * Returns topic options for autocomplete inputs. + * @endpoint get /api/topics/autocomplete + * @param query Topic search text, for example \'machine learning\'. + * @param domainId Optional OpenAlex domain id filter. + * @param fieldId Optional OpenAlex field id filter. + * @param subfieldId Optional OpenAlex subfield id filter. + * @param limit Maximum number of autocomplete options. + * @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 autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling autocompleteTopics.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + domainId, 'domainId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fieldId, 'fieldId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + subfieldId, 'subfieldId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/autocomplete`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a list of OpenAlex topics. + * @endpoint get /api/topics + * @param search Full-text search, for example \'machine learning\'. + * @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'. + * @param sort Sort field, for example \'works_count:desc\'. + * @param groupBy OpenAlex group_by field, for example \'domain.id\'. + * @param perPage Results per page. + * @param page Page number. Use cursor for deep pagination. + * @param cursor Cursor pagination token. Use \'*\' to start. + * @param sample Random sample size. Cannot be combined with sort or page. + * @param select Comma-separated fields to return. + * @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 listTopics(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; + public listTopics(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>; + public listTopics(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>; + public listTopics(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 { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filter, 'filter'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sort, 'sort'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + groupBy, 'group_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + perPage, 'per_page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + cursor, 'cursor'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sample, 'sample'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + select, 'select'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/topics/autocomplete`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Semantic / vector search for topics using a keyword/sentence. + * @endpoint get /api/topics/vector-search + * @param query Word or sentence to search by similarity. + * @param limit Maximum number of topics to return. + * @param searchType Search approach: \'hybrid\' or \'semantic\'. + * @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 vectorSearchTopics(query: string, limit?: number, searchType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling vectorSearchTopics.'); + } - /** - * Returns a list of OpenAlex topics. - * @endpoint get /api/topics - * @param search Full-text search, for example \'machine learning\'. - * @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'domain.id\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - * @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 listTopics( - 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; - public listTopics( - 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>; - public listTopics( - 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>; - public listTopics( - 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 { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - search, - 'search', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filter, - 'filter', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sort, - 'sort', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - groupBy, - 'group_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - perPage, - 'per_page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - cursor, - 'cursor', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sample, - 'sample', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - select, - 'select', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'searchType'); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/vector-search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Batch semantic / vector search for multiple keywords. + * @endpoint post /api/topics/vector-search/batch + * @param keywordsTopicsRequest + * @param searchType Search approach: \'hybrid\' or \'semantic\'. + * @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 vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (keywordsTopicsRequest === null || keywordsTopicsRequest === undefined) { + throw new Error('Required parameter keywordsTopicsRequest was null or undefined when calling vectorSearchTopicsBatch.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'searchType'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // 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/topics/vector-search/batch`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: keywordsTopicsRequest, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Semantic / vector search for topics using a keyword/sentence. - * @endpoint get /api/topics/vector-search - * @param query Word or sentence to search by similarity. - * @param limit Maximum number of topics to return. - * @param searchType Search approach: \'hybrid\' or \'semantic\'. - * @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 vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling vectorSearchTopics.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'searchType', - ); - - 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/topics/vector-search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Batch semantic / vector search for multiple keywords. - * @endpoint post /api/topics/vector-search/batch - * @param keywordsTopicsRequest - * @param searchType Search approach: \'hybrid\' or \'semantic\'. - * @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 vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (keywordsTopicsRequest === null || keywordsTopicsRequest === undefined) { - throw new Error( - 'Required parameter keywordsTopicsRequest was null or undefined when calling vectorSearchTopicsBatch.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'searchType', - ); - - 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/topics/vector-search/batch`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: keywordsTopicsRequest, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/topicsV2.service.ts b/webapp/src/app/api/api/topicsV2.service.ts index 2dc07831..a35c56e7 100644 --- a/webapp/src/app/api/api/topicsV2.service.ts +++ b/webapp/src/app/api/api/topicsV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { Domain } from '../model/domain'; @@ -42,870 +36,477 @@ import { TopicPageV2 } from '../model/topicPageV2'; import { TopicSortBy } from '../model/topicSortBy'; // @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 TopicsV2Service extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a paginated list of topics for a given search term based on their display name. - * @endpoint get /api/topics/v2/autocomplete/selector - * @param query A search term to filter topics by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public autocompleteTopicsForSelector( - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public autocompleteTopicsForSelector( - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteTopicsForSelector( - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteTopicsForSelector( - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a paginated list of topics for a given search term based on their display name. + * @endpoint get /api/topics/v2/autocomplete/selector + * @param query A search term to filter topics by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public autocompleteTopicsForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public autocompleteTopicsForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteTopicsForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteTopicsForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + let localVarHeaders = this.defaultHeaders; - let localVarPath = `/api/topics/v2/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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 domain for a given domain ID. - * @endpoint get /api/topics/v2/domains/single/{domain_id} - * @param domainId The ID of the domain to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDomainById( - domainId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDomainById( - domainId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDomainById( - domainId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDomainById( - domainId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (domainId === null || domainId === undefined) { - throw new Error( - 'Required parameter domainId was null or undefined when calling getDomainById.', - ); - } + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/topics/v2/domains/single/${this.configuration.encodeParam({ name: 'domainId', value: domainId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a field for a given field ID. - * @endpoint get /api/topics/v2/fields/single/{field_id} - * @param fieldId The ID of the field to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFieldById( - fieldId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getFieldById( - fieldId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getFieldById( - fieldId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getFieldById( - fieldId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (fieldId === null || fieldId === undefined) { - throw new Error( - 'Required parameter fieldId was null or undefined when calling getFieldById.', - ); - } - - 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/topics/v2/fields/single/${this.configuration.encodeParam({ name: 'fieldId', value: fieldId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a subfield for a given subfield ID. - * @endpoint get /api/topics/v2/subfields/single/{subfield_id} - * @param subfieldId The ID of the subfield to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSubfieldById( - subfieldId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSubfieldById( - subfieldId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSubfieldById( - subfieldId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSubfieldById( - subfieldId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (subfieldId === null || subfieldId === undefined) { - throw new Error( - 'Required parameter subfieldId was null or undefined when calling getSubfieldById.', - ); - } - - 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/topics/v2/subfields/single/${this.configuration.encodeParam({ name: 'subfieldId', value: subfieldId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a topic for a given topic ID. - * @endpoint get /api/topics/v2/single/{raw_oa_topic_id} - * @param rawOaTopicId The ID of the topic to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicById( - rawOaTopicId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopicById( - rawOaTopicId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicById( - rawOaTopicId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicById( - rawOaTopicId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaTopicId === null || rawOaTopicId === undefined) { - throw new Error( - 'Required parameter rawOaTopicId was null or undefined when calling getTopicById.', - ); - } - - 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/topics/v2/single/${this.configuration.encodeParam({ name: 'rawOaTopicId', value: rawOaTopicId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns the full topic hierarchy tree (Domain -> Field -> Subfield -> Topics). - * @endpoint get /api/topics/v2/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; - public getTopicHierarchy( - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicHierarchy( - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicHierarchy( - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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/topics/v2/hierarchy`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a paginated list of topics for a given list of topic IDs. - * @endpoint get /api/topics/v2/topics/id - * @param topicIds A list of topic IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicsByIds( - topicIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopicsByIds( - topicIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicsByIds( - topicIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicsByIds( - topicIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', + let localVarPath = `/api/topics/v2/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns a domain for a given domain ID. + * @endpoint get /api/topics/v2/domains/single/{domain_id} + * @param domainId The ID of the domain to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDomainById(domainId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDomainById(domainId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDomainById(domainId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDomainById(domainId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (domainId === null || domainId === undefined) { + throw new Error('Required parameter domainId was null or undefined when calling getDomainById.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/v2/domains/single/${this.configuration.encodeParam({name: "domainId", value: domainId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a field for a given field ID. + * @endpoint get /api/topics/v2/fields/single/{field_id} + * @param fieldId The ID of the field to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFieldById(fieldId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getFieldById(fieldId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFieldById(fieldId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFieldById(fieldId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (fieldId === null || fieldId === undefined) { + throw new Error('Required parameter fieldId was null or undefined when calling getFieldById.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/v2/fields/single/${this.configuration.encodeParam({name: "fieldId", value: fieldId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/topics/v2/topics/id`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Returns a subfield for a given subfield ID. + * @endpoint get /api/topics/v2/subfields/single/{subfield_id} + * @param subfieldId The ID of the subfield to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSubfieldById(subfieldId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSubfieldById(subfieldId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSubfieldById(subfieldId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSubfieldById(subfieldId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (subfieldId === null || subfieldId === undefined) { + throw new Error('Required parameter subfieldId was null or undefined when calling getSubfieldById.'); + } - /** - * Searches for topics based on the provided criteria. - * @endpoint get /api/topics/v2/search - * @param searchTerm The term to search for in topic display names. - * @param page The page number to retrieve. - * @param size The number of topics to retrieve per page. - * @param sortBy The field to sort by. - * @param sortDirection The direction to sort. - * @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 searchTopics( - searchTerm?: string, - page?: number, - size?: number, - sortBy?: TopicSortBy, - sortDirection?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchTopics( - searchTerm?: string, - page?: number, - size?: number, - sortBy?: TopicSortBy, - sortDirection?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchTopics( - searchTerm?: string, - page?: number, - size?: number, - sortBy?: TopicSortBy, - sortDirection?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchTopics( - searchTerm?: string, - page?: number, - size?: number, - sortBy?: TopicSortBy, - sortDirection?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchTerm, - 'search_term', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/v2/subfields/single/${this.configuration.encodeParam({name: "subfieldId", value: subfieldId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a topic for a given topic ID. + * @endpoint get /api/topics/v2/single/{raw_oa_topic_id} + * @param rawOaTopicId The ID of the topic to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicById(rawOaTopicId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicById(rawOaTopicId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicById(rawOaTopicId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicById(rawOaTopicId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaTopicId === null || rawOaTopicId === undefined) { + throw new Error('Required parameter rawOaTopicId was null or undefined when calling getTopicById.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/v2/single/${this.configuration.encodeParam({name: "rawOaTopicId", value: rawOaTopicId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns the full topic hierarchy tree (Domain -> Field -> Subfield -> Topics). + * @endpoint get /api/topics/v2/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; + public getTopicHierarchy(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicHierarchy(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicHierarchy(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + 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/topics/v2/hierarchy`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns a paginated list of topics for a given list of topic IDs. + * @endpoint get /api/topics/v2/topics/id + * @param topicIds A list of topic IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicsByIds(topicIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicsByIds(topicIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByIds(topicIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByIds(topicIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/v2/topics/id`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Searches for topics based on the provided criteria. + * @endpoint get /api/topics/v2/search + * @param searchTerm The term to search for in topic display names. + * @param page The page number to retrieve. + * @param size The number of topics to retrieve per page. + * @param sortBy The field to sort by. + * @param sortDirection The direction to sort. + * @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 searchTopics(searchTerm?: string, page?: number, size?: number, sortBy?: TopicSortBy, sortDirection?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchTopics(searchTerm?: string, page?: number, size?: number, sortBy?: TopicSortBy, sortDirection?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchTopics(searchTerm?: string, page?: number, size?: number, sortBy?: TopicSortBy, sortDirection?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchTopics(searchTerm?: string, page?: number, size?: number, sortBy?: TopicSortBy, sortDirection?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchTerm, 'search_term'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/v2/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/topics/v2/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/universityRankings.service.ts b/webapp/src/app/api/api/universityRankings.service.ts index a7aba880..82bcee4c 100644 --- a/webapp/src/app/api/api/universityRankings.service.ts +++ b/webapp/src/app/api/api/universityRankings.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AutocompleteLocationItem } from '../model/autocompleteLocationItem'; @@ -38,748 +32,391 @@ import { TrendResponse } from '../model/trendResponse'; import { TrendSearchType } from '../model/trendSearchType'; // @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 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>; - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); + /** + * 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>; + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/inse-service/university-rankings/autocomplete-locations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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., \'Artificial Intelligence\') - * @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; - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (topic === null || topic === undefined) { - throw new Error( - 'Required parameter topic was null or undefined when calling getRankingsApiInseServiceUniversityRankingsGet.', - ); - } + 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 localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - topic, - 'topic', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - 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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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>; - public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( - topic: string, - region?: string, - country?: string, - limit?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( - topic: string, - region?: string, - country?: string, - limit?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - 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 { - 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, - topic, - 'topic', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - region, - 'region', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - country, - 'country', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - 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>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns top 10 research topics for a selected entity. - * @endpoint get /api/inse-service/university-rankings/top-topics - * @param entityId Entity ID - * @param entityType Entity type: institution, author, country, region - * @param startYear Start year - * @param endYear End year - * @param searchType Search strategy type - * @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 getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (entityId === null || entityId === undefined) { - throw new Error( - 'Required parameter entityId was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.', - ); - } - if (entityType === null || entityType === undefined) { - throw new Error( - 'Required parameter entityType was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - entityId, - 'entity_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - entityType, - 'entity_type', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - startYear, - 'start_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - endYear, - 'end_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'search_type', - ); - - 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-topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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 keywords List of raw keywords corresponding to topics - * @param fuzzy True if using mapped topics, False if using raw keywords - * @param institutions List of OpenAlex Institution IDs - * @param countries List of country codes - * @param regions List of region identifiers - * @param authors List of OpenAlex Author IDs - * @param searchType - * @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, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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, - element, - 'topics', + let localVarPath = `/api/inse-service/university-rankings/autocomplete-locations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', + + /** + * 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., \'Artificial Intelligence\') + * @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; + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + 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, + topic, 'topic'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - if (institutions) { - institutions.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institutions', + + /** + * 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>; + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(topic: string, region?: string, country?: string, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(topic: string, region?: string, country?: string, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + 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 { + 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, + topic, 'topic'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + region, 'region'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + country, 'country'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + 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>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'countries', + + /** + * Returns top 10 research topics for a selected entity. + * @endpoint get /api/inse-service/university-rankings/top-topics + * @param entityId Entity ID + * @param entityType Entity type: institution, author, country, region + * @param startYear Start year + * @param endYear End year + * @param searchType Search strategy type + * @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 getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (entityId === null || entityId === undefined) { + throw new Error('Required parameter entityId was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.'); + } + if (entityType === null || entityType === undefined) { + throw new Error('Required parameter entityType was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + entityId, 'entity_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + entityType, 'entity_type'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + startYear, 'start_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + endYear, 'end_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'search_type'); + + 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-topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (regions) { - regions.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'regions', + + /** + * 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 keywords List of raw keywords corresponding to topics + * @param fuzzy True if using mapped topics, False if using raw keywords + * @param institutions List of OpenAlex Institution IDs + * @param countries List of country codes + * @param regions List of region identifiers + * @param authors List of OpenAlex Author IDs + * @param searchType + * @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, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + 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, + element, 'topics'); + }) + } + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + if (institutions) { + institutions.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institutions'); + }) + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'countries'); + }) + } + if (regions) { + regions.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'regions'); + }) + } + if (authors) { + authors.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'authors'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'search_type'); + + 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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - if (authors) { - authors.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'authors', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'search_type', - ); - - 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( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index 4561cb78..186ae663 100644 --- a/webapp/src/app/api/api/works.service.ts +++ b/webapp/src/app/api/api/works.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -36,674 +30,359 @@ import { WorkPage } from '../model/workPage'; import { WorksListResponse } from '../model/worksListResponse'; // @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 WorksService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns all works for an author. - * @endpoint get /api/works/{author_id}/all - * @param authorId The author id, for example A5023888391. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllAuthorWorks( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAllAuthorWorks( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllAuthorWorks( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllAuthorWorks( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getAllAuthorWorks.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns all works for an author. + * @endpoint get /api/works/{author_id}/all + * @param authorId The author id, for example A5023888391. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllAuthorWorks(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAllAuthorWorks(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllAuthorWorks(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllAuthorWorks(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getAllAuthorWorks.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/all`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Returns a page of works for an author. - * @endpoint get /api/works/{author_id} - * @param authorId The author id, for example A5023888391. - * @param page The page number. - * @param size The page size. - * @param publicationYear Filter by publication year. Can be repeated. - * @param type Filter by publication type. Can be repeated. - * @param language Filter by language code. Can be repeated. - * @param institutionId Filter by OpenAlex institution id. Can be repeated. - * @param topicId Filter by OpenAlex topic id. Can be repeated. - * @param sort Sort order: by publication year or by citation count. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getAuthorWorks.', - ); - } + let 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 localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - if (publicationYear) { - publicationYear.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_year', + let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/all`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (type) { - type.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'type', + + /** + * Returns a page of works for an author. + * @endpoint get /api/works/{author_id} + * @param authorId The author id, for example A5023888391. + * @param page The page number. + * @param size The page size. + * @param publicationYear Filter by publication year. Can be repeated. + * @param type Filter by publication type. Can be repeated. + * @param language Filter by language code. Can be repeated. + * @param institutionId Filter by OpenAlex institution id. Can be repeated. + * @param topicId Filter by OpenAlex topic id. Can be repeated. + * @param sort Sort order: by publication year or by citation count. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getAuthorWorks.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (publicationYear) { + publicationYear.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_year'); + }) + } + if (type) { + type.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'type'); + }) + } + if (language) { + language.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language'); + }) + } + if (institutionId) { + institutionId.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_id'); + }) + } + if (topicId) { + topicId.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_id'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sort, 'sort'); + + 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/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (language) { - language.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language', + + /** + * Returns work counts per primary topic for an author. + * @endpoint get /api/works/{author_id}/primary-topic-counts + * @param authorId The author id, for example A5023888391. + * @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 getPrimaryTopicCountsByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPrimaryTopicCountsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getPrimaryTopicCountsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getPrimaryTopicCountsByAuthor(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getPrimaryTopicCountsByAuthor.'); + } + + 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/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/primary-topic-counts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (institutionId) { - institutionId.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_id', + + /** + * Returns topics grouped by publication year for an author. + * @endpoint get /api/works/{author_id}/topics-by-time + * @param authorId The author id, for example A5023888391. + * @param maxTopicsPerYear The maximum number of topics per year. + * @param targetPublications Target number of publications used for the timeline. Complete years are always included. + * @param includeAll If true, all publications are used for the timeline. + * @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 getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + maxTopicsPerYear, 'max_topics_per_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + targetPublications, 'target_publications'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + includeAll, 'include_all'); + + 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/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/topics-by-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicId) { - topicId.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_id', + + /** + * Returns one publication by OpenAlex ID or DOI. + * @endpoint get /api/works/detail/{identifier} + * @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication. + * @param title Do we want to fallback to title search if ID and DOI dont work? + * @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 getWork(identifier: string, title?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWork(identifier: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWork(identifier: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWork(identifier: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (identifier === null || identifier === undefined) { + throw new Error('Required parameter identifier was null or undefined when calling getWork.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + + 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/works/detail/${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('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sort, - 'sort', - ); - - 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/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns work counts per primary topic for an author. - * @endpoint get /api/works/{author_id}/primary-topic-counts - * @param authorId The author id, for example A5023888391. - * @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 getPrimaryTopicCountsByAuthor( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getPrimaryTopicCountsByAuthor.', - ); - } - - 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/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-topic-counts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns topics grouped by publication year for an author. - * @endpoint get /api/works/{author_id}/topics-by-time - * @param authorId The author id, for example A5023888391. - * @param maxTopicsPerYear The maximum number of topics per year. - * @param targetPublications Target number of publications used for the timeline. Complete years are always included. - * @param includeAll If true, all publications are used for the timeline. - * @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 getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - maxTopicsPerYear, - 'max_topics_per_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - targetPublications, - 'target_publications', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - includeAll, - 'include_all', - ); - - 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/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/topics-by-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns one publication by OpenAlex ID or DOI. - * @endpoint get /api/works/detail/{identifier} - * @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication. - * @param title Do we want to fallback to title search if ID and DOI dont work? - * @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 getWork( - identifier: string, - title?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWork( - identifier: string, - title?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWork( - identifier: string, - title?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWork( - identifier: string, - title?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (identifier === null || identifier === undefined) { - throw new Error( - 'Required parameter identifier was null or undefined when calling getWork.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - - 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/works/detail/${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('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } } diff --git a/webapp/src/app/api/api/worksV2.service.ts b/webapp/src/app/api/api/worksV2.service.ts index fce3739a..9b8dc65d 100644 --- a/webapp/src/app/api/api/worksV2.service.ts +++ b/webapp/src/app/api/api/worksV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -40,1852 +34,916 @@ import { WorkPageV2 } from '../model/workPageV2'; import { WorkSortBy } from '../model/workSortBy'; // @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 WorksV2Service extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a paginated list of works for a given author based on their ID. - * @endpoint get /api/works/v2/author/{raw_oa_author_id} - * @param rawOaAuthorId The raw OpenAlex author id. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param title A title to filter by (partial matches allowed). - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort 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 getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPage.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_years', + /** + * Returns a paginated list of works for a given author based on their ID. + * @endpoint get /api/works/v2/author/{raw_oa_author_id} + * @param rawOaAuthorId The raw OpenAlex author id. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param title A title to filter by (partial matches allowed). + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort 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 getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPage.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_years'); + }) + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_types'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language_codes'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/works/v2/author/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_types', + + /** + * Returns a paginated list of works for a given institution based on their ID. + * @endpoint get /api/works/v2/institution/{raw_oa_institution_id} + * @param rawOaInstitutionId The raw OpenAlex institution id. + * @param page The page number to retrieve. (0-based) + * @param title A title to filter by (partial matches allowed). + * @param size The number of works to retrieve per page. + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param authorIds A list of author IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort 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 getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { + throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionWorkPage.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_years'); + }) + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_types'); + }) + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language_codes'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/works/v2/institution/${this.configuration.encodeParam({name: "rawOaInstitutionId", value: rawOaInstitutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + + /** + * Returns the primary category aggregations of works for a given author based on their ID + * @endpoint get /api/works/v2/author/{raw_oa_author_id}/primary-category-aggregations + * @param rawOaAuthorId The raw OpenAlex author id. + * @param yearSize The number of years to retrieve aggregations for. + * @param categorySize The number of categories to retrieve aggregations for. + * @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 getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getPrimaryCategoryAggregationsByAuthorId.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearSize, 'year_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + categorySize, 'category_size'); + + 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/works/v2/author/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/primary-category-aggregations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', + + /** + * Returns the primary category aggregations of works for a given institution based on their ID. + * @endpoint get /api/works/v2/institution/{raw_oa_institution_id}/primary-category-aggregations + * @param rawOaInstitutionId The raw OpenAlex institution id. + * @param yearSize The number of years to retrieve aggregations for. + * @param categorySize The number of categories to retrieve aggregations for. + * @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 getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { + throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getPrimaryCategoryAggregationsByInstitutionId.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearSize, 'year_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + categorySize, 'category_size'); + + 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/works/v2/institution/${this.configuration.encodeParam({name: "rawOaInstitutionId", value: rawOaInstitutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/primary-category-aggregations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language_codes', + + /** + * Returns a paginated list of works for a given topic based on its ID. + * @endpoint get /api/works/v2/topic/{raw_oa_topic_id} + * @param rawOaTopicId The raw OpenAlex topic id. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param title A title to filter by (partial matches allowed). + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param authorIds A list of author IDs to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort 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 getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaTopicId === null || rawOaTopicId === undefined) { + throw new Error('Required parameter rawOaTopicId was null or undefined when calling getTopicWorkPage.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_years'); + }) + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_types'); + }) + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language_codes'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/works/v2/topic/${this.configuration.encodeParam({name: "rawOaTopicId", value: rawOaTopicId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sort_order', - ); - - 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(); + /** + * Returns a work based on its ID. + * @endpoint get /api/works/v2/single/{raw_oa_work_id} + * @param rawOaWorkId The raw OpenAlex work 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 getWorkById(rawOaWorkId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWorkById(rawOaWorkId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkById(rawOaWorkId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkById(rawOaWorkId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaWorkId === null || rawOaWorkId === undefined) { + throw new Error('Required parameter rawOaWorkId was null or undefined when calling getWorkById.'); + } - 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/works/v2/author/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - /** - * Returns a paginated list of works for a given institution based on their ID. - * @endpoint get /api/works/v2/institution/{raw_oa_institution_id} - * @param rawOaInstitutionId The raw OpenAlex institution id. - * @param page The page number to retrieve. (0-based) - * @param title A title to filter by (partial matches allowed). - * @param size The number of works to retrieve per page. - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param authorIds A list of author IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort 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 getInstitutionWorkPage( - rawOaInstitutionId: string, - page?: number, - title?: string, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionWorkPage( - rawOaInstitutionId: string, - page?: number, - title?: string, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionWorkPage( - rawOaInstitutionId: string, - page?: number, - title?: string, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionWorkPage( - rawOaInstitutionId: string, - page?: number, - title?: string, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { - throw new Error( - 'Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionWorkPage.', - ); - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_years', + + 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/works/v2/single/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_types', + + /** + * Returns the classifications of a work based on its ID. + * @endpoint get /api/works/v2/classification/work/{raw_oa_work_id} + * @param rawOaWorkId The raw OpenAlex work id. + * @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 getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaWorkId === null || rawOaWorkId === undefined) { + throw new Error('Required parameter rawOaWorkId was null or undefined when calling getWorkClassificationByWorkId.'); + } + + 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/works/v2/classification/work/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', + + /** + * Returns the classifications of works based on their IDs. + * @endpoint get /api/works/v2/classification/works/search + * @param workIds A list of OpenAlex work IDs to retrieve classifications for. + * @param rawOaAuthorId The raw OpenAlex author id to filter by. + * @param rawOaInstitutionId The raw OpenAlex institution id to filter by. + * @param page The page number to retrieve. (0-based) + * @param size The number of classifications to retrieve per page. + * @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 getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (workIds) { + workIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'work_ids'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaAuthorId, 'raw_oa_author_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + + 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/works/v2/classification/works/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', + + /** + * Search works by topics or raw keywords with filters. + * @endpoint get /api/works/v2/keyword/search + * @param topics List of topics to match. + * @param topicIds List of topic IDs to match. + * @param filterTopicIds Additional topic IDs to filter results by, independent of search mode. + * @param keywords Raw keywords to search in title/abstract. + * @param fuzzy Use topic resolution if True, otherwise use raw keywords. + * @param publicationYear A list of publication years to filter by. + * @param publicationType A list of publication types to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param authorIds A list of author IDs to filter by. + * @param language A list of language codes to filter by. + * @param title Title to search for in works. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort 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 getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topics) { + topics.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topics'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'filter_topic_ids'); + }) + } + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + if (publicationYear) { + publicationYear.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_year'); + }) + } + if (publicationType) { + publicationType.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_type'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + if (language) { + language.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/works/v2/keyword/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language_codes', + + /** + * Search works with filters. + * @endpoint get /api/works/v2/search + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param title A title to filter by (partial matches allowed). + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param authorIds A list of author IDs to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort 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 searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_years'); + }) + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_types'); + }) + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'author_ids'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language_codes'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + 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/works/v2/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sort_order', - ); - - 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/works/v2/institution/${this.configuration.encodeParam({ name: 'rawOaInstitutionId', value: rawOaInstitutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the primary category aggregations of works for a given author based on their ID - * @endpoint get /api/works/v2/author/{raw_oa_author_id}/primary-category-aggregations - * @param rawOaAuthorId The raw OpenAlex author id. - * @param yearSize The number of years to retrieve aggregations for. - * @param categorySize The number of categories to retrieve aggregations for. - * @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 getPrimaryCategoryAggregationsByAuthorId( - rawOaAuthorId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPrimaryCategoryAggregationsByAuthorId( - rawOaAuthorId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPrimaryCategoryAggregationsByAuthorId( - rawOaAuthorId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPrimaryCategoryAggregationsByAuthorId( - rawOaAuthorId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling getPrimaryCategoryAggregationsByAuthorId.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearSize, - 'year_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - categorySize, - 'category_size', - ); - - 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/works/v2/author/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-category-aggregations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the primary category aggregations of works for a given institution based on their ID. - * @endpoint get /api/works/v2/institution/{raw_oa_institution_id}/primary-category-aggregations - * @param rawOaInstitutionId The raw OpenAlex institution id. - * @param yearSize The number of years to retrieve aggregations for. - * @param categorySize The number of categories to retrieve aggregations for. - * @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 getPrimaryCategoryAggregationsByInstitutionId( - rawOaInstitutionId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPrimaryCategoryAggregationsByInstitutionId( - rawOaInstitutionId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPrimaryCategoryAggregationsByInstitutionId( - rawOaInstitutionId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPrimaryCategoryAggregationsByInstitutionId( - rawOaInstitutionId: string, - yearSize?: number, - categorySize?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { - throw new Error( - 'Required parameter rawOaInstitutionId was null or undefined when calling getPrimaryCategoryAggregationsByInstitutionId.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearSize, - 'year_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - categorySize, - 'category_size', - ); - - 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/works/v2/institution/${this.configuration.encodeParam({ name: 'rawOaInstitutionId', value: rawOaInstitutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-category-aggregations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a paginated list of works for a given topic based on its ID. - * @endpoint get /api/works/v2/topic/{raw_oa_topic_id} - * @param rawOaTopicId The raw OpenAlex topic id. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param title A title to filter by (partial matches allowed). - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param authorIds A list of author IDs to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort 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 getTopicWorkPage( - rawOaTopicId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopicWorkPage( - rawOaTopicId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicWorkPage( - rawOaTopicId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicWorkPage( - rawOaTopicId: string, - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaTopicId === null || rawOaTopicId === undefined) { - throw new Error( - 'Required parameter rawOaTopicId was null or undefined when calling getTopicWorkPage.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_years', - ); - }); - } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_types', - ); - }); - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', - ); - }); - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', - ); - }); - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language_codes', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sort_order', - ); - - 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/works/v2/topic/${this.configuration.encodeParam({ name: 'rawOaTopicId', value: rawOaTopicId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a work based on its ID. - * @endpoint get /api/works/v2/single/{raw_oa_work_id} - * @param rawOaWorkId The raw OpenAlex work 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 getWorkById( - rawOaWorkId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWorkById( - rawOaWorkId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkById( - rawOaWorkId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkById( - rawOaWorkId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaWorkId === null || rawOaWorkId === undefined) { - throw new Error( - 'Required parameter rawOaWorkId was null or undefined when calling getWorkById.', - ); - } - - 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/works/v2/single/${this.configuration.encodeParam({ name: 'rawOaWorkId', value: rawOaWorkId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns the classifications of a work based on its ID. - * @endpoint get /api/works/v2/classification/work/{raw_oa_work_id} - * @param rawOaWorkId The raw OpenAlex work id. - * @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 getWorkClassificationByWorkId( - rawOaWorkId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWorkClassificationByWorkId( - rawOaWorkId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkClassificationByWorkId( - rawOaWorkId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkClassificationByWorkId( - rawOaWorkId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaWorkId === null || rawOaWorkId === undefined) { - throw new Error( - 'Required parameter rawOaWorkId was null or undefined when calling getWorkClassificationByWorkId.', - ); - } - - 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/works/v2/classification/work/${this.configuration.encodeParam({ name: 'rawOaWorkId', value: rawOaWorkId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the classifications of works based on their IDs. - * @endpoint get /api/works/v2/classification/works/search - * @param workIds A list of OpenAlex work IDs to retrieve classifications for. - * @param rawOaAuthorId The raw OpenAlex author id to filter by. - * @param rawOaInstitutionId The raw OpenAlex institution id to filter by. - * @param page The page number to retrieve. (0-based) - * @param size The number of classifications to retrieve per page. - * @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 getWorkClassificationsByWorkIds( - workIds?: Array, - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - page?: number, - size?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWorkClassificationsByWorkIds( - workIds?: Array, - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - page?: number, - size?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkClassificationsByWorkIds( - workIds?: Array, - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - page?: number, - size?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkClassificationsByWorkIds( - workIds?: Array, - rawOaAuthorId?: string, - rawOaInstitutionId?: string, - page?: number, - size?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (workIds) { - workIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'work_ids', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaAuthorId, - 'raw_oa_author_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - - 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/works/v2/classification/works/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Search works by topics or raw keywords with filters. - * @endpoint get /api/works/v2/keyword/search - * @param topics List of topics to match. - * @param topicIds List of topic IDs to match. - * @param filterTopicIds Additional topic IDs to filter results by, independent of search mode. - * @param keywords Raw keywords to search in title/abstract. - * @param fuzzy Use topic resolution if True, otherwise use raw keywords. - * @param publicationYear A list of publication years to filter by. - * @param publicationType A list of publication types to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param authorIds A list of author IDs to filter by. - * @param language A list of language codes to filter by. - * @param title Title to search for in works. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort 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 getWorksByKeywords( - topics?: Array, - topicIds?: Array, - filterTopicIds?: Array, - keywords?: Array, - fuzzy?: boolean, - publicationYear?: Array, - publicationType?: Array, - institutionIds?: Array, - authorIds?: Array, - language?: Array, - title?: string, - page?: number, - size?: number, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWorksByKeywords( - topics?: Array, - topicIds?: Array, - filterTopicIds?: Array, - keywords?: Array, - fuzzy?: boolean, - publicationYear?: Array, - publicationType?: Array, - institutionIds?: Array, - authorIds?: Array, - language?: Array, - title?: string, - page?: number, - size?: number, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorksByKeywords( - topics?: Array, - topicIds?: Array, - filterTopicIds?: Array, - keywords?: Array, - fuzzy?: boolean, - publicationYear?: Array, - publicationType?: Array, - institutionIds?: Array, - authorIds?: Array, - language?: Array, - title?: string, - page?: number, - size?: number, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorksByKeywords( - topics?: Array, - topicIds?: Array, - filterTopicIds?: Array, - keywords?: Array, - fuzzy?: boolean, - publicationYear?: Array, - publicationType?: Array, - institutionIds?: Array, - authorIds?: Array, - language?: Array, - title?: string, - page?: number, - size?: number, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topics) { - topics.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topics', - ); - }); - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'filter_topic_ids', - ); - }); - } - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - if (publicationYear) { - publicationYear.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_year', - ); - }); - } - if (publicationType) { - publicationType.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_type', - ); - }); - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', - ); - }); - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', - ); - }); - } - if (language) { - language.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sort_order', - ); - - 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/works/v2/keyword/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Search works with filters. - * @endpoint get /api/works/v2/search - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param title A title to filter by (partial matches allowed). - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param authorIds A list of author IDs to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort 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 searchWorks( - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchWorks( - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchWorks( - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchWorks( - page?: number, - size?: number, - title?: string, - publicationYears?: Array, - publicationTypes?: Array, - authorIds?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_years', - ); - }); - } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_types', - ); - }); - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'author_ids', - ); - }); - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', - ); - }); - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language_codes', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sort_order', - ); - - 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/works/v2/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/model/accessToken.ts b/webapp/src/app/api/model/accessToken.ts index c2a5ec79..74c4d45a 100644 --- a/webapp/src/app/api/model/accessToken.ts +++ b/webapp/src/app/api/model/accessToken.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,47 +10,51 @@ import { TokenType } from './tokenType'; import { UserRole } from './userRole'; -export interface AccessToken { - /** - * The unique identifier of the real account associated with this token. - */ - real_account_id: string; - /** - * The timestamp indicating when the token will expire. - */ - expires_at: string; - /** - * The epoch value for the token. Used for versioning of tokens. - */ - epoch?: number; - /** - * The type of the token, which is always ACCESS_TOKEN for this class. - */ - token_type?: TokenType; - /** - * A unique fingerprint of the user, used for additional security checks. - */ - user_fingerprint_hash: string; - /** - * The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation. - */ - effective_account_id: string; - /** - * The specific role this access token grants within its organization. - */ - effective_role?: UserRole; - /** - * The roles this access token grants within its organization. - */ - effective_roles?: Array; - /** - * The unique identifier of the organization associated with this access token. - */ - effective_organization_id: string; - effective_institution_id?: string | null; - /** - * The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes. - */ - raw_token: string; + +export interface AccessToken { + /** + * The unique identifier of the real account associated with this token. + */ + real_account_id: string; + /** + * The timestamp indicating when the token will expire. + */ + expires_at: string; + /** + * The epoch value for the token. Used for versioning of tokens. + */ + epoch?: number; + /** + * The type of the token, which is always ACCESS_TOKEN for this class. + */ + token_type?: TokenType; + /** + * A unique fingerprint of the user, used for additional security checks. + */ + user_fingerprint_hash: string; + /** + * The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation. + */ + effective_account_id: string; + /** + * The specific role this access token grants within its organization. + */ + effective_role?: UserRole; + /** + * The roles this access token grants within its organization. + */ + effective_roles?: Array; + /** + * The unique identifier of the organization associated with this access token. + */ + effective_organization_id: string; + effective_institution_id?: string | null; + /** + * The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes. + */ + raw_token: string; } -export namespace AccessToken {} +export namespace AccessToken { +} + + diff --git a/webapp/src/app/api/model/accountProfile.ts b/webapp/src/app/api/model/accountProfile.ts index a61b98ae..a7d7afa5 100644 --- a/webapp/src/app/api/model/accountProfile.ts +++ b/webapp/src/app/api/model/accountProfile.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,16 +9,18 @@ */ import { UserRole } from './userRole'; -export interface AccountProfile { - id: string; - email: string; - name: string; - roles: Array; - organization_id: string; - organization_name: string; - deleted: boolean; - activated: boolean; - is_current?: boolean; - is_real_account?: boolean; - is_impersonating?: boolean; + +export interface AccountProfile { + id: string; + email: string; + name: string; + roles: Array; + organization_id: string; + organization_name: string; + deleted: boolean; + activated: boolean; + is_current?: boolean; + is_real_account?: boolean; + is_impersonating?: boolean; } + diff --git a/webapp/src/app/api/model/archetypeOverlap.ts b/webapp/src/app/api/model/archetypeOverlap.ts new file mode 100644 index 00000000..1c25cdc1 --- /dev/null +++ b/webapp/src/app/api/model/archetypeOverlap.ts @@ -0,0 +1,42 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { MultiplierTag } from './multiplierTag'; + + +/** + * Overlap between one multiplier archetype and founder potential. Counts are NOT mutually exclusive: a person holding two tags is counted under both, so these do not sum to the shortlist size. + */ +export interface ArchetypeOverlap { + tag: MultiplierTag; + /** + * Shortlisted people carrying this tag. + */ + shortlist_count?: number; + robust_count?: number; + /** + * Shortlisted people whose sub-score clears the softer threshold. + */ + soft_shortlist_count?: number; + soft_robust_count?: number; + /** + * Scoreable people carrying this tag - the reverse direction. + */ + tagged_in_population?: number; + tagged_percentile_p50?: number | null; + tagged_percentile_p90?: number | null; + /** + * Tagged people at or above the `tagged_band` percentile. + */ + tagged_above_band?: number; +} +export namespace ArchetypeOverlap { +} + + diff --git a/webapp/src/app/api/model/authorMetricsRequest.ts b/webapp/src/app/api/model/authorMetricsRequest.ts index 1f4f15c6..f0a072e3 100644 --- a/webapp/src/app/api/model/authorMetricsRequest.ts +++ b/webapp/src/app/api/model/authorMetricsRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,14 +9,18 @@ */ import { CompanyStatusFilter } from './companyStatusFilter'; -export interface AuthorMetricsRequest { - /** - * OpenAlex IDs of the authors. - */ - author_ids: Array; - /** - * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. - */ - company_status?: CompanyStatusFilter; + +export interface AuthorMetricsRequest { + /** + * OpenAlex IDs of the authors. + */ + author_ids: Array; + /** + * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. + */ + company_status?: CompanyStatusFilter; } -export namespace AuthorMetricsRequest {} +export namespace AuthorMetricsRequest { +} + + diff --git a/webapp/src/app/api/model/authorNode.ts b/webapp/src/app/api/model/authorNode.ts index 4e043f03..03a4f48e 100644 --- a/webapp/src/app/api/model/authorNode.ts +++ b/webapp/src/app/api/model/authorNode.ts @@ -1,24 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface AuthorNode { - /** - * The ID of the author. - */ - id: string; - /** - * The display name of the author. - */ - display_name: string; - /** - * IDs of institutions this author is affiliated with. - */ - institution_ids?: Array; + +export interface AuthorNode { + /** + * The ID of the author. + */ + id: string; + /** + * The display name of the author. + */ + display_name: string; + /** + * IDs of institutions this author is affiliated with. + */ + institution_ids?: Array; } + diff --git a/webapp/src/app/api/model/authorOrientationProfile.ts b/webapp/src/app/api/model/authorOrientationProfile.ts index ab447c6c..1b48ad42 100644 --- a/webapp/src/app/api/model/authorOrientationProfile.ts +++ b/webapp/src/app/api/model/authorOrientationProfile.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,22 @@ */ import { AuthorOrientationProfileStatus } from './authorOrientationProfileStatus'; + /** * Aggregated research-orientation result for one selected author. */ -export interface AuthorOrientationProfile { - /** - * The full OpenAlex author ID. - */ - author_id: string; - status: AuthorOrientationProfileStatus; - orientation_score?: number | null; - primary_category_counts?: { [key: string]: number } | null; - classified_work_count?: number | null; - scored_work_count?: number | null; +export interface AuthorOrientationProfile { + /** + * The full OpenAlex author ID. + */ + author_id: string; + status: AuthorOrientationProfileStatus; + orientation_score?: number | null; + primary_category_counts?: { [key: string]: number; } | null; + classified_work_count?: number | null; + scored_work_count?: number | null; } -export namespace AuthorOrientationProfile {} +export namespace AuthorOrientationProfile { +} + + diff --git a/webapp/src/app/api/model/authorOrientationProfileStatus.ts b/webapp/src/app/api/model/authorOrientationProfileStatus.ts index 86dee198..d693a853 100644 --- a/webapp/src/app/api/model/authorOrientationProfileStatus.ts +++ b/webapp/src/app/api/model/authorOrientationProfileStatus.ts @@ -1,19 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const AuthorOrientationProfileStatus = { - Available: 'available', - InsufficientScoredPublications: 'insufficient_scored_publications', - NoClassifiedPublications: 'no_classified_publications', - NoOrientationScore: 'no_orientation_score', - Restricted: 'restricted', + Available: 'available', + InsufficientScoredPublications: 'insufficient_scored_publications', + NoClassifiedPublications: 'no_classified_publications', + NoOrientationScore: 'no_orientation_score', + Restricted: 'restricted' } as const; -export type AuthorOrientationProfileStatus = - (typeof AuthorOrientationProfileStatus)[keyof typeof AuthorOrientationProfileStatus]; +export type AuthorOrientationProfileStatus = typeof AuthorOrientationProfileStatus[keyof typeof AuthorOrientationProfileStatus]; + diff --git a/webapp/src/app/api/model/authorOrientationProfilesRequest.ts b/webapp/src/app/api/model/authorOrientationProfilesRequest.ts index cf451671..4db5a7ee 100644 --- a/webapp/src/app/api/model/authorOrientationProfilesRequest.ts +++ b/webapp/src/app/api/model/authorOrientationProfilesRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,17 +10,19 @@ import { Timespan } from './timespan'; import { PublicationType } from './publicationType'; + /** * Filters used to compare the research orientation of selected authors. */ -export interface AuthorOrientationProfilesRequest { - /** - * One to four unique OpenAlex author IDs. - */ - author_ids: Array; - /** - * Optional publication-type filter. Empty means all types. - */ - publication_types?: Array; - timespan?: Timespan | null; +export interface AuthorOrientationProfilesRequest { + /** + * One to four unique OpenAlex author IDs. + */ + author_ids: Array; + /** + * Optional publication-type filter. Empty means all types. + */ + publication_types?: Array; + timespan?: Timespan | null; } + diff --git a/webapp/src/app/api/model/authorPage.ts b/webapp/src/app/api/model/authorPage.ts index 842ce006..ce0a58ed 100644 --- a/webapp/src/app/api/model/authorPage.ts +++ b/webapp/src/app/api/model/authorPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,26 @@ */ import { Author } from './author'; + /** * A paginated response containing a list of authors. */ -export interface AuthorPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface AuthorPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/authorStaticStats.ts b/webapp/src/app/api/model/authorStaticStats.ts index 655e18c2..ddb24c33 100644 --- a/webapp/src/app/api/model/authorStaticStats.ts +++ b/webapp/src/app/api/model/authorStaticStats.ts @@ -1,35 +1,37 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Section 2: author-level stats independent of any keyword/topic/time filter. */ -export interface AuthorStaticStats { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * Number of Handelsregister company connections matched by the author\'s name. - */ - companies_count: number; - /** - * Number of news articles that mention the author by exact name. - */ - news_count: number; - /** - * Number of patents matched to the author (from the org_patents index). - */ - patents_count: number; +export interface AuthorStaticStats { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * Number of Handelsregister company connections matched by the author\'s name. + */ + companies_count: number; + /** + * Number of news articles that mention the author by exact name. + */ + news_count: number; + /** + * Number of patents matched to the author (from the org_patents index). + */ + patents_count: number; } + diff --git a/webapp/src/app/api/model/authorTopicProfile.ts b/webapp/src/app/api/model/authorTopicProfile.ts index 075bc8ec..26480ad8 100644 --- a/webapp/src/app/api/model/authorTopicProfile.ts +++ b/webapp/src/app/api/model/authorTopicProfile.ts @@ -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,45 +10,47 @@ import { FieldNode } from './fieldNode'; import { SubfieldShare } from './subfieldShare'; -export interface AuthorTopicProfile { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * All works of the author in the timespan, regardless of the topic filter. - */ - works_total: number; - /** - * Works matching the topic filter (same subset as Section 1). - */ - matched_works: number; - /** - * Matched works where one of the searched topics is the work\'s primary topic. - */ - primary_topic_matches: number; - /** - * Number of distinct primary topics across all works. - */ - distinct_topics: number; - /** - * Number of distinct primary-topic subfields across all works. - */ - distinct_subfields: number; - /** - * Number of distinct primary-topic fields across all works. - */ - distinct_fields: number; - /** - * Top subfields over all works, by primary topic, largest first. - */ - subfields?: Array; - /** - * Field -> subfield -> topic hierarchy over all works, by primary topic, each level largest first. Drives the interactive topic treemap. - */ - field_tree?: Array; + +export interface AuthorTopicProfile { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * All works of the author in the timespan, regardless of the topic filter. + */ + works_total: number; + /** + * Works matching the topic filter (same subset as Section 1). + */ + matched_works: number; + /** + * Matched works where one of the searched topics is the work\'s primary topic. + */ + primary_topic_matches: number; + /** + * Number of distinct primary topics across all works. + */ + distinct_topics: number; + /** + * Number of distinct primary-topic subfields across all works. + */ + distinct_subfields: number; + /** + * Number of distinct primary-topic fields across all works. + */ + distinct_fields: number; + /** + * Top subfields over all works, by primary topic, largest first. + */ + subfields?: Array; + /** + * Field -> subfield -> topic hierarchy over all works, by primary topic, each level largest first. Drives the interactive topic treemap. + */ + field_tree?: Array; } + diff --git a/webapp/src/app/api/model/authorTopicStats.ts b/webapp/src/app/api/model/authorTopicStats.ts index 67d32eca..1ca3a7c2 100644 --- a/webapp/src/app/api/model/authorTopicStats.ts +++ b/webapp/src/app/api/model/authorTopicStats.ts @@ -1,85 +1,87 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Section 1: combined stats over an author\'s works that match the topic filter. */ -export interface AuthorTopicStats { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * Number of the author\'s works matching the topic filter. - */ - works_total: number; - /** - * Number of the author\'s topic works where they are the corresponding author. - */ - corresponding_count: number; - /** - * Average field-normalized citation percentile (0-1) over the author\'s topic works. - */ - avg_percentile: number; - /** - * Number of the author\'s topic works in the top 1% most-cited. - */ - top1_count: number; - /** - * Number of the author\'s topic works in the top 10% most-cited. - */ - top10_count: number; - /** - * Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1 (cited more than the field/year/type average). - */ - fwci_above_one_count?: number; - /** - * Total citations across the author\'s topic works. - */ - citations_total?: number; - /** - * Average citations per topic work. - */ - avg_citations?: number; - /** - * Citations of the author\'s most-cited topic work. - */ - max_citations?: number; - /** - * h-index over the author\'s topic works (capped at 100). - */ - h_index?: number; - /** - * Average field-weighted citation impact (FWCI) over the author\'s topic works; works without an FWCI value are excluded. - */ - avg_fwci?: number; - /** - * Number of the author\'s topic works with at least one co-author institution of type \'company\'. - */ - industry_works_count?: number; - first_year?: number | null; - last_year?: number | null; - /** - * Number of the author\'s topic works where they are the first author. - */ - first_author_count?: number; - /** - * Number of the author\'s topic works where they are a middle author. - */ - middle_author_count?: number; - /** - * Number of the author\'s topic works where they are the last author. - */ - last_author_count?: number; +export interface AuthorTopicStats { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * Number of the author\'s works matching the topic filter. + */ + works_total: number; + /** + * Number of the author\'s topic works where they are the corresponding author. + */ + corresponding_count: number; + /** + * Average field-normalized citation percentile (0-1) over the author\'s topic works. + */ + avg_percentile: number; + /** + * Number of the author\'s topic works in the top 1% most-cited. + */ + top1_count: number; + /** + * Number of the author\'s topic works in the top 10% most-cited. + */ + top10_count: number; + /** + * Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1 (cited more than the field/year/type average). + */ + fwci_above_one_count?: number; + /** + * Total citations across the author\'s topic works. + */ + citations_total?: number; + /** + * Average citations per topic work. + */ + avg_citations?: number; + /** + * Citations of the author\'s most-cited topic work. + */ + max_citations?: number; + /** + * h-index over the author\'s topic works (capped at 100). + */ + h_index?: number; + /** + * Average field-weighted citation impact (FWCI) over the author\'s topic works; works without an FWCI value are excluded. + */ + avg_fwci?: number; + /** + * Number of the author\'s topic works with at least one co-author institution of type \'company\'. + */ + industry_works_count?: number; + first_year?: number | null; + last_year?: number | null; + /** + * Number of the author\'s topic works where they are the first author. + */ + first_author_count?: number; + /** + * Number of the author\'s topic works where they are a middle author. + */ + middle_author_count?: number; + /** + * Number of the author\'s topic works where they are the last author. + */ + last_author_count?: number; } + diff --git a/webapp/src/app/api/model/availableImages.ts b/webapp/src/app/api/model/availableImages.ts index 06b9742e..87861990 100644 --- a/webapp/src/app/api/model/availableImages.ts +++ b/webapp/src/app/api/model/availableImages.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface AvailableImages { - images: Array; - detail?: string; + +export interface AvailableImages { + images: Array; + detail?: string; } + diff --git a/webapp/src/app/api/model/backgroundJobTask.ts b/webapp/src/app/api/model/backgroundJobTask.ts index fa6f3f4f..b6023df5 100644 --- a/webapp/src/app/api/model/backgroundJobTask.ts +++ b/webapp/src/app/api/model/backgroundJobTask.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,17 +9,19 @@ */ import { JobRun } from './jobRun'; -export interface BackgroundJobTask { - id: number; - name: string; - description: string; - target_index: string; - image: string | null; - command: string | null; - env: { [key: string]: string }; - schedule: string | null; - enabled: boolean; - next_run_at: string | null; - last_run: JobRun | null; - status: string; + +export interface BackgroundJobTask { + id: number; + name: string; + description: string; + target_index: string; + image: string | null; + command: string | null; + env: { [key: string]: string; }; + schedule: string | null; + enabled: boolean; + next_run_at: string | null; + last_run: JobRun | null; + status: string; } + diff --git a/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts b/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts index b3ecdb6b..d6980562 100644 --- a/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts +++ b/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface BmbfProjectStatusStatistics { - institution_id: string; - organization_name: string; - ongoing: number; - upcoming: number; - completed: number; + +export interface BmbfProjectStatusStatistics { + institution_id: string; + organization_name: string; + ongoing: number; + upcoming: number; + completed: number; } + diff --git a/webapp/src/app/api/model/bodyValidatePasswordResetToken.ts b/webapp/src/app/api/model/bodyValidatePasswordResetToken.ts index a91ed455..e394aec9 100644 --- a/webapp/src/app/api/model/bodyValidatePasswordResetToken.ts +++ b/webapp/src/app/api/model/bodyValidatePasswordResetToken.ts @@ -1,16 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface BodyValidatePasswordResetToken { - /** - * Password reset token from the reset link - */ - reset_token: string; + +export interface BodyValidatePasswordResetToken { + /** + * Password reset token from the reset link + */ + reset_token: string; } + diff --git a/webapp/src/app/api/model/bundInstitutionSummary.ts b/webapp/src/app/api/model/bundInstitutionSummary.ts index dba7f1bc..8e61d493 100644 --- a/webapp/src/app/api/model/bundInstitutionSummary.ts +++ b/webapp/src/app/api/model/bundInstitutionSummary.ts @@ -1,23 +1,25 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * A single institution entry derived from a BUND project record. Note: this index has no dedicated institution entity — each entry is reconstructed from the agency/recipient fields on a single project hit, so the same institution may appear multiple times (once per project). */ -export interface BundInstitutionSummary { - department?: string | null; - department_fullname?: string | null; - name?: string | null; - recepient?: string | null; - municipality?: string | null; - place?: string | null; - state?: string | null; - country?: string | null; +export interface BundInstitutionSummary { + department?: string | null; + department_fullname?: string | null; + name?: string | null; + recepient?: string | null; + municipality?: string | null; + place?: string | null; + state?: string | null; + country?: string | null; } + diff --git a/webapp/src/app/api/model/bundInstitutionSummaryPage.ts b/webapp/src/app/api/model/bundInstitutionSummaryPage.ts index f1e39b95..c2d76b87 100644 --- a/webapp/src/app/api/model/bundInstitutionSummaryPage.ts +++ b/webapp/src/app/api/model/bundInstitutionSummaryPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,26 @@ */ import { BundInstitutionSummary } from './bundInstitutionSummary'; + /** * A paginated response containing a list of institutions. */ -export interface BundInstitutionSummaryPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface BundInstitutionSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/bundProjectDetails.ts b/webapp/src/app/api/model/bundProjectDetails.ts index fed64cc4..d63a6032 100644 --- a/webapp/src/app/api/model/bundProjectDetails.ts +++ b/webapp/src/app/api/model/bundProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,49 +9,51 @@ */ import { Topic } from './topic'; + /** * Clean summary model for a Bund (federal) project, consolidating all fields into semantic English names with proper native types. */ -export interface BundProjectDetails { - /** - * The ID of the Bund project - */ - id: string; - funding_reference?: string | null; - title?: string | null; - description?: string | null; - joint_project?: string | null; - funding_type?: string | null; - funding_profile?: string | null; - funding_amount?: number | null; - funding_start_date?: string | null; - funding_end_date?: string | null; - duration?: string | null; - performance_plan_code?: string | null; - performance_plan_fullname?: string | null; - executing_agency?: string | null; - funding_recipient?: string | null; - project_agency?: string | null; - project_agency_fullname?: string | null; - department?: string | null; - department_fullname?: string | null; - division?: string | null; - location?: string | null; - municipality?: string | null; - state?: string | null; - country?: string | null; - municipality_code?: string | null; - publication_date?: string | null; - is_new?: boolean | null; - record_date?: string | null; - unix_timestamp?: number | null; - /** - * All persons associated with the Bund project (from nested Arb object) - */ - associated_persons?: Array; - /** - * All institutions associated with the Bund project - */ - institutions?: Array; - oa_topics?: Array | null; +export interface BundProjectDetails { + /** + * The ID of the Bund project + */ + id: string; + funding_reference?: string | null; + title?: string | null; + description?: string | null; + joint_project?: string | null; + funding_type?: string | null; + funding_profile?: string | null; + funding_amount?: number | null; + funding_start_date?: string | null; + funding_end_date?: string | null; + duration?: string | null; + performance_plan_code?: string | null; + performance_plan_fullname?: string | null; + executing_agency?: string | null; + funding_recipient?: string | null; + project_agency?: string | null; + project_agency_fullname?: string | null; + department?: string | null; + department_fullname?: string | null; + division?: string | null; + location?: string | null; + municipality?: string | null; + state?: string | null; + country?: string | null; + municipality_code?: string | null; + publication_date?: string | null; + is_new?: boolean | null; + record_date?: string | null; + unix_timestamp?: number | null; + /** + * All persons associated with the Bund project (from nested Arb object) + */ + associated_persons?: Array; + /** + * All institutions associated with the Bund project + */ + institutions?: Array; + oa_topics?: Array | null; } + diff --git a/webapp/src/app/api/model/bundProjectHighlight.ts b/webapp/src/app/api/model/bundProjectHighlight.ts index 7c211f13..565f238b 100644 --- a/webapp/src/app/api/model/bundProjectHighlight.ts +++ b/webapp/src/app/api/model/bundProjectHighlight.ts @@ -1,31 +1,33 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Highlighted matching fragments from a BUND project search. */ -export interface BundProjectHighlight { - /** - * Highlights from the Elasticsearch field \"Verbundprojekt\". - */ - joint_project?: Array; - /** - * Highlights from the Elasticsearch field \"Thema\". - */ - topic?: Array; - /** - * Highlights from the Elasticsearch field \"Zuwendungsempfänger\". - */ - recipient?: Array; - /** - * Highlights from the Elasticsearch field \"Ausführende Stelle\". - */ - executing_agency?: Array; +export interface BundProjectHighlight { + /** + * Highlights from the Elasticsearch field \"Verbundprojekt\". + */ + joint_project?: Array; + /** + * Highlights from the Elasticsearch field \"Thema\". + */ + topic?: Array; + /** + * Highlights from the Elasticsearch field \"Zuwendungsempfänger\". + */ + recipient?: Array; + /** + * Highlights from the Elasticsearch field \"Ausführende Stelle\". + */ + executing_agency?: Array; } + diff --git a/webapp/src/app/api/model/bundProjectPage.ts b/webapp/src/app/api/model/bundProjectPage.ts index c2d381cb..4811bf9c 100644 --- a/webapp/src/app/api/model/bundProjectPage.ts +++ b/webapp/src/app/api/model/bundProjectPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { BundProjectSummary } from './bundProjectSummary'; -export interface BundProjectPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The bund projects on this page. - */ - elements?: Array; + +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; } + diff --git a/webapp/src/app/api/model/bundProjectSummary.ts b/webapp/src/app/api/model/bundProjectSummary.ts index a7277b55..c651c6bd 100644 --- a/webapp/src/app/api/model/bundProjectSummary.ts +++ b/webapp/src/app/api/model/bundProjectSummary.ts @@ -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,36 +11,38 @@ import { BundProjectHighlight } from './bundProjectHighlight'; import { Topic } from './topic'; import { BundInstitutionSummary } from './bundInstitutionSummary'; -export interface BundProjectSummary { - funding_code?: string | null; - department?: string | null; - department_fullname?: string | null; - referat?: string | null; - project_sponsor?: string | null; - project_sponsor_fullname?: string | null; - work_unit?: string | null; - recipient?: string | null; - municipal_code?: string | null; - municipality?: string | null; - place?: string | null; - state?: string | null; - country?: string | null; - executing_agency?: string | null; - topic?: string | null; - performance_plan_system?: string | null; - performance_plan_system_text?: string | null; - funding_start?: string | null; - funding_end?: string | null; - grant_amount?: number | null; - funding_profile?: string | null; - joint_project?: string | null; - funding_type?: string | null; - publication_date?: string | null; - unix_timestamp?: number | null; - date?: string | null; - new?: boolean | null; - duration?: string | null; - oa_topics?: Array | null; - institution?: BundInstitutionSummary | null; - highlight?: BundProjectHighlight | null; + +export interface BundProjectSummary { + funding_code?: string | null; + department?: string | null; + department_fullname?: string | null; + referat?: string | null; + project_sponsor?: string | null; + project_sponsor_fullname?: string | null; + work_unit?: string | null; + recipient?: string | null; + municipal_code?: string | null; + municipality?: string | null; + place?: string | null; + state?: string | null; + country?: string | null; + executing_agency?: string | null; + topic?: string | null; + performance_plan_system?: string | null; + performance_plan_system_text?: string | null; + funding_start?: string | null; + funding_end?: string | null; + grant_amount?: number | null; + funding_profile?: string | null; + joint_project?: string | null; + funding_type?: string | null; + publication_date?: string | null; + unix_timestamp?: number | null; + date?: string | null; + 'new'?: boolean | null; + duration?: string | null; + oa_topics?: Array | null; + institution?: BundInstitutionSummary | null; + highlight?: BundProjectHighlight | null; } + diff --git a/webapp/src/app/api/model/careerBucket.ts b/webapp/src/app/api/model/careerBucket.ts new file mode 100644 index 00000000..865ce76a --- /dev/null +++ b/webapp/src/app/api/model/careerBucket.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const CareerBucket = { + Early: 'Early', + Emerging: 'Emerging', + Established: 'Established', + Senior: 'Senior' +} as const; +export type CareerBucket = typeof CareerBucket[keyof typeof CareerBucket]; + diff --git a/webapp/src/app/api/model/careerStageStatistics.ts b/webapp/src/app/api/model/careerStageStatistics.ts new file mode 100644 index 00000000..3df0e0d2 --- /dev/null +++ b/webapp/src/app/api/model/careerStageStatistics.ts @@ -0,0 +1,46 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Founder-score distribution for one career stage (or all of them). + */ +export interface CareerStageStatistics { + /** + * A career stage name, or \'ALL\' for the whole cohort. + */ + career_bucket: string; + total?: number; + /** + * Scoreable researchers - the pool percentiles are drawn from. + */ + in_population?: number; + /** + * How many pass the data-quality screen. + */ + screened?: number; + /** + * At or above the percentile threshold. + */ + shortlist_plain?: number; + /** + * Also meeting the minimum publication count. + */ + shortlist_robust?: number; + percentile_p50?: number | null; + percentile_p90?: number | null; + above_75?: number; + above_90?: number; + robust_percentile_p50?: number | null; + robust_percentile_p90?: number | null; + robust_above_75?: number; + robust_above_90?: number; +} + diff --git a/webapp/src/app/api/model/collaborationGraph.ts b/webapp/src/app/api/model/collaborationGraph.ts index b5f6ed59..1d962ce4 100644 --- a/webapp/src/app/api/model/collaborationGraph.ts +++ b/webapp/src/app/api/model/collaborationGraph.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,25 +12,27 @@ import { Edge } from './edge'; import { InstitutionNode } from './institutionNode'; import { AuthorNode } from './authorNode'; -export interface CollaborationGraph { - /** - * The ID of the root author. - */ - root_author_id: string; - /** - * A list of author nodes. - */ - authors?: Array; - /** - * A list of institution nodes. - */ - institutions?: Array; - /** - * A list of work nodes. - */ - works?: Array; - /** - * A list of edges in the collaboration graph. - */ - edges?: Array; + +export interface CollaborationGraph { + /** + * The ID of the root author. + */ + root_author_id: string; + /** + * A list of author nodes. + */ + authors?: Array; + /** + * A list of institution nodes. + */ + institutions?: Array; + /** + * A list of work nodes. + */ + works?: Array; + /** + * A list of edges in the collaboration graph. + */ + edges?: Array; } + diff --git a/webapp/src/app/api/model/collaborationGraphStatus.ts b/webapp/src/app/api/model/collaborationGraphStatus.ts index c7fa00f9..911e49ef 100644 --- a/webapp/src/app/api/model/collaborationGraphStatus.ts +++ b/webapp/src/app/api/model/collaborationGraphStatus.ts @@ -1,17 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const CollaborationGraphStatus = { - Pending: 'pending', - Completed: 'completed', - Failed: 'failed', + Pending: 'pending', + Completed: 'completed', + Failed: 'failed' } as const; -export type CollaborationGraphStatus = - (typeof CollaborationGraphStatus)[keyof typeof CollaborationGraphStatus]; +export type CollaborationGraphStatus = typeof CollaborationGraphStatus[keyof typeof CollaborationGraphStatus]; + diff --git a/webapp/src/app/api/model/collaborationGraphStatusResponse.ts b/webapp/src/app/api/model/collaborationGraphStatusResponse.ts index 369b23ca..388715f5 100644 --- a/webapp/src/app/api/model/collaborationGraphStatusResponse.ts +++ b/webapp/src/app/api/model/collaborationGraphStatusResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,12 +10,16 @@ import { CollaborationGraph } from './collaborationGraph'; import { CollaborationGraphStatus } from './collaborationGraphStatus'; -export interface CollaborationGraphStatusResponse { - /** - * The status of the collaboration graph. - */ - status: CollaborationGraphStatus; - result?: CollaborationGraph | null; - error_message?: string | null; + +export interface CollaborationGraphStatusResponse { + /** + * The status of the collaboration graph. + */ + status: CollaborationGraphStatus; + result?: CollaborationGraph | null; + error_message?: string | null; } -export namespace CollaborationGraphStatusResponse {} +export namespace CollaborationGraphStatusResponse { +} + + diff --git a/webapp/src/app/api/model/companyConnectionsAvailability.ts b/webapp/src/app/api/model/companyConnectionsAvailability.ts index cefa8680..a2c92ed7 100644 --- a/webapp/src/app/api/model/companyConnectionsAvailability.ts +++ b/webapp/src/app/api/model/companyConnectionsAvailability.ts @@ -1,13 +1,15 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface CompanyConnectionsAvailability { - available: boolean; + +export interface CompanyConnectionsAvailability { + available: boolean; } + diff --git a/webapp/src/app/api/model/companyConnectionsResponse.ts b/webapp/src/app/api/model/companyConnectionsResponse.ts index 9b86a710..b110d640 100644 --- a/webapp/src/app/api/model/companyConnectionsResponse.ts +++ b/webapp/src/app/api/model/companyConnectionsResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,14 @@ */ import { CompanyConnection } from './companyConnection'; -export interface CompanyConnectionsResponse { - author_id: string; - display_name?: string | null; - matching_method?: string | null; - company_count: number; - has_more_results: boolean; - common_name_warning: boolean; - connections?: Array; + +export interface CompanyConnectionsResponse { + author_id: string; + display_name?: string | null; + matching_method?: string | null; + company_count: number; + has_more_results: boolean; + common_name_warning: boolean; + connections?: Array; } + diff --git a/webapp/src/app/api/model/createAccountRequest.ts b/webapp/src/app/api/model/createAccountRequest.ts index c38fce15..b2393cc2 100644 --- a/webapp/src/app/api/model/createAccountRequest.ts +++ b/webapp/src/app/api/model/createAccountRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,11 +9,13 @@ */ import { UserRole } from './userRole'; -export interface CreateAccountRequest { - email: string; - name: string; - roles?: Array; - organization_id: string; - password: string; - openalex_person_id?: string | null; + +export interface CreateAccountRequest { + email: string; + name: string; + roles?: Array; + organization_id: string; + password: string; + openalex_person_id?: string | null; } + diff --git a/webapp/src/app/api/model/createOrganizationRequest.ts b/webapp/src/app/api/model/createOrganizationRequest.ts index d59b0c3f..cd849b0c 100644 --- a/webapp/src/app/api/model/createOrganizationRequest.ts +++ b/webapp/src/app/api/model/createOrganizationRequest.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface CreateOrganizationRequest { - name: string; - other_inst_id?: string | null; - selected_openalex_institution_ids?: Array | null; + +export interface CreateOrganizationRequest { + name: string; + other_inst_id?: string | null; + selected_openalex_institution_ids?: Array | null; } + diff --git a/webapp/src/app/api/model/createPersonBookmark.ts b/webapp/src/app/api/model/createPersonBookmark.ts index d9d69bea..e2e196dd 100644 --- a/webapp/src/app/api/model/createPersonBookmark.ts +++ b/webapp/src/app/api/model/createPersonBookmark.ts @@ -1,13 +1,15 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface CreatePersonBookmark { - person_name?: string | null; + +export interface CreatePersonBookmark { + person_name?: string | null; } + diff --git a/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts b/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts index 9764ebe9..716a0f11 100644 --- a/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts +++ b/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts @@ -1,23 +1,25 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * DFGProjectFachgebieteInner */ -export interface DFGProjectFachgebieteInner { - fach?: string | null; - fach_code?: string | null; - fachgebiet?: string | null; - fachgebiet_code?: string | null; - fachkollegium?: string | null; - fachkollegium_code?: string | null; - wissenschaftsbereich?: string | null; - wissenschaftsbereich_code?: string | null; +export interface DFGProjectFachgebieteInner { + fach?: string | null; + fach_code?: string | null; + fachgebiet?: string | null; + fachgebiet_code?: string | null; + fachkollegium?: string | null; + fachkollegium_code?: string | null; + wissenschaftsbereich?: string | null; + wissenschaftsbereich_code?: string | null; } + diff --git a/webapp/src/app/api/model/dashboardInstitution.ts b/webapp/src/app/api/model/dashboardInstitution.ts new file mode 100644 index 00000000..b29571fb --- /dev/null +++ b/webapp/src/app/api/model/dashboardInstitution.ts @@ -0,0 +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 DashboardInstitution { + id: string; + display_name: string; +} + diff --git a/webapp/src/app/api/model/dashboardStatisticValue.ts b/webapp/src/app/api/model/dashboardStatisticValue.ts index 7666aee8..928bdd76 100644 --- a/webapp/src/app/api/model/dashboardStatisticValue.ts +++ b/webapp/src/app/api/model/dashboardStatisticValue.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DashboardStatisticValue { - institution_id: string; - organization_name: string; - value: number; + +export interface DashboardStatisticValue { + institution_id: string; + organization_name: string; + value: number; } + diff --git a/webapp/src/app/api/model/dashboardStatistics.ts b/webapp/src/app/api/model/dashboardStatistics.ts index 28d2527c..ba33382d 100644 --- a/webapp/src/app/api/model/dashboardStatistics.ts +++ b/webapp/src/app/api/model/dashboardStatistics.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DashboardStatistics { - institution_id: string; - organization_name: string; - publications: number; - persons: number; - projects: number; - dfg_projects: number; - eu_projects: number; - bmbf_projects: number; + +export interface DashboardStatistics { + institution_id: string; + organization_name: string; + publications: number; + persons: number; + projects: number; + dfg_projects: number; + eu_projects: number; + bmbf_projects: number; } + diff --git a/webapp/src/app/api/model/dfgInstitutionSummary.ts b/webapp/src/app/api/model/dfgInstitutionSummary.ts index f2134a2f..e3da7abf 100644 --- a/webapp/src/app/api/model/dfgInstitutionSummary.ts +++ b/webapp/src/app/api/model/dfgInstitutionSummary.ts @@ -1,23 +1,25 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * A summary of a DFG institution. */ -export interface DfgInstitutionSummary { - id: number; - institute_name_de?: string | null; - institute_name_en?: string | null; - root_id?: number | null; - root_name_de?: string | null; - root_name_en?: string | null; - address_country_de?: string | null; - address_country_en?: string | null; +export interface DfgInstitutionSummary { + id: number; + institute_name_de?: string | null; + institute_name_en?: string | null; + root_id?: number | null; + root_name_de?: string | null; + root_name_en?: string | null; + address_country_de?: string | null; + address_country_en?: string | null; } + diff --git a/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts b/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts index f31398c8..0bb6e492 100644 --- a/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts +++ b/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,26 @@ */ import { DfgInstitutionSummary } from './dfgInstitutionSummary'; + /** * A paginated response containing a list of institutions. */ -export interface DfgInstitutionSummaryPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface DfgInstitutionSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/dfgPersonSummary.ts b/webapp/src/app/api/model/dfgPersonSummary.ts index 5c525ca5..ebd441ee 100644 --- a/webapp/src/app/api/model/dfgPersonSummary.ts +++ b/webapp/src/app/api/model/dfgPersonSummary.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,14 @@ */ import { DfgInstitutionSummary } from './dfgInstitutionSummary'; -export interface DfgPersonSummary { - person_id: number; - orcid_id?: string | null; - project_ref_id?: number | null; - full_name?: string | null; - role_label_en?: string | null; - role_label_de?: string | null; - institution?: DfgInstitutionSummary | null; + +export interface DfgPersonSummary { + person_id: number; + orcid_id?: string | null; + project_ref_id?: number | null; + full_name?: string | null; + role_label_en?: string | null; + role_label_de?: string | null; + institution?: DfgInstitutionSummary | null; } + diff --git a/webapp/src/app/api/model/dfgPersonSummaryPage.ts b/webapp/src/app/api/model/dfgPersonSummaryPage.ts index fe367b63..c4b7d916 100644 --- a/webapp/src/app/api/model/dfgPersonSummaryPage.ts +++ b/webapp/src/app/api/model/dfgPersonSummaryPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,26 @@ */ import { DfgPersonSummary } from './dfgPersonSummary'; + /** * A paginated response containing a list of persons. */ -export interface DfgPersonSummaryPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface DfgPersonSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/dfgProjectDetails.ts b/webapp/src/app/api/model/dfgProjectDetails.ts index f3846507..07bcced0 100644 --- a/webapp/src/app/api/model/dfgProjectDetails.ts +++ b/webapp/src/app/api/model/dfgProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,69 +14,71 @@ import { DFGProjectFachgebieteInner } from './dFGProjectFachgebieteInner'; import { Topic } from './topic'; import { DfgProjectPublicationSummary } from './dfgProjectPublicationSummary'; + /** * Clean, enriched summary model for a DFG project. */ -export interface DfgProjectDetails { - id?: number | null; - link?: string | null; - page_url?: string | null; - external_link?: string | null; - title_de?: string | null; - title_en?: string | null; - description_de?: string | null; - description_en?: string | null; - final_report_abstract_de?: string | null; - final_report_abstract_en?: string | null; - project_identifier_de?: string | null; - project_identifier_en?: string | null; - funding_start?: number | null; - funding_end?: number | null; - funding_period_de?: string | null; - funding_period_en?: string | null; - funding_type_de?: string | null; - funding_type_en?: string | null; - funding_type_key?: string | null; - dfg_procedure?: string | null; - is_transfer_project?: boolean | null; - website_html_de?: string | null; - website_html_en?: string | null; - equipment_group?: string | null; - equipment_name?: string | null; - subject_area_de?: string | null; - subject_area_en?: string | null; - /** - * Detailed DFG subject-area classification entries (Fachsystematik) - */ - subject_classifications?: Array; - international_relation_de?: string | null; - international_relation_en?: string | null; - /** - * All persons associated with the project, each with their role - */ - persons?: Array; - /** - * All institutions associated with the project, each with their role - */ - institutions?: Array; - /** - * Flat, de-duplicated list of all person full names (convenience view) - */ - associated_persons?: Array; - /** - * Flat, de-duplicated list of all institution names (convenience view) - */ - associated_institutions?: Array; - parent_project_id?: number | null; - parent_title_de?: string | null; - parent_title_en?: string | null; - /** - * Sub-projects of this project, if any - */ - subprojects?: Array; - /** - * Publications resulting from the project - */ - publications?: Array; - topics?: Array | null; +export interface DfgProjectDetails { + id?: number | null; + link?: string | null; + page_url?: string | null; + external_link?: string | null; + title_de?: string | null; + title_en?: string | null; + description_de?: string | null; + description_en?: string | null; + final_report_abstract_de?: string | null; + final_report_abstract_en?: string | null; + project_identifier_de?: string | null; + project_identifier_en?: string | null; + funding_start?: number | null; + funding_end?: number | null; + funding_period_de?: string | null; + funding_period_en?: string | null; + funding_type_de?: string | null; + funding_type_en?: string | null; + funding_type_key?: string | null; + dfg_procedure?: string | null; + is_transfer_project?: boolean | null; + website_html_de?: string | null; + website_html_en?: string | null; + equipment_group?: string | null; + equipment_name?: string | null; + subject_area_de?: string | null; + subject_area_en?: string | null; + /** + * Detailed DFG subject-area classification entries (Fachsystematik) + */ + subject_classifications?: Array; + international_relation_de?: string | null; + international_relation_en?: string | null; + /** + * All persons associated with the project, each with their role + */ + persons?: Array; + /** + * All institutions associated with the project, each with their role + */ + institutions?: Array; + /** + * Flat, de-duplicated list of all person full names (convenience view) + */ + associated_persons?: Array; + /** + * Flat, de-duplicated list of all institution names (convenience view) + */ + associated_institutions?: Array; + parent_project_id?: number | null; + parent_title_de?: string | null; + parent_title_en?: string | null; + /** + * Sub-projects of this project, if any + */ + subprojects?: Array; + /** + * Publications resulting from the project + */ + publications?: Array; + topics?: Array | null; } + diff --git a/webapp/src/app/api/model/dfgProjectInstitutionRole.ts b/webapp/src/app/api/model/dfgProjectInstitutionRole.ts index 99e74e69..2fab6bb9 100644 --- a/webapp/src/app/api/model/dfgProjectInstitutionRole.ts +++ b/webapp/src/app/api/model/dfgProjectInstitutionRole.ts @@ -1,23 +1,25 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * An institution associated with the project, together with its role. */ -export interface DfgProjectInstitutionRole { - institute_id?: number | null; - name_de?: string | null; - name_en?: string | null; - role_key?: string | null; - role_label_de?: string | null; - role_label_en?: string | null; - is_dissolved?: boolean | null; - is_head?: boolean | null; +export interface DfgProjectInstitutionRole { + institute_id?: number | null; + name_de?: string | null; + name_en?: string | null; + role_key?: string | null; + role_label_de?: string | null; + role_label_en?: string | null; + is_dissolved?: boolean | null; + is_head?: boolean | null; } + diff --git a/webapp/src/app/api/model/dfgProjectKeyword.ts b/webapp/src/app/api/model/dfgProjectKeyword.ts index f81b6ad4..2e898f1c 100644 --- a/webapp/src/app/api/model/dfgProjectKeyword.ts +++ b/webapp/src/app/api/model/dfgProjectKeyword.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DfgProjectKeyword { - name: string; - project_count: number; + +export interface DfgProjectKeyword { + name: string; + project_count: number; } + diff --git a/webapp/src/app/api/model/dfgProjectPersonRole.ts b/webapp/src/app/api/model/dfgProjectPersonRole.ts index c067dde7..3b2daecf 100644 --- a/webapp/src/app/api/model/dfgProjectPersonRole.ts +++ b/webapp/src/app/api/model/dfgProjectPersonRole.ts @@ -1,25 +1,27 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * A person associated with the project, together with their role. */ -export interface DfgProjectPersonRole { - person_id?: number | null; - full_name?: string | null; - orcid_id?: string | null; - role_key?: string | null; - role_label_de?: string | null; - role_label_en?: string | null; - affiliation_de?: string | null; - affiliation_en?: string | null; - is_deceased?: boolean | null; - is_head?: boolean | null; +export interface DfgProjectPersonRole { + person_id?: number | null; + full_name?: string | null; + orcid_id?: string | null; + role_key?: string | null; + role_label_de?: string | null; + role_label_en?: string | null; + affiliation_de?: string | null; + affiliation_en?: string | null; + is_deceased?: boolean | null; + is_head?: boolean | null; } + diff --git a/webapp/src/app/api/model/dfgProjectPublicationSummary.ts b/webapp/src/app/api/model/dfgProjectPublicationSummary.ts index ee763ee4..f9a8692a 100644 --- a/webapp/src/app/api/model/dfgProjectPublicationSummary.ts +++ b/webapp/src/app/api/model/dfgProjectPublicationSummary.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * A lightweight reference to a publication resulting from the project. */ -export interface DfgProjectPublicationSummary { - publication_id?: number | null; - title?: string | null; - authors_editors?: string | null; - doi?: string | null; - publication_year?: number | null; +export interface DfgProjectPublicationSummary { + publication_id?: number | null; + title?: string | null; + authors_editors?: string | null; + doi?: string | null; + publication_year?: number | null; } + diff --git a/webapp/src/app/api/model/dfgProjectStatusStatistics.ts b/webapp/src/app/api/model/dfgProjectStatusStatistics.ts index 41309b52..3b7d566a 100644 --- a/webapp/src/app/api/model/dfgProjectStatusStatistics.ts +++ b/webapp/src/app/api/model/dfgProjectStatusStatistics.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DfgProjectStatusStatistics { - institution_id: string; - organization_name: string; - ongoing: number; - upcoming: number; - completed: number; + +export interface DfgProjectStatusStatistics { + institution_id: string; + organization_name: string; + ongoing: number; + upcoming: number; + completed: number; } + diff --git a/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts b/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts index 6078aa39..d7d75d43 100644 --- a/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts +++ b/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts @@ -1,24 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * A lightweight reference to a sub-project of this project. */ -export interface DfgProjectSubprojectSummary { - subproject_id?: number | null; - title_de?: string | null; - title_en?: string | null; - short_title?: string | null; - role_label_de?: string | null; - person_full_name?: string | null; - status_de?: string | null; - funding_start?: number | null; - funding_end?: number | null; +export interface DfgProjectSubprojectSummary { + subproject_id?: number | null; + title_de?: string | null; + title_en?: string | null; + short_title?: string | null; + role_label_de?: string | null; + person_full_name?: string | null; + status_de?: string | null; + funding_start?: number | null; + funding_end?: number | null; } + diff --git a/webapp/src/app/api/model/dfgProjectTopic.ts b/webapp/src/app/api/model/dfgProjectTopic.ts index a9686b51..f2bedcc2 100644 --- a/webapp/src/app/api/model/dfgProjectTopic.ts +++ b/webapp/src/app/api/model/dfgProjectTopic.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,14 +9,16 @@ */ import { DfgProjectKeyword } from './dfgProjectKeyword'; -export interface DfgProjectTopic { - id: string; - name: string; - subfield?: string | null; - field?: string | null; - domain?: string | null; - project_count: number; - field_project_count: number; - subfield_project_count: number; - keywords: Array; + +export interface DfgProjectTopic { + id: string; + name: string; + subfield?: string | null; + field?: string | null; + domain?: string | null; + project_count: number; + field_project_count: number; + subfield_project_count: number; + keywords: Array; } + diff --git a/webapp/src/app/api/model/dfgProjectTopics.ts b/webapp/src/app/api/model/dfgProjectTopics.ts index 67a0523c..78b68fa2 100644 --- a/webapp/src/app/api/model/dfgProjectTopics.ts +++ b/webapp/src/app/api/model/dfgProjectTopics.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,10 +9,12 @@ */ import { DfgProjectTopic } from './dfgProjectTopic'; -export interface DfgProjectTopics { - institution_id: string; - organization_name: string; - project_count: number; - matched_project_count: number; - topics: Array; + +export interface DfgProjectTopics { + institution_id: string; + organization_name: string; + project_count: number; + matched_project_count: number; + topics: Array; } + diff --git a/webapp/src/app/api/model/dockerHealth.ts b/webapp/src/app/api/model/dockerHealth.ts index ba28ab8a..9f4c3d47 100644 --- a/webapp/src/app/api/model/dockerHealth.ts +++ b/webapp/src/app/api/model/dockerHealth.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DockerHealth { - reachable: boolean; - detail: string; + +export interface DockerHealth { + reachable: boolean; + detail: string; } + diff --git a/webapp/src/app/api/model/domain.ts b/webapp/src/app/api/model/domain.ts index 3a6c6b03..fa9cc516 100644 --- a/webapp/src/app/api/model/domain.ts +++ b/webapp/src/app/api/model/domain.ts @@ -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,20 +10,22 @@ import { DomainFieldsInner } from './domainFieldsInner'; import { DomainIds } from './domainIds'; + /** * Top-level category in the topic hierarchy (4 total) */ -export interface Domain { - id?: string | null; - display_name?: string | null; - description?: string | null; - display_name_alternatives?: Array | null; - fields?: Array | null; - siblings?: Array | null; - ids?: DomainIds | null; - works_count?: number | null; - cited_by_count?: number | null; - works_api_url?: string | null; - created_date?: string | null; - updated_date?: string | null; +export interface Domain { + id?: string | null; + display_name?: string | null; + description?: string | null; + display_name_alternatives?: Array | null; + fields?: Array | null; + siblings?: Array | null; + ids?: DomainIds | null; + works_count?: number | null; + cited_by_count?: number | null; + works_api_url?: string | null; + created_date?: string | null; + updated_date?: string | null; } + diff --git a/webapp/src/app/api/model/domainFieldsInner.ts b/webapp/src/app/api/model/domainFieldsInner.ts index 302feae8..000101f5 100644 --- a/webapp/src/app/api/model/domainFieldsInner.ts +++ b/webapp/src/app/api/model/domainFieldsInner.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * DomainFieldsInner */ -export interface DomainFieldsInner { - id?: string | null; - display_name?: string | null; +export interface DomainFieldsInner { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/domainIds.ts b/webapp/src/app/api/model/domainIds.ts index da44d258..b3904a44 100644 --- a/webapp/src/app/api/model/domainIds.ts +++ b/webapp/src/app/api/model/domainIds.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * External identifiers: */ -export interface DomainIds { - openalex?: string | null; - wikidata?: string | null; - wikipedia?: string | null; +export interface DomainIds { + openalex?: string | null; + wikidata?: string | null; + wikipedia?: string | null; } + diff --git a/webapp/src/app/api/model/edge.ts b/webapp/src/app/api/model/edge.ts index 03376039..738e4b83 100644 --- a/webapp/src/app/api/model/edge.ts +++ b/webapp/src/app/api/model/edge.ts @@ -1,24 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface Edge { - /** - * The ID of the source node. - */ - source: string; - /** - * The ID of the target node. - */ - target: string; - /** - * The weight of the edge. - */ - weight: number; + +export interface Edge { + /** + * The ID of the source node. + */ + source: string; + /** + * The ID of the target node. + */ + target: string; + /** + * The weight of the edge. + */ + weight: number; } + diff --git a/webapp/src/app/api/model/egoNetwork.ts b/webapp/src/app/api/model/egoNetwork.ts new file mode 100644 index 00000000..226441d0 --- /dev/null +++ b/webapp/src/app/api/model/egoNetwork.ts @@ -0,0 +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. + */ +import { EgoNetworkEdge } from './egoNetworkEdge'; +import { EgoNetworkNode } from './egoNetworkNode'; +import { MultiplierTag } from './multiplierTag'; +import { MultiplierPeerRanks } from './multiplierPeerRanks'; +import { CareerBucket } from './careerBucket'; + + +/** + * One researcher\'s ego co-author network. Node and edge positions are deliberately absent: a force layout on the client (e.g. echarts\' `graph` series) positions them at render time. + */ +export interface EgoNetwork { + author_id: string; + display_name?: string | null; + career_bucket?: CareerBucket | null; + active_years?: number; + n_works?: number; + suspicious_profile?: boolean; + tags?: Array; + multiplier_peer_ranks?: MultiplierPeerRanks; + max_multiplier_peer_rank?: number; + /** + * All co-authors, not just the drawn ones. + */ + total_coauthors?: number; + /** + * Co-authors inside this university\'s cohort. + */ + cohort_coauthors?: number; + mentee_count?: number; + /** + * How many co-authors are in `nodes` (excluding the ego). + */ + shown?: number; + shown_mentees?: number; + /** + * nodes[0] is always the ego. + */ + nodes?: Array; + edges?: Array; + computed_at?: string | null; + config_hash?: string | null; +} +export namespace EgoNetwork { +} + + diff --git a/webapp/src/app/api/model/egoNetworkEdge.ts b/webapp/src/app/api/model/egoNetworkEdge.ts new file mode 100644 index 00000000..b3570232 --- /dev/null +++ b/webapp/src/app/api/model/egoNetworkEdge.ts @@ -0,0 +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. + */ + + +/** + * A collaboration tie between two nodes. + */ +export interface EgoNetworkEdge { + /** + * First author id (lexicographically smaller). + */ + a: string; + /** + * Second author id. + */ + b: string; + /** + * Decayed, team-size-weighted collaboration strength. + */ + w?: number; + /** + * Raw shared-work count. + */ + n_works?: number; + /** + * Whether the tie is mostly cross-institution. + */ + cross?: boolean; + first_year?: number | null; + last_year?: number | null; +} + diff --git a/webapp/src/app/api/model/egoNetworkNode.ts b/webapp/src/app/api/model/egoNetworkNode.ts new file mode 100644 index 00000000..b92d88eb --- /dev/null +++ b/webapp/src/app/api/model/egoNetworkNode.ts @@ -0,0 +1,30 @@ +/** + * 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. + */ + + +/** + * One person in an ego network. No layout coordinates - the client lays out. + */ +export interface EgoNetworkNode { + /** + * OpenAlex author id, short form. + */ + id: string; + name?: string | null; + /** + * One of: ego, mentee, cohort, industry, external. Typed as a string rather than an enum because the index is rebuilt independently of this API. + */ + role: string; + inst?: string | null; + active_years?: number; + suspicious?: boolean; + company_insts?: Array | null; +} + diff --git a/webapp/src/app/api/model/euProjectData.ts b/webapp/src/app/api/model/euProjectData.ts index 6c6fc670..5bdbef2a 100644 --- a/webapp/src/app/api/model/euProjectData.ts +++ b/webapp/src/app/api/model/euProjectData.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -25,49 +25,51 @@ import { HEUReportSummary } from './hEUReportSummary'; import { Topic } from './topic'; import { HEUProjectDetails } from './hEUProjectDetails'; + /** * The project data */ -export interface EuProjectData { - acronym?: string; - contentUpdateDate?: string; - ecMaxContribution?: number; - ecSignatureDate?: string; - endDate?: string; - frameworkProgramme?: string; - fundingScheme?: string; - grantDoi?: string; - humanValidated?: boolean; - id?: string; - keywords?: string; - legalBasis?: string; - masterCall?: string; - nature?: string; - objective?: string; - rcn?: string; - startDate?: string; - status?: string; - subCall?: string; - title?: string; - topics?: string; - totalCost?: number; - organizations?: Array; - publications?: Array; - iprs?: Array; - report_summaries?: Array; - topicsList?: Array; - web_links?: Array; - eurosciVoc?: Array; - legalBasisList?: Array; - organizationCount?: number; - publicationCount?: number; - iprCount?: number; - oaTopics?: Array; - oaAuthors?: AuthorPage; - deliverables?: Array; - reportSummaries?: Array; - webLinks?: Array; - ercPrincipalInvestigators?: Array; - 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; + publications?: Array; + iprs?: Array; + report_summaries?: Array; + topicsList?: Array; + web_links?: Array; + eurosciVoc?: Array; + legalBasisList?: Array; + organizationCount?: number; + publicationCount?: number; + iprCount?: number; + oaTopics?: Array; + oaAuthors?: AuthorPage; + deliverables?: Array; + reportSummaries?: Array; + webLinks?: Array; + ercPrincipalInvestigators?: Array; + deliverableCount?: number; + ercPiCount?: number; } + diff --git a/webapp/src/app/api/model/euProjectStatusStatistics.ts b/webapp/src/app/api/model/euProjectStatusStatistics.ts index 0f1fd3b6..040ffda4 100644 --- a/webapp/src/app/api/model/euProjectStatusStatistics.ts +++ b/webapp/src/app/api/model/euProjectStatusStatistics.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface EuProjectStatusStatistics { - institution_id: string; - organization_name: string; - ongoing: number; - upcoming: number; - completed: number; + +export interface EuProjectStatusStatistics { + institution_id: string; + organization_name: string; + ongoing: number; + upcoming: number; + completed: number; } + diff --git a/webapp/src/app/api/model/fieldNode.ts b/webapp/src/app/api/model/fieldNode.ts index 638c2d0d..20ff2a0c 100644 --- a/webapp/src/app/api/model/fieldNode.ts +++ b/webapp/src/app/api/model/fieldNode.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { SubfieldNode } from './subfieldNode'; -export interface FieldNode { - /** - * The OpenAlex ID of the field. - */ - id: string; - /** - * The field display name. - */ - name: string; - /** - * Number of works whose primary topic belongs to this field. - */ - count: number; - /** - * Subfields within this field, largest first. - */ - subfields?: Array; + +export interface FieldNode { + /** + * The OpenAlex ID of the field. + */ + id: string; + /** + * The field display name. + */ + name: string; + /** + * Number of works whose primary topic belongs to this field. + */ + count: number; + /** + * Subfields within this field, largest first. + */ + subfields?: Array; } + diff --git a/webapp/src/app/api/model/fileUpload.ts b/webapp/src/app/api/model/fileUpload.ts index 921db4c3..61722b2f 100644 --- a/webapp/src/app/api/model/fileUpload.ts +++ b/webapp/src/app/api/model/fileUpload.ts @@ -1,24 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface FileUpload { - /** - * The name of the uploaded file. - */ - filename: string; - /** - * The base64-encoded content of the uploaded file. - */ - content_base64: string; - /** - * The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc. - */ - mime_type: string; + +export interface FileUpload { + /** + * The name of the uploaded file. + */ + filename: string; + /** + * The base64-encoded content of the uploaded file. + */ + content_base64: string; + /** + * The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc. + */ + mime_type: string; } + diff --git a/webapp/src/app/api/model/founderCandidate.ts b/webapp/src/app/api/model/founderCandidate.ts new file mode 100644 index 00000000..59f046e9 --- /dev/null +++ b/webapp/src/app/api/model/founderCandidate.ts @@ -0,0 +1,53 @@ +/** + * 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 { FounderPotential } from './founderPotential'; +import { FounderScreen } from './founderScreen'; +import { MultiplierTag } from './multiplierTag'; +import { MultiplierPeerRanks } from './multiplierPeerRanks'; +import { FounderFeatures } from './founderFeatures'; +import { CareerBucket } from './careerBucket'; + + +/** + * A researcher with their founder-potential block and screen verdict. + */ +export interface FounderCandidate { + /** + * OpenAlex author id, short form (e.g. A5087456839). + */ + author_id: string; + display_name?: string | null; + career_bucket?: CareerBucket | null; + /** + * Distinct calendar years with at least one publication. + */ + active_years?: number; + n_works?: number; + /** + * Merged-identity heuristic (debut before 1970 or a span over 60 years). Treat evidence as low confidence. + */ + suspicious_profile?: boolean; + /** + * Archetypes this person qualifies for; a person can hold 0-3. + */ + tags?: Array; + multiplier_peer_ranks?: MultiplierPeerRanks; + /** + * Best of the three sub-scores (0-1). + */ + max_multiplier_peer_rank?: number; + founder_potential?: FounderPotential; + founder_features?: FounderFeatures; + screen: FounderScreen; +} +export namespace FounderCandidate { +} + + diff --git a/webapp/src/app/api/model/founderCandidatePage.ts b/webapp/src/app/api/model/founderCandidatePage.ts new file mode 100644 index 00000000..2833a306 --- /dev/null +++ b/webapp/src/app/api/model/founderCandidatePage.ts @@ -0,0 +1,34 @@ +/** + * 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 { FounderCandidate } from './founderCandidate'; + + +/** + * A paginated list of founder candidates. + */ +export interface FounderCandidatePage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; +} + diff --git a/webapp/src/app/api/model/founderFeatureImportance.ts b/webapp/src/app/api/model/founderFeatureImportance.ts new file mode 100644 index 00000000..0dd61caa --- /dev/null +++ b/webapp/src/app/api/model/founderFeatureImportance.ts @@ -0,0 +1,17 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface FounderFeatureImportance { + feature: string; + importance_mean: number; + importance_std?: number | null; +} + diff --git a/webapp/src/app/api/model/founderFeatures.ts b/webapp/src/app/api/model/founderFeatures.ts new file mode 100644 index 00000000..63e4f436 --- /dev/null +++ b/webapp/src/app/api/model/founderFeatures.ts @@ -0,0 +1,45 @@ +/** + * 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 exact input record the founder model saw, as coach-facing evidence. + */ +export interface FounderFeatures { + /** + * Lifetime publication count at the scoring year. + */ + publications?: number; + /** + * Patent count. 0 means \'nothing found\', not \'provably none\'. + */ + patents?: number; + /** + * Distinct grant ids acknowledged, raw. + */ + grants?: number; + grants_capped?: number | null; + /** + * Works co-authored with at least one company-affiliated author. + */ + industry_collab_papers?: number; + /** + * Always 0 here - this corpus has no patent-to-paper citation graph. + */ + linked_patents_to_publications?: number; + first_publication_year?: number | null; + first_patent_year?: number | null; + first_grant_year?: number | null; + publication_research_area?: string | null; + publication_research_area_label?: string | null; + grant_research_area?: string | null; + grant_research_area_label?: string | null; +} + diff --git a/webapp/src/app/api/model/founderHorizonModel.ts b/webapp/src/app/api/model/founderHorizonModel.ts new file mode 100644 index 00000000..61b9b3f3 --- /dev/null +++ b/webapp/src/app/api/model/founderHorizonModel.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface FounderHorizonModel { + horizon_years: number; + model: string; + oof_roc_auc?: number | null; + oof_pr_auc?: number | null; +} + diff --git a/webapp/src/app/api/model/founderModelInfo.ts b/webapp/src/app/api/model/founderModelInfo.ts new file mode 100644 index 00000000..4e63c8b9 --- /dev/null +++ b/webapp/src/app/api/model/founderModelInfo.ts @@ -0,0 +1,36 @@ +/** + * 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 { FounderFeatureImportance } from './founderFeatureImportance'; +import { FounderHorizonModel } from './founderHorizonModel'; + + +/** + * Which model produced the founder scores, and what drives it. These numbers describe the trained model itself, not any one university, so they are identical for every caller. + */ +export interface FounderModelInfo { + /** + * The production model bundle name. + */ + model: string; + design?: string | null; + reference_cohort_size?: number | null; + reference_founders?: number | null; + oof_roc_auc?: number | null; + oof_pr_auc?: number | null; + importance_metric?: string | null; + importances?: Array; + horizon_models?: Array; + /** + * Deployment caveats that must accompany these numbers. + */ + caveats?: Array; + source?: string | null; +} + diff --git a/webapp/src/app/api/model/founderPotential.ts b/webapp/src/app/api/model/founderPotential.ts new file mode 100644 index 00000000..26087755 --- /dev/null +++ b/webapp/src/app/api/model/founderPotential.ts @@ -0,0 +1,35 @@ +/** + * 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 { FounderTiming } from './founderTiming'; + + +/** + * Founder-propensity model output for one researcher. + */ +export interface FounderPotential { + external_percentile?: number | null; + external_percentile_within_1y?: number | null; + external_percentile_within_3y?: number | null; + external_percentile_within_5y?: number | null; + /** + * Whether the model considers this person scoreable (at least 4 publications). Below it the training classes come from clashing sampling frames and the scores are not evidence, so such people must not be ranked. + */ + in_reference_population?: boolean; + /** + * Whether the sequence timing models apply to this profile. When false, `timing` is null. + */ + timing_applicable?: boolean; + current_career_age?: number | null; + timing?: FounderTiming | null; + as_of_year?: number | null; + patent_source?: string | null; + classifier_model?: string | null; +} + diff --git a/webapp/src/app/api/model/founderScreen.ts b/webapp/src/app/api/model/founderScreen.ts new file mode 100644 index 00000000..76d168f6 --- /dev/null +++ b/webapp/src/app/api/model/founderScreen.ts @@ -0,0 +1,26 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { FounderScreenReason } from './founderScreenReason'; + + +/** + * Data-quality verdict for a founder candidate. + */ +export interface FounderScreen { + /** + * Whether the researcher passes every screen rule. + */ + passed: boolean; + /** + * Why the screen failed, in precedence order - reasons[0] is the headline reason. Empty when `passed` is true. + */ + reasons?: Array; +} + diff --git a/webapp/src/app/api/model/founderScreenReason.ts b/webapp/src/app/api/model/founderScreenReason.ts new file mode 100644 index 00000000..16a9aecb --- /dev/null +++ b/webapp/src/app/api/model/founderScreenReason.ts @@ -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. + */ + + +/** + * Why a researcher fails the data-quality screen. + */ +export const FounderScreenReason = { + MergedProfile: 'MERGED_PROFILE', + ImplausibleCareerLength: 'IMPLAUSIBLE_CAREER_LENGTH', + UnknownCareerLength: 'UNKNOWN_CAREER_LENGTH', + ThinProfile: 'THIN_PROFILE', + OutOfPopulation: 'OUT_OF_POPULATION' +} as const; +export type FounderScreenReason = typeof FounderScreenReason[keyof typeof FounderScreenReason]; + diff --git a/webapp/src/app/api/model/founderSortBy.ts b/webapp/src/app/api/model/founderSortBy.ts new file mode 100644 index 00000000..00a7aa20 --- /dev/null +++ b/webapp/src/app/api/model/founderSortBy.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const FounderSortBy = { + ExternalPercentile: 'external_percentile', + Within1y: 'within_1y', + Within3y: 'within_3y', + Within5y: 'within_5y', + Publications: 'publications', + Patents: 'patents', + ActiveYears: 'active_years' +} as const; +export type FounderSortBy = typeof FounderSortBy[keyof typeof FounderSortBy]; + diff --git a/webapp/src/app/api/model/founderStatistics.ts b/webapp/src/app/api/model/founderStatistics.ts new file mode 100644 index 00000000..af878968 --- /dev/null +++ b/webapp/src/app/api/model/founderStatistics.ts @@ -0,0 +1,35 @@ +/** + * 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 { FunnelStage } from './funnelStage'; +import { FounderStatisticsParameters } from './founderStatisticsParameters'; +import { FounderStatisticsProvenance } from './founderStatisticsProvenance'; +import { ResearchAreaStatistics } from './researchAreaStatistics'; +import { ArchetypeOverlap } from './archetypeOverlap'; +import { CareerStageStatistics } from './careerStageStatistics'; + + +/** + * Everything the founder dashboard needs, in one response. + */ +export interface FounderStatistics { + provenance: FounderStatisticsProvenance; + parameters: FounderStatisticsParameters; + funnel?: Array; + overall: CareerStageStatistics; + career_stages?: Array; + research_areas?: Array; + archetypes?: Array; + /** + * Shortlisted people carrying no archetype tag at all. + */ + untagged_shortlist_count?: number; + untagged_robust_count?: number; +} + diff --git a/webapp/src/app/api/model/founderStatisticsParameters.ts b/webapp/src/app/api/model/founderStatisticsParameters.ts new file mode 100644 index 00000000..06c5ac9e --- /dev/null +++ b/webapp/src/app/api/model/founderStatisticsParameters.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The cutoffs these statistics were computed with, echoed back. + */ +export interface FounderStatisticsParameters { + percentile_threshold: number; + min_publications: number; + soft_peer_rank_threshold: number; + max_career_age: number; + tagged_band: number; +} + diff --git a/webapp/src/app/api/model/founderStatisticsProvenance.ts b/webapp/src/app/api/model/founderStatisticsProvenance.ts new file mode 100644 index 00000000..3b9ee9b1 --- /dev/null +++ b/webapp/src/app/api/model/founderStatisticsProvenance.ts @@ -0,0 +1,26 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface FounderStatisticsProvenance { + institution_id: string; + /** + * Researchers indexed for this institution. + */ + document_count: number; + computed_at?: string | null; + config_hash?: string | null; + as_of_year?: number | null; + /** + * Distinct patent link qualities present in this cohort. + */ + patent_sources?: Array; +} + diff --git a/webapp/src/app/api/model/founderTiming.ts b/webapp/src/app/api/model/founderTiming.ts new file mode 100644 index 00000000..4b8ba4bb --- /dev/null +++ b/webapp/src/app/api/model/founderTiming.ts @@ -0,0 +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. + */ + + +/** + * Sequence-model timing estimate. Only present when the models are applicable to this profile; when `timing_applicable` is false this whole object is null, because the estimate is anchored on a publication debut year that is unreliable for merged profiles and outside the 1-20 year career range the models were trained on. + */ +export interface FounderTiming { + predicted_founding_age?: number | null; + predicted_founding_age_cross_check?: number | null; + years_to_founding?: number | null; +} + diff --git a/webapp/src/app/api/model/fp7ProjectDetails.ts b/webapp/src/app/api/model/fp7ProjectDetails.ts index 5046d248..3383bb71 100644 --- a/webapp/src/app/api/model/fp7ProjectDetails.ts +++ b/webapp/src/app/api/model/fp7ProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,43 +18,45 @@ import { Topic } from './topic'; import { Fp7Organization } from './fp7Organization'; import { Fp7LegalBasis } from './fp7LegalBasis'; + /** * Comprehensive FP7 Project model combining all related entities. This model extends the base Fp7Project with all associated data. */ -export interface Fp7ProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - iprs?: Array | null; - report_summaries?: Array | null; - topicsList?: Array | null; - web_links?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - iprCount?: number | null; - oaTopics?: Array | null; - oaAuthors?: AuthorPage | null; +export interface Fp7ProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + iprs?: Array | null; + report_summaries?: Array | null; + topicsList?: Array | null; + web_links?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + iprCount?: number | null; + oaTopics?: Array | null; + oaAuthors?: AuthorPage | null; } + diff --git a/webapp/src/app/api/model/fp7Publication.ts b/webapp/src/app/api/model/fp7Publication.ts index e8a9a862..26f10d92 100644 --- a/webapp/src/app/api/model/fp7Publication.ts +++ b/webapp/src/app/api/model/fp7Publication.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,27 +9,29 @@ */ import { Author } from './author'; + /** * Fp7Publication */ -export interface Fp7Publication { - authors?: string | null; - oaAuthors?: Array | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface Fp7Publication { + authors?: string | null; + oaAuthors?: Array | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } + diff --git a/webapp/src/app/api/model/funnelStage.ts b/webapp/src/app/api/model/funnelStage.ts new file mode 100644 index 00000000..de18d1f7 --- /dev/null +++ b/webapp/src/app/api/model/funnelStage.ts @@ -0,0 +1,38 @@ +/** + * 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 { FunnelStageKey } from './funnelStageKey'; + + +/** + * One cumulative stage of the data-quality funnel. + */ +export interface FunnelStage { + key: FunnelStageKey; + /** + * Human-readable description of the rule applied at this stage. + */ + label: string; + /** + * How many researchers survive this stage and every earlier one. + */ + count: number; + /** + * How many the previous stage\'s set lost here. + */ + lost_from_previous?: number; + /** + * count divided by the stage-0 total (0-1). + */ + share_of_total?: number; +} +export namespace FunnelStage { +} + + diff --git a/webapp/src/app/api/model/funnelStageKey.ts b/webapp/src/app/api/model/funnelStageKey.ts new file mode 100644 index 00000000..0cc3a593 --- /dev/null +++ b/webapp/src/app/api/model/funnelStageKey.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const FunnelStageKey = { + All: 'ALL', + InPopulation: 'IN_POPULATION', + NotSuspicious: 'NOT_SUSPICIOUS', + CareerAgePlausible: 'CAREER_AGE_PLAUSIBLE', + MinPublications: 'MIN_PUBLICATIONS' +} as const; +export type FunnelStageKey = typeof FunnelStageKey[keyof typeof FunnelStageKey]; + diff --git a/webapp/src/app/api/model/h2020ProjectDetails.ts b/webapp/src/app/api/model/h2020ProjectDetails.ts index 32d4d4fe..5aa9038d 100644 --- a/webapp/src/app/api/model/h2020ProjectDetails.ts +++ b/webapp/src/app/api/model/h2020ProjectDetails.ts @@ -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 @@ -19,45 +19,47 @@ import { H2020EurosciVoc } from './h2020EurosciVoc'; import { Topic } from './topic'; import { H2020Organization } from './h2020Organization'; + /** * Comprehensive Horizon 2020 Project model combining all related entities. This model extends the base H2020Project with all associated data. */ -export interface H2020ProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - deliverables?: Array | null; - reportSummaries?: Array | null; - topicsList?: Array | null; - webLinks?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - ercPrincipalInvestigators?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - deliverableCount?: number | null; - ercPiCount?: number | null; - oaTopics?: Array | null; - oaAuthors?: AuthorPage | null; +export interface H2020ProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + deliverables?: Array | null; + reportSummaries?: Array | null; + topicsList?: Array | null; + webLinks?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + ercPrincipalInvestigators?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + deliverableCount?: number | null; + ercPiCount?: number | null; + oaTopics?: Array | null; + oaAuthors?: AuthorPage | null; } + diff --git a/webapp/src/app/api/model/h2020Publication.ts b/webapp/src/app/api/model/h2020Publication.ts index 935a64fd..f5555ca2 100644 --- a/webapp/src/app/api/model/h2020Publication.ts +++ b/webapp/src/app/api/model/h2020Publication.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,27 +9,29 @@ */ import { Author } from './author'; + /** * H2020Publication */ -export interface H2020Publication { - authors?: string | null; - oaAuthors?: Array | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface H2020Publication { + authors?: string | null; + oaAuthors?: Array | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } + diff --git a/webapp/src/app/api/model/hEUProjectDetails.ts b/webapp/src/app/api/model/hEUProjectDetails.ts index 13561f7c..b9e15d29 100644 --- a/webapp/src/app/api/model/hEUProjectDetails.ts +++ b/webapp/src/app/api/model/hEUProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,43 +18,45 @@ import { HEUDeliverable } from './hEUDeliverable'; import { Topic } from './topic'; import { HEUEurosciVoc } from './hEUEurosciVoc'; + /** * Comprehensive Horizon Europe Project model combining all related entities. This model extends the base HEUProject with all associated data. */ -export interface HEUProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - deliverables?: Array | null; - reportSummaries?: Array | null; - topicsList?: Array | null; - webLinks?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - deliverableCount?: number | null; - oaTopics?: Array | null; - oaAuthors?: AuthorPage | null; +export interface HEUProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + deliverables?: Array | null; + reportSummaries?: Array | null; + topicsList?: Array | null; + webLinks?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + deliverableCount?: number | null; + oaTopics?: Array | null; + oaAuthors?: AuthorPage | null; } + diff --git a/webapp/src/app/api/model/hEUPublication.ts b/webapp/src/app/api/model/hEUPublication.ts index e607a3ed..d25db81f 100644 --- a/webapp/src/app/api/model/hEUPublication.ts +++ b/webapp/src/app/api/model/hEUPublication.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,27 +9,29 @@ */ import { Author } from './author'; + /** * HEUPublication */ -export interface HEUPublication { - authors?: string | null; - oaAuthors?: Array | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface HEUPublication { + authors?: string | null; + oaAuthors?: Array | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } + diff --git a/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts b/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts index 2b6e1e7c..cec72b2e 100644 --- a/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts +++ b/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface InseOrganizationManagementModelOrganizationProfile { - id: string; - name: string; - other_inst_id?: string | null; - selected_openalex_institution_ids?: Array; - deleted: boolean; - member_count: number; + +export interface InseOrganizationManagementModelOrganizationProfile { + id: string; + name: string; + other_inst_id?: string | null; + selected_openalex_institution_ids?: Array; + deleted: boolean; + member_count: number; } + diff --git a/webapp/src/app/api/model/institution.ts b/webapp/src/app/api/model/institution.ts index a60acdaa..3c9f754f 100644 --- a/webapp/src/app/api/model/institution.ts +++ b/webapp/src/app/api/model/institution.ts @@ -1,41 +1,43 @@ /** * 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 { InstitutionIds } from './institutionIds'; +import { DehydratedInstitution } from './dehydratedInstitution'; import { AuthorCountsByYearInner } from './authorCountsByYearInner'; import { AuthorSummaryStats } from './authorSummaryStats'; import { InstitutionGeo } from './institutionGeo'; -import { DehydratedInstitution } from './dehydratedInstitution'; + /** * A university, research organization, or other affiliation */ -export interface Institution { - id?: string | null; - ror?: string | null; - display_name?: string | null; - country_code?: string | null; - type?: string | null; - homepage_url?: string | null; - image_url?: string | null; - image_thumbnail_url?: string | null; - display_name_acronyms?: Array | null; - display_name_alternatives?: Array | null; - works_count?: number | null; - cited_by_count?: number | null; - summary_stats?: AuthorSummaryStats | null; - geo?: InstitutionGeo | null; - lineage?: Array | null; - ids?: InstitutionIds | null; - counts_by_year?: Array | null; - works_api_url?: string | null; - associated_institutions?: Array | null; - created_date?: string | null; - updated_date?: string | null; +export interface Institution { + id?: string | null; + ror?: string | null; + display_name?: string | null; + country_code?: string | null; + type?: string | null; + homepage_url?: string | null; + image_url?: string | null; + image_thumbnail_url?: string | null; + display_name_acronyms?: Array | null; + display_name_alternatives?: Array | null; + works_count?: number | null; + cited_by_count?: number | null; + summary_stats?: AuthorSummaryStats | null; + geo?: InstitutionGeo | null; + lineage?: Array | null; + ids?: InstitutionIds | null; + counts_by_year?: Array | null; + works_api_url?: string | null; + associated_institutions?: Array | null; + created_date?: string | null; + updated_date?: string | null; } + diff --git a/webapp/src/app/api/model/institutionAssociation.ts b/webapp/src/app/api/model/institutionAssociation.ts index 11b0b37e..0469468e 100644 --- a/webapp/src/app/api/model/institutionAssociation.ts +++ b/webapp/src/app/api/model/institutionAssociation.ts @@ -1,23 +1,25 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface InstitutionAssociation { - id: string; - display_name: string; - relationship: InstitutionAssociation.RelationshipEnum; + +export interface InstitutionAssociation { + id: string; + display_name: string; + relationship: InstitutionAssociation.RelationshipEnum; } export namespace InstitutionAssociation { - export const RelationshipEnum = { - Child: 'child', - Related: 'related', - } as const; - export type RelationshipEnum = - (typeof RelationshipEnum)[keyof typeof RelationshipEnum]; + export const RelationshipEnum = { + Child: 'child', + Related: 'related' + } as const; + export type RelationshipEnum = typeof RelationshipEnum[keyof typeof RelationshipEnum]; } + + diff --git a/webapp/src/app/api/model/institutionAssociationsResponse.ts b/webapp/src/app/api/model/institutionAssociationsResponse.ts index 6bcd3c56..921f029d 100644 --- a/webapp/src/app/api/model/institutionAssociationsResponse.ts +++ b/webapp/src/app/api/model/institutionAssociationsResponse.ts @@ -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,8 +9,10 @@ */ import { InstitutionAssociation } from './institutionAssociation'; -export interface InstitutionAssociationsResponse { - id: string; - display_name: string; - associated_institutions?: Array; + +export interface InstitutionAssociationsResponse { + id: string; + display_name: string; + associated_institutions?: Array; } + diff --git a/webapp/src/app/api/model/institutionNode.ts b/webapp/src/app/api/model/institutionNode.ts index 3181ce5e..cea6584a 100644 --- a/webapp/src/app/api/model/institutionNode.ts +++ b/webapp/src/app/api/model/institutionNode.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface InstitutionNode { - /** - * The ID of the institution. - */ - id: string; - /** - * The display name of the institution. - */ - display_name: string; + +export interface InstitutionNode { + /** + * The ID of the institution. + */ + id: string; + /** + * The display name of the institution. + */ + display_name: string; } + diff --git a/webapp/src/app/api/model/institutionPageV2.ts b/webapp/src/app/api/model/institutionPageV2.ts index 67017198..15f481f6 100644 --- a/webapp/src/app/api/model/institutionPageV2.ts +++ b/webapp/src/app/api/model/institutionPageV2.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,26 @@ */ import { Institution } from './institution'; + /** * A paginated response containing a list of institutions. */ -export interface InstitutionPageV2 { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface InstitutionPageV2 { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/jobDefinitionCreateRequest.ts b/webapp/src/app/api/model/jobDefinitionCreateRequest.ts index 76561fc4..edaac8ad 100644 --- a/webapp/src/app/api/model/jobDefinitionCreateRequest.ts +++ b/webapp/src/app/api/model/jobDefinitionCreateRequest.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface JobDefinitionCreateRequest { - name: string; - image?: string | null; - command?: string | null; - env?: { [key: string]: string }; - description?: string; - target_index?: string; - schedule?: string | null; - enabled?: boolean; + +export interface JobDefinitionCreateRequest { + name: string; + image?: string | null; + command?: string | null; + env?: { [key: string]: string; }; + description?: string; + target_index?: string; + schedule?: string | null; + enabled?: boolean; } + diff --git a/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts b/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts index 993152ae..1dae581b 100644 --- a/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts +++ b/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface JobDefinitionUpdateRequest { - name?: string | null; - image?: string | null; - command?: string | null; - env?: { [key: string]: string } | null; - description?: string | null; - target_index?: string | null; - schedule?: string | null; - enabled?: boolean | null; + +export interface JobDefinitionUpdateRequest { + name?: string | null; + image?: string | null; + command?: string | null; + env?: { [key: string]: string; } | null; + description?: string | null; + target_index?: string | null; + schedule?: string | null; + enabled?: boolean | null; } + diff --git a/webapp/src/app/api/model/jobRun.ts b/webapp/src/app/api/model/jobRun.ts index 20346ae6..52dbf050 100644 --- a/webapp/src/app/api/model/jobRun.ts +++ b/webapp/src/app/api/model/jobRun.ts @@ -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,18 +10,22 @@ import { JobRunStatus } from './jobRunStatus'; import { JobTriggeredBy } from './jobTriggeredBy'; -export interface JobRun { - id?: number | null; - definition_id: number; - container_id?: string | null; - status?: JobRunStatus; - /** - * Whether the scheduler or a superadmin started this run. - */ - triggered_by: JobTriggeredBy; - started_at?: string; - finished_at?: string | null; - exit_code?: number | null; - logs?: string | null; + +export interface JobRun { + id?: number | null; + definition_id: number; + container_id?: string | null; + status?: JobRunStatus; + /** + * Whether the scheduler or a superadmin started this run. + */ + triggered_by: JobTriggeredBy; + started_at?: string; + finished_at?: string | null; + exit_code?: number | null; + logs?: string | null; } -export namespace JobRun {} +export namespace JobRun { +} + + diff --git a/webapp/src/app/api/model/jobRunLogs.ts b/webapp/src/app/api/model/jobRunLogs.ts index 423a6f1a..66c38da9 100644 --- a/webapp/src/app/api/model/jobRunLogs.ts +++ b/webapp/src/app/api/model/jobRunLogs.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,13 @@ */ import { JobRunStatus } from './jobRunStatus'; -export interface JobRunLogs { - run_id: number; - status: JobRunStatus; - logs: string; + +export interface JobRunLogs { + run_id: number; + status: JobRunStatus; + logs: string; } -export namespace JobRunLogs {} +export namespace JobRunLogs { +} + + diff --git a/webapp/src/app/api/model/jobRunStatus.ts b/webapp/src/app/api/model/jobRunStatus.ts index d50886b4..0a90d037 100644 --- a/webapp/src/app/api/model/jobRunStatus.ts +++ b/webapp/src/app/api/model/jobRunStatus.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const JobRunStatus = { - Running: 'running', - Succeeded: 'succeeded', - Failed: 'failed', - Stopped: 'stopped', + Running: 'running', + Succeeded: 'succeeded', + Failed: 'failed', + Stopped: 'stopped' } as const; -export type JobRunStatus = (typeof JobRunStatus)[keyof typeof JobRunStatus]; +export type JobRunStatus = typeof JobRunStatus[keyof typeof JobRunStatus]; + diff --git a/webapp/src/app/api/model/jobTriggeredBy.ts b/webapp/src/app/api/model/jobTriggeredBy.ts index 4ace1836..9ab25024 100644 --- a/webapp/src/app/api/model/jobTriggeredBy.ts +++ b/webapp/src/app/api/model/jobTriggeredBy.ts @@ -1,16 +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 JobTriggeredBy = { - Schedule: 'schedule', - Manual: 'manual', + Schedule: 'schedule', + Manual: 'manual' } as const; -export type JobTriggeredBy = - (typeof JobTriggeredBy)[keyof typeof JobTriggeredBy]; +export type JobTriggeredBy = typeof JobTriggeredBy[keyof typeof JobTriggeredBy]; + diff --git a/webapp/src/app/api/model/keywordEvidence.ts b/webapp/src/app/api/model/keywordEvidence.ts index 9b131bc1..a8a78209 100644 --- a/webapp/src/app/api/model/keywordEvidence.ts +++ b/webapp/src/app/api/model/keywordEvidence.ts @@ -1,26 +1,28 @@ /** * 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. */ + /** * Traceable title/abstract evidence for keyword text retrieval. */ -export interface KeywordEvidence { - phrase_in_title?: boolean; - phrase_in_abstract?: boolean; - full_token_match?: boolean; - partial_token_match?: boolean; - word_match_score?: number; - matched_phrases?: Array; - matched_words?: Array; - /** - * phrase_title | phrase_abstract | full_token | partial_token | none - */ - text_match_kind?: string; +export interface KeywordEvidence { + phrase_in_title?: boolean; + phrase_in_abstract?: boolean; + full_token_match?: boolean; + partial_token_match?: boolean; + word_match_score?: number; + matched_phrases?: Array; + matched_words?: Array; + /** + * phrase_title | phrase_abstract | full_token | partial_token | none + */ + text_match_kind?: string; } + diff --git a/webapp/src/app/api/model/keywordPatentHighlight.ts b/webapp/src/app/api/model/keywordPatentHighlight.ts index 7269e32c..3dfbaad8 100644 --- a/webapp/src/app/api/model/keywordPatentHighlight.ts +++ b/webapp/src/app/api/model/keywordPatentHighlight.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Elasticsearch highlight fragments (terms wrapped in ...). */ -export interface KeywordPatentHighlight { - title_de?: Array; - title_en?: Array; - abstract?: Array; +export interface KeywordPatentHighlight { + title_de?: Array; + title_en?: Array; + 'abstract'?: Array; } + diff --git a/webapp/src/app/api/model/keywordPatentLevel.ts b/webapp/src/app/api/model/keywordPatentLevel.ts index 97689af9..3522ae9e 100644 --- a/webapp/src/app/api/model/keywordPatentLevel.ts +++ b/webapp/src/app/api/model/keywordPatentLevel.ts @@ -1,18 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const KeywordPatentLevel = { - Broad: 'broad', - Coarse: 'coarse', - Fine: 'fine', - Custom: 'custom', + Broad: 'broad', + Coarse: 'coarse', + Fine: 'fine', + Custom: 'custom' } as const; -export type KeywordPatentLevel = - (typeof KeywordPatentLevel)[keyof typeof KeywordPatentLevel]; +export type KeywordPatentLevel = typeof KeywordPatentLevel[keyof typeof KeywordPatentLevel]; + diff --git a/webapp/src/app/api/model/keywordPatentMappingStatus.ts b/webapp/src/app/api/model/keywordPatentMappingStatus.ts index 23b2c4d1..a820fed5 100644 --- a/webapp/src/app/api/model/keywordPatentMappingStatus.ts +++ b/webapp/src/app/api/model/keywordPatentMappingStatus.ts @@ -1,19 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const KeywordPatentMappingStatus = { - Mapped: 'mapped', - Uncertain: 'uncertain', - NoMapping: 'no_mapping', - NoPatentsFound: 'no_patents_found', - SearchError: 'search_error', + Mapped: 'mapped', + Uncertain: 'uncertain', + NoMapping: 'no_mapping', + NoPatentsFound: 'no_patents_found', + SearchError: 'search_error' } as const; -export type KeywordPatentMappingStatus = - (typeof KeywordPatentMappingStatus)[keyof typeof KeywordPatentMappingStatus]; +export type KeywordPatentMappingStatus = typeof KeywordPatentMappingStatus[keyof typeof KeywordPatentMappingStatus]; + diff --git a/webapp/src/app/api/model/keywordPatentMatch.ts b/webapp/src/app/api/model/keywordPatentMatch.ts index 48ff2291..0a360133 100644 --- a/webapp/src/app/api/model/keywordPatentMatch.ts +++ b/webapp/src/app/api/model/keywordPatentMatch.ts @@ -1,41 +1,43 @@ /** * 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 { KeywordEvidence } from './keywordEvidence'; -import { KeywordPatentHighlight } from './keywordPatentHighlight'; import { PatentEntry } from './patentEntry'; +import { KeywordPatentHighlight } from './keywordPatentHighlight'; -export interface KeywordPatentMatch { - patent: PatentEntry; - /** - * Combined match quality score. - */ - match_score: number; - /** - * IPC/CPC classification match score. - */ - ipc_score: number; - /** - * Graded OpenAlex topic overlap: 1.0 topic_id, 0.7 subfield, 0.3 compatible field, 0.0 none. - */ - topic_score: number; - /** - * Title/abstract keyword overlap score. - */ - text_score: number; - matched_keywords?: Array; - matched_ipc_symbols?: Array; - highlight?: KeywordPatentHighlight | null; - /** - * True when the patent was retrieved via title/abstract keyword search because IPC mapping was uncertain, missing, or yielded no hits. - */ - text_retrieval?: boolean; - keyword_evidence?: KeywordEvidence | null; - topic_match_kind?: string | null; + +export interface KeywordPatentMatch { + patent: PatentEntry; + /** + * Combined match quality score. + */ + match_score: number; + /** + * IPC/CPC classification match score. + */ + ipc_score: number; + /** + * Graded OpenAlex topic overlap: 1.0 topic_id, 0.7 subfield, 0.3 compatible field, 0.0 none. + */ + topic_score: number; + /** + * Title/abstract keyword overlap score. + */ + text_score: number; + matched_keywords?: Array; + matched_ipc_symbols?: Array; + highlight?: KeywordPatentHighlight | null; + /** + * True when the patent was retrieved via title/abstract keyword search because IPC mapping was uncertain, missing, or yielded no hits. + */ + text_retrieval?: boolean; + keyword_evidence?: KeywordEvidence | null; + topic_match_kind?: string | null; } + diff --git a/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts b/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts index 1c9b28b1..753ef4dd 100644 --- a/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts +++ b/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts @@ -1,30 +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. */ + /** * Pipeline counters for evaluation (no effect on ranking thresholds). */ -export interface KeywordPatentSearchDiagnostics { - /** - * ipc | text | none - */ - search_path: string; - es_query_size_per_index?: number; - raw_patents_after_dedupe?: number; - filtered_by_ipc?: number; - filtered_by_relevance_gate?: number; - filtered_by_min_score?: number; - passed_relevance_gate?: number; - scored_before_cap?: number; - returned?: number; - max_patents_cap?: number; - hit_return_cap?: boolean; - ipc_cluster_selections?: Array; +export interface KeywordPatentSearchDiagnostics { + /** + * ipc | text | none + */ + search_path: string; + es_query_size_per_index?: number; + raw_patents_after_dedupe?: number; + filtered_by_ipc?: number; + filtered_by_relevance_gate?: number; + filtered_by_min_score?: number; + passed_relevance_gate?: number; + scored_before_cap?: number; + returned?: number; + max_patents_cap?: number; + hit_return_cap?: boolean; + ipc_cluster_selections?: Array; } + diff --git a/webapp/src/app/api/model/keywordPatentSearchItem.ts b/webapp/src/app/api/model/keywordPatentSearchItem.ts index cbcd04d4..c7521f63 100644 --- a/webapp/src/app/api/model/keywordPatentSearchItem.ts +++ b/webapp/src/app/api/model/keywordPatentSearchItem.ts @@ -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,23 @@ */ import { KeywordPatentLevel } from './keywordPatentLevel'; -export interface KeywordPatentSearchItem { - /** - * Extracted keyword text. - */ - keyword: string; - keyword_level?: KeywordPatentLevel | null; - topic_id?: string | null; - topic_display_name?: string | null; - subfield_name?: string | null; - field_name?: string | null; - /** - * LLM relevance score for the keyword. - */ - relevance_score?: number; + +export interface KeywordPatentSearchItem { + /** + * Extracted keyword text. + */ + keyword: string; + keyword_level?: KeywordPatentLevel | null; + topic_id?: string | null; + topic_display_name?: string | null; + subfield_name?: string | null; + field_name?: string | null; + /** + * LLM relevance score for the keyword. + */ + relevance_score?: number; } -export namespace KeywordPatentSearchItem {} +export namespace KeywordPatentSearchItem { +} + + diff --git a/webapp/src/app/api/model/keywordToAuthorRequest.ts b/webapp/src/app/api/model/keywordToAuthorRequest.ts index 4f420e16..5662764f 100644 --- a/webapp/src/app/api/model/keywordToAuthorRequest.ts +++ b/webapp/src/app/api/model/keywordToAuthorRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,35 +14,39 @@ import { PublicationType } from './publicationType'; import { CompanyStatusFilter } from './companyStatusFilter'; import { RankingWeights } from './rankingWeights'; -export interface KeywordToAuthorRequest { - /** - * One or more keywords to rank the author by. - */ - keywords: Array; - /** - * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. - */ - operator?: KeywordOperator; - /** - * How the \'keywords\' values are matched: True means they are OpenAlex topic ids matched against the work\'s topics, False means they are raw keywords matched as phrases in the work\'s title, abstract, keywords and topic names. Defaults to False. - */ - fuzzy?: boolean; - /** - * Weights for the ranking metrics. Required. - */ - weights: RankingWeights; - /** - * Optional filter: only keep authors in one of these career stages. Empty = no filter. - */ - career_stages?: Array; - /** - * Optional filter: only count works of these publication types. Empty = no filter. - */ - publication_types?: Array; - timespan?: Timespan | null; - /** - * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. - */ - company_status?: CompanyStatusFilter; + +export interface KeywordToAuthorRequest { + /** + * One or more keywords to rank the author by. + */ + keywords: Array; + /** + * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. + */ + operator?: KeywordOperator; + /** + * How the \'keywords\' values are matched: True means they are OpenAlex topic ids matched against the work\'s topics, False means they are raw keywords matched as phrases in the work\'s title, abstract, keywords and topic names. Defaults to False. + */ + fuzzy?: boolean; + /** + * Weights for the ranking metrics. Required. + */ + weights: RankingWeights; + /** + * Optional filter: only keep authors in one of these career stages. Empty = no filter. + */ + career_stages?: Array; + /** + * Optional filter: only count works of these publication types. Empty = no filter. + */ + publication_types?: Array; + timespan?: Timespan | null; + /** + * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. + */ + company_status?: CompanyStatusFilter; } -export namespace KeywordToAuthorRequest {} +export namespace KeywordToAuthorRequest { +} + + diff --git a/webapp/src/app/api/model/keywordsRequest.ts b/webapp/src/app/api/model/keywordsRequest.ts index 094ed97b..8acb7082 100644 --- a/webapp/src/app/api/model/keywordsRequest.ts +++ b/webapp/src/app/api/model/keywordsRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,20 @@ */ import { FileUpload } from './fileUpload'; -export interface KeywordsRequest { - /** - * The input text from which to extract keywords. - */ - query: string; - files?: Array | null; - /** - * The mode of keyword extraction, e.g., \'url\', \'text\', or \'keywords\'. - */ - mode: string; - /** - * The maximum number of keywords to extract. - */ - limit?: number; + +export interface KeywordsRequest { + /** + * The input text from which to extract keywords. + */ + query: string; + files?: Array | null; + /** + * The mode of keyword extraction, e.g., \'url\', \'text\', or \'keywords\'. + */ + mode: string; + /** + * The maximum number of keywords to extract. + */ + limit?: number; } + diff --git a/webapp/src/app/api/model/metricValue.ts b/webapp/src/app/api/model/metricValue.ts new file mode 100644 index 00000000..749bd7ef --- /dev/null +++ b/webapp/src/app/api/model/metricValue.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * A raw metric next to its peer rank. + */ +export interface MetricValue { + raw?: number | null; + peer_rank?: number | null; +} + diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index 9929cf3c..6b82c245 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -3,6 +3,7 @@ export * from './accessToken'; export * from './accountPage'; export * from './accountProfile'; export * from './allPatentsResponse'; +export * from './archetypeOverlap'; export * from './author'; export * from './authorAffiliationsInner'; export * from './authorCountsByYearInner'; @@ -43,8 +44,10 @@ export * from './bundProjectHighlight'; export * from './bundProjectPage'; export * from './bundProjectSummary'; export * from './bundProjectTopics'; +export * from './careerBucket'; export * from './careerMetrics'; export * from './careerStage'; +export * from './careerStageStatistics'; export * from './collaborationGraph'; export * from './collaborationGraphStatus'; export * from './collaborationGraphStatusResponse'; @@ -59,6 +62,7 @@ export * from './createPersonBookmark'; export * from './customAuthor'; export * from './customAuthorsListResponse'; export * from './dFGProjectFachgebieteInner'; +export * from './dashboardInstitution'; export * from './dashboardStatisticValue'; export * from './dashboardStatistics'; export * from './dehydratedAuthor'; @@ -87,6 +91,9 @@ export * from './domain'; export * from './domainFieldsInner'; export * from './domainIds'; export * from './edge'; +export * from './egoNetwork'; +export * from './egoNetworkEdge'; +export * from './egoNetworkNode'; export * from './euCordisEurosciVocSummary'; export * from './euCordisOrganizationSelectorPage'; export * from './euCordisOrganizationSelectorSummary'; @@ -105,6 +112,20 @@ export * from './extractedKeywordsLLM'; export * from './extractedKeywordsResponse'; export * from './fieldNode'; export * from './fileUpload'; +export * from './founderCandidate'; +export * from './founderCandidatePage'; +export * from './founderFeatureImportance'; +export * from './founderFeatures'; +export * from './founderHorizonModel'; +export * from './founderModelInfo'; +export * from './founderPotential'; +export * from './founderScreen'; +export * from './founderScreenReason'; +export * from './founderSortBy'; +export * from './founderStatistics'; +export * from './founderStatisticsParameters'; +export * from './founderStatisticsProvenance'; +export * from './founderTiming'; export * from './fp7EurosciVoc'; export * from './fp7LegalBasis'; export * from './fp7Organization'; @@ -118,6 +139,8 @@ export * from './funderByAuthor'; export * from './fundersByAuthorResponse'; export * from './fundingProject'; export * from './fundingProjectPage'; +export * from './funnelStage'; +export * from './funnelStageKey'; export * from './fwci'; export * from './groupByResult'; export * from './h2020Deliverable'; @@ -164,6 +187,7 @@ export * from './keywordEntry'; export * from './keywordEntryWithTopic'; export * from './keywordEvidence'; export * from './keywordOperator'; +export * from './keywordPatentHighlight'; export * from './keywordPatentLevel'; export * from './keywordPatentMappingStatus'; export * from './keywordPatentMatch'; @@ -183,8 +207,11 @@ export * from './matchedOfficer'; export * from './matchedTopic'; export * from './mentionedPerson'; export * from './meta'; +export * from './metricValue'; export * from './model2YrMeanCitedness'; export * from './modelField'; +export * from './multiplierPeerRanks'; +export * from './multiplierTag'; export * from './newsArticle'; export * from './newsArticleDetail'; export * from './newsPage'; @@ -199,6 +226,7 @@ export * from './patentsByAuthorResponse'; export * from './patentsByInstitutionResponse'; export * from './patentsByKeywordsRequest'; export * from './patentsByKeywordsResponse'; +export * from './peerRankField'; export * from './personBio'; export * from './personBookmarkResponse'; export * from './primaryCategoryYearAggregation'; @@ -217,8 +245,17 @@ export * from './rankingResponse'; export * from './rankingWeights'; export * from './rebuildResponse'; export * from './registryHealth'; +export * from './researchAreaStatistics'; +export * from './researcherDetail'; +export * from './researcherMetrics'; +export * from './researcherSortBy'; +export * from './researcherSummary'; +export * from './researcherSummaryPage'; export * from './score'; export * from './selectedAuthorsRequest'; +export * from './showcase'; +export * from './showcaseEntry'; +export * from './showcaseKind'; export * from './sortDirection'; export * from './startCollaborationGraphResponse'; export * from './subfield'; diff --git a/webapp/src/app/api/model/multiplierPeerRanks.ts b/webapp/src/app/api/model/multiplierPeerRanks.ts new file mode 100644 index 00000000..3d7fea5a --- /dev/null +++ b/webapp/src/app/api/model/multiplierPeerRanks.ts @@ -0,0 +1,29 @@ +/** + * 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. + */ + + +/** + * Sub-scores, 0-1, ranked within this university and career stage. + */ +export interface MultiplierPeerRanks { + /** + * Bridger sub-score (0-1). + */ + bridger?: number; + /** + * Mentor sub-score (0-1). + */ + mentor?: number; + /** + * Amplifier sub-score (0-1). + */ + amplifier?: number; +} + diff --git a/webapp/src/app/api/model/multiplierTag.ts b/webapp/src/app/api/model/multiplierTag.ts new file mode 100644 index 00000000..c2aa267d --- /dev/null +++ b/webapp/src/app/api/model/multiplierTag.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const MultiplierTag = { + Bridger: 'bridger', + Mentor: 'mentor', + Amplifier: 'amplifier' +} as const; +export type MultiplierTag = typeof MultiplierTag[keyof typeof MultiplierTag]; + diff --git a/webapp/src/app/api/model/newsArticle.ts b/webapp/src/app/api/model/newsArticle.ts index 2ed72b5b..c2edcebf 100644 --- a/webapp/src/app/api/model/newsArticle.ts +++ b/webapp/src/app/api/model/newsArticle.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,14 +9,16 @@ */ import { MatchedTopic } from './matchedTopic'; -export interface NewsArticle { - id: string; - date?: string | null; - maintitle?: string | null; - author?: string | null; - url?: string | null; - relevant?: boolean | null; - snippet?: string | null; - related?: boolean | null; - topics?: Array | null; + +export interface NewsArticle { + id: string; + date?: string | null; + maintitle?: string | null; + author?: string | null; + url?: string | null; + relevant?: boolean | null; + snippet?: string | null; + related?: boolean | null; + topics?: Array | null; } + diff --git a/webapp/src/app/api/model/newsArticleDetail.ts b/webapp/src/app/api/model/newsArticleDetail.ts index 0e1ffe47..d57f0419 100644 --- a/webapp/src/app/api/model/newsArticleDetail.ts +++ b/webapp/src/app/api/model/newsArticleDetail.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,17 +10,19 @@ import { MatchedTopic } from './matchedTopic'; import { MentionedPerson } from './mentionedPerson'; -export interface NewsArticleDetail { - id: string; - date?: string | null; - maintitle?: string | null; - author?: string | null; - url?: string | null; - relevant?: boolean | null; - snippet?: string | null; - related?: boolean | null; - topics?: Array; - full_content?: string | null; - authors?: Array; - keywords?: Array; + +export interface NewsArticleDetail { + id: string; + date?: string | null; + maintitle?: string | null; + author?: string | null; + url?: string | null; + relevant?: boolean | null; + snippet?: string | null; + related?: boolean | null; + topics?: Array; + full_content?: string | null; + authors?: Array; + keywords?: Array; } + diff --git a/webapp/src/app/api/model/orgPatentEntry.ts b/webapp/src/app/api/model/orgPatentEntry.ts index 762e1968..20ac5979 100644 --- a/webapp/src/app/api/model/orgPatentEntry.ts +++ b/webapp/src/app/api/model/orgPatentEntry.ts @@ -16,7 +16,10 @@ export interface OrgPatentEntry { patent_id: string; source: string; title?: string | null; + title_de?: string | null; + title_en?: string | null; 'abstract'?: string | null; + abstract_lang?: string | null; publication_date?: string | null; publication_year?: string | null; application_number?: string | null; diff --git a/webapp/src/app/api/model/patentsByKeywordsRequest.ts b/webapp/src/app/api/model/patentsByKeywordsRequest.ts index 6a0b41a5..da0c2a75 100644 --- a/webapp/src/app/api/model/patentsByKeywordsRequest.ts +++ b/webapp/src/app/api/model/patentsByKeywordsRequest.ts @@ -10,7 +10,7 @@ import { KeywordPatentSearchItem } from './keywordPatentSearchItem'; -export interface PatentsByKeywordsRequest { +export interface PatentsByKeywordsRequest { /** * Keywords to match against patents_openalex_keywords. */ @@ -23,13 +23,7 @@ export interface PatentsByKeywordsRequest { * Page size. */ size?: number; - /** - * Filter to a single source: EPO or USPTO. Omit for both. - */ source?: string | null; - /** - * title | publication_year | source. Omit to sort by match quality. - */ sort_by?: string | null; /** * asc | desc diff --git a/webapp/src/app/api/model/patentsByKeywordsResponse.ts b/webapp/src/app/api/model/patentsByKeywordsResponse.ts index 707add21..90b93f3b 100644 --- a/webapp/src/app/api/model/patentsByKeywordsResponse.ts +++ b/webapp/src/app/api/model/patentsByKeywordsResponse.ts @@ -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,25 +11,29 @@ import { KeywordPatentMappingStatus } from './keywordPatentMappingStatus'; import { KeywordPatentSearchDiagnostics } from './keywordPatentSearchDiagnostics'; import { KeywordPatentMatch } from './keywordPatentMatch'; -export interface PatentsByKeywordsResponse { - patent_count: number; - /** - * Total matches across all pages (before page/size slicing). - */ - total_count: number; - /** - * Total EPO matches, unfiltered by source. - */ - epo_count: number; - /** - * Total USPTO matches, unfiltered by source. - */ - uspto_count: number; - patents: Array; - /** - * IPC mapping outcome: mapped (IPC used), uncertain (fragmented evidence; may include text-retrieved patents), no_mapping (no usable IPC evidence; may include text-retrieved patents), no_patents_found (neither IPC nor keyword text search produced relevant patents), or search_error (technical failure talking to the search backend). - */ - mapping_status: KeywordPatentMappingStatus; - diagnostics?: KeywordPatentSearchDiagnostics | null; + +export interface PatentsByKeywordsResponse { + patent_count: number; + /** + * Total matches across all pages (before page/size slicing). + */ + total_count?: number; + /** + * Total EPO matches, unfiltered by source. + */ + epo_count?: number; + /** + * Total USPTO matches, unfiltered by source. + */ + uspto_count?: number; + patents: Array; + /** + * IPC mapping outcome: mapped (IPC used), uncertain (fragmented evidence; may include text-retrieved patents), no_mapping (no usable IPC evidence; may include text-retrieved patents), no_patents_found (neither IPC nor keyword text search produced relevant patents), or search_error (technical failure talking to the search backend). + */ + mapping_status: KeywordPatentMappingStatus; + diagnostics?: KeywordPatentSearchDiagnostics | null; } -export namespace PatentsByKeywordsResponse {} +export namespace PatentsByKeywordsResponse { +} + + diff --git a/webapp/src/app/api/model/peerRankField.ts b/webapp/src/app/api/model/peerRankField.ts new file mode 100644 index 00000000..10f884d2 --- /dev/null +++ b/webapp/src/app/api/model/peerRankField.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const PeerRankField = { + Bridger: 'bridger', + Mentor: 'mentor', + Amplifier: 'amplifier', + Max: 'max' +} as const; +export type PeerRankField = typeof PeerRankField[keyof typeof PeerRankField]; + diff --git a/webapp/src/app/api/model/personBookmarkResponse.ts b/webapp/src/app/api/model/personBookmarkResponse.ts index b40bdc71..5227060a 100644 --- a/webapp/src/app/api/model/personBookmarkResponse.ts +++ b/webapp/src/app/api/model/personBookmarkResponse.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface PersonBookmarkResponse { - person_id: string; - person_name: string | null; - created_at: string; + +export interface PersonBookmarkResponse { + person_id: string; + person_name: string | null; + created_at: string; } + diff --git a/webapp/src/app/api/model/primaryCategoryYearAggregation.ts b/webapp/src/app/api/model/primaryCategoryYearAggregation.ts index 02abd7b7..bc146f8d 100644 --- a/webapp/src/app/api/model/primaryCategoryYearAggregation.ts +++ b/webapp/src/app/api/model/primaryCategoryYearAggregation.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface PrimaryCategoryYearAggregation { - /** - * The publication year. - */ - publication_year: number; - /** - * A mapping of primary categories to their counts for the given year. - */ - categories?: { [key: string]: number }; + +export interface PrimaryCategoryYearAggregation { + /** + * The publication year. + */ + publication_year: number; + /** + * A mapping of primary categories to their counts for the given year. + */ + categories?: { [key: string]: number; }; } + diff --git a/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts b/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts index c448c0f2..e191b225 100644 --- a/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts +++ b/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { PrimaryCategoryYearAggregation } from './primaryCategoryYearAggregation'; -export interface PrimaryCategoryYearAggregationPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; + +export interface PrimaryCategoryYearAggregationPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/publicationTypeCount.ts b/webapp/src/app/api/model/publicationTypeCount.ts index 693dab21..e1d9edfb 100644 --- a/webapp/src/app/api/model/publicationTypeCount.ts +++ b/webapp/src/app/api/model/publicationTypeCount.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,14 +9,18 @@ */ import { PublicationType } from './publicationType'; -export interface PublicationTypeCount { - /** - * The OpenAlex work type. - */ - type: PublicationType; - /** - * Number of matching works of this type. - */ - count: number; + +export interface PublicationTypeCount { + /** + * The OpenAlex work type. + */ + type: PublicationType; + /** + * Number of matching works of this type. + */ + count: number; } -export namespace PublicationTypeCount {} +export namespace PublicationTypeCount { +} + + diff --git a/webapp/src/app/api/model/publicationTypeCountsRequest.ts b/webapp/src/app/api/model/publicationTypeCountsRequest.ts index 294ce4c7..a9f3c30c 100644 --- a/webapp/src/app/api/model/publicationTypeCountsRequest.ts +++ b/webapp/src/app/api/model/publicationTypeCountsRequest.ts @@ -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,23 +11,27 @@ import { Timespan } from './timespan'; import { CareerStage } from './careerStage'; import { KeywordOperator } from './keywordOperator'; -export interface PublicationTypeCountsRequest { - /** - * One or more keywords to match works against. - */ - keywords: Array; - /** - * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. - */ - operator?: KeywordOperator; - /** - * How the \'keywords\' values are matched: True means they are OpenAlex topic ids matched against the work\'s topics, False means they are raw keywords matched as phrases in the work\'s title, abstract, keywords and topic names. Defaults to False. - */ - fuzzy?: boolean; - /** - * Optional filter: only count works of authors in one of these career stages. Empty = no filter. - */ - career_stages?: Array; - timespan?: Timespan | null; + +export interface PublicationTypeCountsRequest { + /** + * One or more keywords to match works against. + */ + keywords: Array; + /** + * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. + */ + operator?: KeywordOperator; + /** + * How the \'keywords\' values are matched: True means they are OpenAlex topic ids matched against the work\'s topics, False means they are raw keywords matched as phrases in the work\'s title, abstract, keywords and topic names. Defaults to False. + */ + fuzzy?: boolean; + /** + * Optional filter: only count works of authors in one of these career stages. Empty = no filter. + */ + career_stages?: Array; + timespan?: Timespan | null; } -export namespace PublicationTypeCountsRequest {} +export namespace PublicationTypeCountsRequest { +} + + diff --git a/webapp/src/app/api/model/rankedAuthor.ts b/webapp/src/app/api/model/rankedAuthor.ts index cee57a50..6f82a6d3 100644 --- a/webapp/src/app/api/model/rankedAuthor.ts +++ b/webapp/src/app/api/model/rankedAuthor.ts @@ -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,42 +9,46 @@ */ import { CareerStage } from './careerStage'; -export interface RankedAuthor { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * Number of matching works by this author. - */ - works_count: number; - /** - * Total citations across this author\'s matching works. - */ - citations_count: number; - /** - * Number of Handelsregister company connections matched by the author\'s name (proxy for company foundations). - */ - companies_count?: number; - /** - * Number of news articles that mention the author by exact name (proxy for media visibility). - */ - news_count?: number; - /** - * Number of patents matched to the author (from the precomputed org_patents index). - */ - patents_count?: number; - /** - * Normalized weighted score used for ranking. - */ - score?: number; - /** - * Career stage derived from the author\'s active publication years. - */ - career_stage?: CareerStage; + +export interface RankedAuthor { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * Number of matching works by this author. + */ + works_count: number; + /** + * Total citations across this author\'s matching works. + */ + citations_count: number; + /** + * Number of Handelsregister company connections matched by the author\'s name (proxy for company foundations). + */ + companies_count?: number; + /** + * Number of news articles that mention the author by exact name (proxy for media visibility). + */ + news_count?: number; + /** + * Number of patents matched to the author (from the precomputed org_patents index). + */ + patents_count?: number; + /** + * Normalized weighted score used for ranking. + */ + score?: number; + /** + * Career stage derived from the author\'s active publication years. + */ + career_stage?: CareerStage; } -export namespace RankedAuthor {} +export namespace RankedAuthor { +} + + diff --git a/webapp/src/app/api/model/rankingWeights.ts b/webapp/src/app/api/model/rankingWeights.ts index 5f1d2df4..4ef2c4a1 100644 --- a/webapp/src/app/api/model/rankingWeights.ts +++ b/webapp/src/app/api/model/rankingWeights.ts @@ -1,32 +1,34 @@ /** * 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 RankingWeights { - /** - * Weight for the citation metric (0.0 - 1.0). - */ - citation: number; - /** - * Weight for the works metric (0.0 - 1.0). - */ - works: number; - /** - * Weight for the company-foundations metric (0.0 - 1.0). - */ - companies?: number; - /** - * Weight for the news/media-visibility metric (0.0 - 1.0). - */ - news?: number; - /** - * Weight for the patents metric (0.0 - 1.0). - */ - patents?: number; + +export interface RankingWeights { + /** + * Weight for the citation metric (0.0 - 1.0). + */ + citation: number; + /** + * Weight for the works metric (0.0 - 1.0). + */ + works: number; + /** + * Weight for the company-foundations metric (0.0 - 1.0). + */ + companies?: number; + /** + * Weight for the news/media-visibility metric (0.0 - 1.0). + */ + news?: number; + /** + * Weight for the patents metric (0.0 - 1.0). + */ + patents?: number; } + diff --git a/webapp/src/app/api/model/registryHealth.ts b/webapp/src/app/api/model/registryHealth.ts index dc9411bd..e7bd7aed 100644 --- a/webapp/src/app/api/model/registryHealth.ts +++ b/webapp/src/app/api/model/registryHealth.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface RegistryHealth { - reachable: boolean; - detail: string; - host: string; + +export interface RegistryHealth { + reachable: boolean; + detail: string; + host: string; } + diff --git a/webapp/src/app/api/model/researchAreaStatistics.ts b/webapp/src/app/api/model/researchAreaStatistics.ts new file mode 100644 index 00000000..abc14fb2 --- /dev/null +++ b/webapp/src/app/api/model/researchAreaStatistics.ts @@ -0,0 +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. + */ + + +/** + * How one research area is represented in the cohort versus the shortlist. + */ +export interface ResearchAreaStatistics { + /** + * Dimensions FOR 2-digit division code. + */ + code: string; + label?: string | null; + cohort_count?: number; + /** + * Share of the scoreable cohort (0-1). + */ + cohort_share?: number; + shortlist_count?: number; + shortlist_share?: number; + robust_count?: number; + robust_share?: number; + ratio?: number | null; +} + diff --git a/webapp/src/app/api/model/researcherDetail.ts b/webapp/src/app/api/model/researcherDetail.ts new file mode 100644 index 00000000..3ed51e74 --- /dev/null +++ b/webapp/src/app/api/model/researcherDetail.ts @@ -0,0 +1,59 @@ +/** + * 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 { FounderPotential } from './founderPotential'; +import { MultiplierTag } from './multiplierTag'; +import { MultiplierPeerRanks } from './multiplierPeerRanks'; +import { FounderFeatures } from './founderFeatures'; +import { ResearcherMetrics } from './researcherMetrics'; +import { CareerBucket } from './careerBucket'; + + +/** + * Everything the index holds for one researcher. + */ +export interface ResearcherDetail { + /** + * OpenAlex author id, short form (e.g. A5087456839). + */ + author_id: string; + display_name?: string | null; + career_bucket?: CareerBucket | null; + /** + * Distinct calendar years with at least one publication. + */ + active_years?: number; + n_works?: number; + /** + * Merged-identity heuristic (debut before 1970 or a span over 60 years). Treat evidence as low confidence. + */ + suspicious_profile?: boolean; + /** + * Archetypes this person qualifies for; a person can hold 0-3. + */ + tags?: Array; + multiplier_peer_ranks?: MultiplierPeerRanks; + /** + * Best of the three sub-scores (0-1). + */ + max_multiplier_peer_rank?: number; + /** + * The primary institution this document belongs to. + */ + institution_id: string; + metrics?: ResearcherMetrics; + founder_potential?: FounderPotential; + founder_features?: FounderFeatures; + computed_at?: string | null; + config_hash?: string | null; +} +export namespace ResearcherDetail { +} + + diff --git a/webapp/src/app/api/model/researcherMetrics.ts b/webapp/src/app/api/model/researcherMetrics.ts new file mode 100644 index 00000000..410d9c77 --- /dev/null +++ b/webapp/src/app/api/model/researcherMetrics.ts @@ -0,0 +1,34 @@ +/** + * 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 { MetricValue } from './metricValue'; + + +/** + * Raw multiplier metrics paired with their peer ranks. + */ +export interface ResearcherMetrics { + betweenness?: MetricValue; + brokerage?: MetricValue; + constraint?: MetricValue; + field_entropy?: MetricValue; + cross_institution_share?: MetricValue; + strength?: MetricValue; + n_coauthors?: MetricValue; + juniors_mentored?: MetricValue; + junior_progression_rate?: MetricValue; + mentoring_rate?: MetricValue; + last_author_with_junior_first?: MetricValue; + industry_coauthor_share?: MetricValue; + industry_coauthor_share_shrunk?: MetricValue; + patent_count?: MetricValue; + cordis_eu_projects?: MetricValue; + news_mentions?: MetricValue; +} + diff --git a/webapp/src/app/api/model/researcherSortBy.ts b/webapp/src/app/api/model/researcherSortBy.ts new file mode 100644 index 00000000..6a8d0f9a --- /dev/null +++ b/webapp/src/app/api/model/researcherSortBy.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const ResearcherSortBy = { + Bridger: 'bridger', + Mentor: 'mentor', + Amplifier: 'amplifier', + Max: 'max' +} as const; +export type ResearcherSortBy = typeof ResearcherSortBy[keyof typeof ResearcherSortBy]; + diff --git a/webapp/src/app/api/model/researcherSummary.ts b/webapp/src/app/api/model/researcherSummary.ts new file mode 100644 index 00000000..4ad0812c --- /dev/null +++ b/webapp/src/app/api/model/researcherSummary.ts @@ -0,0 +1,47 @@ +/** + * 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 { MultiplierTag } from './multiplierTag'; +import { MultiplierPeerRanks } from './multiplierPeerRanks'; +import { CareerBucket } from './careerBucket'; + + +/** + * Compact researcher row shared by the list endpoints. + */ +export interface ResearcherSummary { + /** + * OpenAlex author id, short form (e.g. A5087456839). + */ + author_id: string; + display_name?: string | null; + career_bucket?: CareerBucket | null; + /** + * Distinct calendar years with at least one publication. + */ + active_years?: number; + n_works?: number; + /** + * Merged-identity heuristic (debut before 1970 or a span over 60 years). Treat evidence as low confidence. + */ + suspicious_profile?: boolean; + /** + * Archetypes this person qualifies for; a person can hold 0-3. + */ + tags?: Array; + multiplier_peer_ranks?: MultiplierPeerRanks; + /** + * Best of the three sub-scores (0-1). + */ + max_multiplier_peer_rank?: number; +} +export namespace ResearcherSummary { +} + + diff --git a/webapp/src/app/api/model/researcherSummaryPage.ts b/webapp/src/app/api/model/researcherSummaryPage.ts new file mode 100644 index 00000000..93f6fcc5 --- /dev/null +++ b/webapp/src/app/api/model/researcherSummaryPage.ts @@ -0,0 +1,34 @@ +/** + * 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 { ResearcherSummary } from './researcherSummary'; + + +/** + * A paginated list of researchers. + */ +export interface ResearcherSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; +} + diff --git a/webapp/src/app/api/model/selectedAuthorsRequest.ts b/webapp/src/app/api/model/selectedAuthorsRequest.ts index 9979fb5c..9eac73a6 100644 --- a/webapp/src/app/api/model/selectedAuthorsRequest.ts +++ b/webapp/src/app/api/model/selectedAuthorsRequest.ts @@ -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,27 +11,31 @@ import { Timespan } from './timespan'; import { KeywordOperator } from './keywordOperator'; import { PublicationType } from './publicationType'; -export interface SelectedAuthorsRequest { - /** - * OpenAlex IDs of the authors to rank. - */ - author_ids: Array; - /** - * One or more keywords defining the topic. - */ - keywords: Array; - /** - * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. - */ - operator?: KeywordOperator; - /** - * How the \'keywords\' values are matched: True means they are OpenAlex topic ids matched against the work\'s topics, False means they are raw keywords matched as phrases in the work\'s title, abstract, keywords and topic names. Defaults to False. - */ - fuzzy?: boolean; - /** - * Optional filter: only count works of these publication types. Empty = no filter. - */ - publication_types?: Array; - timespan?: Timespan | null; + +export interface SelectedAuthorsRequest { + /** + * OpenAlex IDs of the authors to rank. + */ + author_ids: Array; + /** + * One or more keywords defining the topic. + */ + keywords: Array; + /** + * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. + */ + operator?: KeywordOperator; + /** + * How the \'keywords\' values are matched: True means they are OpenAlex topic ids matched against the work\'s topics, False means they are raw keywords matched as phrases in the work\'s title, abstract, keywords and topic names. Defaults to False. + */ + fuzzy?: boolean; + /** + * Optional filter: only count works of these publication types. Empty = no filter. + */ + publication_types?: Array; + timespan?: Timespan | null; } -export namespace SelectedAuthorsRequest {} +export namespace SelectedAuthorsRequest { +} + + diff --git a/webapp/src/app/api/model/showcase.ts b/webapp/src/app/api/model/showcase.ts new file mode 100644 index 00000000..261586c2 --- /dev/null +++ b/webapp/src/app/api/model/showcase.ts @@ -0,0 +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. + */ +import { ShowcaseEntry } from './showcaseEntry'; + + +export interface Showcase { + institution_id: string; + /** + * Up to four entries; fewer if an archetype has no tagged people. + */ + entries?: Array; +} + diff --git a/webapp/src/app/api/model/showcaseEntry.ts b/webapp/src/app/api/model/showcaseEntry.ts new file mode 100644 index 00000000..633a2d86 --- /dev/null +++ b/webapp/src/app/api/model/showcaseEntry.ts @@ -0,0 +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. + */ +import { ShowcaseKind } from './showcaseKind'; +import { ResearcherSummary } from './researcherSummary'; + + +export interface ShowcaseEntry { + /** + * Which archetype this person illustrates; \'example\' is the top scorer who just misses the tag threshold. + */ + kind: ShowcaseKind; + researcher: ResearcherSummary; +} +export namespace ShowcaseEntry { +} + + diff --git a/webapp/src/app/api/model/showcaseKind.ts b/webapp/src/app/api/model/showcaseKind.ts new file mode 100644 index 00000000..6edbbe31 --- /dev/null +++ b/webapp/src/app/api/model/showcaseKind.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const ShowcaseKind = { + Bridger: 'bridger', + Mentor: 'mentor', + Amplifier: 'amplifier', + Example: 'example' +} as const; +export type ShowcaseKind = typeof ShowcaseKind[keyof typeof ShowcaseKind]; + diff --git a/webapp/src/app/api/model/startCollaborationGraphResponse.ts b/webapp/src/app/api/model/startCollaborationGraphResponse.ts index f53629fe..c844ea93 100644 --- a/webapp/src/app/api/model/startCollaborationGraphResponse.ts +++ b/webapp/src/app/api/model/startCollaborationGraphResponse.ts @@ -1,16 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface StartCollaborationGraphResponse { - /** - * The ID of the collaboration graph. - */ - graph_id: string; + +export interface StartCollaborationGraphResponse { + /** + * The ID of the collaboration graph. + */ + graph_id: string; } + diff --git a/webapp/src/app/api/model/subfieldDomain.ts b/webapp/src/app/api/model/subfieldDomain.ts index b2228d75..107f6ee2 100644 --- a/webapp/src/app/api/model/subfieldDomain.ts +++ b/webapp/src/app/api/model/subfieldDomain.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * The domain containing this subfield (top level of hierarchy). */ -export interface SubfieldDomain { - id?: string | null; - display_name?: string | null; +export interface SubfieldDomain { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/subfieldField.ts b/webapp/src/app/api/model/subfieldField.ts index 8aff75ea..f21b9031 100644 --- a/webapp/src/app/api/model/subfieldField.ts +++ b/webapp/src/app/api/model/subfieldField.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * The field containing this subfield (parent level). */ -export interface SubfieldField { - id?: string | null; - display_name?: string | null; +export interface SubfieldField { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/subfieldNode.ts b/webapp/src/app/api/model/subfieldNode.ts index 7eec805d..2904b5c7 100644 --- a/webapp/src/app/api/model/subfieldNode.ts +++ b/webapp/src/app/api/model/subfieldNode.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { TopicNode } from './topicNode'; -export interface SubfieldNode { - /** - * The OpenAlex ID of the subfield. - */ - id: string; - /** - * The subfield display name. - */ - name: string; - /** - * Number of works whose primary topic belongs to this subfield. - */ - count: number; - /** - * Primary topics within this subfield, largest first. - */ - topics?: Array; + +export interface SubfieldNode { + /** + * The OpenAlex ID of the subfield. + */ + id: string; + /** + * The subfield display name. + */ + name: string; + /** + * Number of works whose primary topic belongs to this subfield. + */ + count: number; + /** + * Primary topics within this subfield, largest first. + */ + topics?: Array; } + diff --git a/webapp/src/app/api/model/topAuthor.ts b/webapp/src/app/api/model/topAuthor.ts index bc431723..6a74fa91 100644 --- a/webapp/src/app/api/model/topAuthor.ts +++ b/webapp/src/app/api/model/topAuthor.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopAuthor { - id?: string | null; - name: string; - count: number; + +export interface TopAuthor { + id?: string | null; + name: string; + count: number; } + diff --git a/webapp/src/app/api/model/topAuthorStatistics.ts b/webapp/src/app/api/model/topAuthorStatistics.ts index 69949f0c..05af3ed5 100644 --- a/webapp/src/app/api/model/topAuthorStatistics.ts +++ b/webapp/src/app/api/model/topAuthorStatistics.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,11 +9,13 @@ */ import { TopAuthor } from './topAuthor'; -export interface TopAuthorStatistics { - institution_id: string; - works: Array; - projects: Array; - eu_projects: Array; - patents: Array; - news: Array; + +export interface TopAuthorStatistics { + institution_id: string; + works: Array; + projects: Array; + eu_projects: Array; + patents: Array; + news: Array; } + diff --git a/webapp/src/app/api/model/topTopicItem.ts b/webapp/src/app/api/model/topTopicItem.ts index e6a151d4..2ae026c1 100644 --- a/webapp/src/app/api/model/topTopicItem.ts +++ b/webapp/src/app/api/model/topTopicItem.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopTopicItem { - name: string; - count: number; + +export interface TopTopicItem { + name: string; + count: number; } + diff --git a/webapp/src/app/api/model/topTopicsResponse.ts b/webapp/src/app/api/model/topTopicsResponse.ts index 4bac3de8..7f109033 100644 --- a/webapp/src/app/api/model/topTopicsResponse.ts +++ b/webapp/src/app/api/model/topTopicsResponse.ts @@ -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,6 +9,8 @@ */ import { TopTopicItem } from './topTopicItem'; -export interface TopTopicsResponse { - items: Array; + +export interface TopTopicsResponse { + items: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmap.ts b/webapp/src/app/api/model/topicHeatmap.ts index 64e915a5..be36dc40 100644 --- a/webapp/src/app/api/model/topicHeatmap.ts +++ b/webapp/src/app/api/model/topicHeatmap.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,11 @@ */ import { TopicHeatmapField } from './topicHeatmapField'; -export interface TopicHeatmap { - institution_id: string; - organization_name: string; - years: Array; - fields: Array; + +export interface TopicHeatmap { + institution_id: string; + organization_name: string; + years: Array; + fields: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmapField.ts b/webapp/src/app/api/model/topicHeatmapField.ts index 7dd49acb..eb1f08f0 100644 --- a/webapp/src/app/api/model/topicHeatmapField.ts +++ b/webapp/src/app/api/model/topicHeatmapField.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,10 +10,12 @@ import { TopicHeatmapSubfield } from './topicHeatmapSubfield'; import { TopicHeatmapValue } from './topicHeatmapValue'; -export interface TopicHeatmapField { - id: string; - name: string; - total: number; - values: Array; - subfields: Array; + +export interface TopicHeatmapField { + id: string; + name: string; + total: number; + values: Array; + subfields: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmapSubfield.ts b/webapp/src/app/api/model/topicHeatmapSubfield.ts index 5ed69887..b352aebe 100644 --- a/webapp/src/app/api/model/topicHeatmapSubfield.ts +++ b/webapp/src/app/api/model/topicHeatmapSubfield.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,10 +10,12 @@ import { TopicHeatmapTopic } from './topicHeatmapTopic'; import { TopicHeatmapValue } from './topicHeatmapValue'; -export interface TopicHeatmapSubfield { - id: string; - name: string; - total: number; - values: Array; - topics: Array; + +export interface TopicHeatmapSubfield { + id: string; + name: string; + total: number; + values: Array; + topics: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmapTopic.ts b/webapp/src/app/api/model/topicHeatmapTopic.ts index aca68f58..0c565a68 100644 --- a/webapp/src/app/api/model/topicHeatmapTopic.ts +++ b/webapp/src/app/api/model/topicHeatmapTopic.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,11 @@ */ import { TopicHeatmapValue } from './topicHeatmapValue'; -export interface TopicHeatmapTopic { - id: string; - name: string; - total: number; - values: Array; + +export interface TopicHeatmapTopic { + id: string; + name: string; + total: number; + values: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmapValue.ts b/webapp/src/app/api/model/topicHeatmapValue.ts index 2f5a01d9..f840b938 100644 --- a/webapp/src/app/api/model/topicHeatmapValue.ts +++ b/webapp/src/app/api/model/topicHeatmapValue.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicHeatmapValue { - year: number; - count: number; - share: number; + +export interface TopicHeatmapValue { + year: number; + count: number; + share: number; } + diff --git a/webapp/src/app/api/model/topicHierarchyDomain.ts b/webapp/src/app/api/model/topicHierarchyDomain.ts index d5804f41..6be2290d 100644 --- a/webapp/src/app/api/model/topicHierarchyDomain.ts +++ b/webapp/src/app/api/model/topicHierarchyDomain.ts @@ -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,8 +9,10 @@ */ import { TopicHierarchyField } from './topicHierarchyField'; -export interface TopicHierarchyDomain { - id?: string | null; - name: string; - fields?: Array; + +export interface TopicHierarchyDomain { + id?: string | null; + name: string; + fields?: Array; } + diff --git a/webapp/src/app/api/model/topicHierarchyField.ts b/webapp/src/app/api/model/topicHierarchyField.ts index 17713ba1..bff5c8ec 100644 --- a/webapp/src/app/api/model/topicHierarchyField.ts +++ b/webapp/src/app/api/model/topicHierarchyField.ts @@ -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,8 +9,10 @@ */ import { TopicHierarchySubfield } from './topicHierarchySubfield'; -export interface TopicHierarchyField { - id?: string | null; - name: string; - subfields?: Array; + +export interface TopicHierarchyField { + id?: string | null; + name: string; + subfields?: Array; } + diff --git a/webapp/src/app/api/model/topicHierarchyResponse.ts b/webapp/src/app/api/model/topicHierarchyResponse.ts index fcb27bff..abba3d5c 100644 --- a/webapp/src/app/api/model/topicHierarchyResponse.ts +++ b/webapp/src/app/api/model/topicHierarchyResponse.ts @@ -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,6 +9,8 @@ */ import { TopicHierarchyDomain } from './topicHierarchyDomain'; -export interface TopicHierarchyResponse { - domains?: Array; + +export interface TopicHierarchyResponse { + domains?: Array; } + diff --git a/webapp/src/app/api/model/topicHierarchySubfield.ts b/webapp/src/app/api/model/topicHierarchySubfield.ts index ceb2ca19..912b69e2 100644 --- a/webapp/src/app/api/model/topicHierarchySubfield.ts +++ b/webapp/src/app/api/model/topicHierarchySubfield.ts @@ -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,8 +9,10 @@ */ import { Topic } from './topic'; -export interface TopicHierarchySubfield { - id?: string | null; - name: string; - topics?: Array; + +export interface TopicHierarchySubfield { + id?: string | null; + name: string; + topics?: Array; } + diff --git a/webapp/src/app/api/model/topicNode.ts b/webapp/src/app/api/model/topicNode.ts index d44917db..bfc1abf9 100644 --- a/webapp/src/app/api/model/topicNode.ts +++ b/webapp/src/app/api/model/topicNode.ts @@ -1,24 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicNode { - /** - * The OpenAlex ID of the primary topic. - */ - id: string; - /** - * The primary-topic display name. - */ - name: string; - /** - * Number of works whose primary topic is this topic. - */ - count: number; + +export interface TopicNode { + /** + * The OpenAlex ID of the primary topic. + */ + id: string; + /** + * The primary-topic display name. + */ + name: string; + /** + * Number of works whose primary topic is this topic. + */ + count: number; } + diff --git a/webapp/src/app/api/model/topicPageV2.ts b/webapp/src/app/api/model/topicPageV2.ts index 5df5a490..67f1272b 100644 --- a/webapp/src/app/api/model/topicPageV2.ts +++ b/webapp/src/app/api/model/topicPageV2.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { Topic } from './topic'; -export interface TopicPageV2 { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; + +export interface TopicPageV2 { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/topicSortBy.ts b/webapp/src/app/api/model/topicSortBy.ts index b705aacc..be83fa8e 100644 --- a/webapp/src/app/api/model/topicSortBy.ts +++ b/webapp/src/app/api/model/topicSortBy.ts @@ -1,16 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const TopicSortBy = { - DisplayName: 'display_name', - WorksCount: 'works_count', - CitedByCount: 'cited_by_count', + DisplayName: 'display_name', + WorksCount: 'works_count', + CitedByCount: 'cited_by_count' } as const; -export type TopicSortBy = (typeof TopicSortBy)[keyof typeof TopicSortBy]; +export type TopicSortBy = typeof TopicSortBy[keyof typeof TopicSortBy]; + diff --git a/webapp/src/app/api/model/topicWordCloud.ts b/webapp/src/app/api/model/topicWordCloud.ts index 79620788..c55a2c9d 100644 --- a/webapp/src/app/api/model/topicWordCloud.ts +++ b/webapp/src/app/api/model/topicWordCloud.ts @@ -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,7 +9,9 @@ */ import { TopicWordCloudWord } from './topicWordCloudWord'; -export interface TopicWordCloud { - topic_id: string; - words: Array; + +export interface TopicWordCloud { + topic_id: string; + words: Array; } + diff --git a/webapp/src/app/api/model/topicWordCloudWord.ts b/webapp/src/app/api/model/topicWordCloudWord.ts index 26594854..c93d1fd0 100644 --- a/webapp/src/app/api/model/topicWordCloudWord.ts +++ b/webapp/src/app/api/model/topicWordCloudWord.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicWordCloudWord { - id: string; - name: string; - count: number; + +export interface TopicWordCloudWord { + id: string; + name: string; + count: number; } + diff --git a/webapp/src/app/api/model/trendSearchType.ts b/webapp/src/app/api/model/trendSearchType.ts index bde11a52..5495800e 100644 --- a/webapp/src/app/api/model/trendSearchType.ts +++ b/webapp/src/app/api/model/trendSearchType.ts @@ -1,20 +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. */ + export const TrendSearchType = { - Publications: 'publications', - Authors: 'authors', - Patents: 'patents', - Projects: 'projects', - News: 'news', - All: 'all', + Publications: 'publications', + Authors: 'authors', + Patents: 'patents', + Projects: 'projects', + News: 'news', + All: 'all' } as const; -export type TrendSearchType = - (typeof TrendSearchType)[keyof typeof TrendSearchType]; +export type TrendSearchType = typeof TrendSearchType[keyof typeof TrendSearchType]; + diff --git a/webapp/src/app/api/model/trendSeries.ts b/webapp/src/app/api/model/trendSeries.ts index b8ce939f..312dee1c 100644 --- a/webapp/src/app/api/model/trendSeries.ts +++ b/webapp/src/app/api/model/trendSeries.ts @@ -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,20 +9,22 @@ */ import { TopicYearlyData } from './topicYearlyData'; -export interface TrendSeries { - entity_id: string; - entity_name: string; - entity_type: TrendSeries.EntityTypeEnum; - country_code?: string | null; - topic_data: { [key: string]: Array }; + +export interface TrendSeries { + entity_id: string; + entity_name: string; + entity_type: TrendSeries.EntityTypeEnum; + country_code?: string | null; + topic_data: { [key: string]: Array; }; } export namespace TrendSeries { - export const EntityTypeEnum = { - Institution: 'institution', - Country: 'country', - Region: 'region', - Author: 'author', - } as const; - export type EntityTypeEnum = - (typeof EntityTypeEnum)[keyof typeof EntityTypeEnum]; + export const EntityTypeEnum = { + Institution: 'institution', + Country: 'country', + Region: 'region', + Author: 'author' + } as const; + export type EntityTypeEnum = typeof EntityTypeEnum[keyof typeof EntityTypeEnum]; } + + diff --git a/webapp/src/app/api/model/updateAccountRequest.ts b/webapp/src/app/api/model/updateAccountRequest.ts index db502fd9..574f5d0d 100644 --- a/webapp/src/app/api/model/updateAccountRequest.ts +++ b/webapp/src/app/api/model/updateAccountRequest.ts @@ -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,15 @@ */ import { UserRole } from './userRole'; -export interface UpdateAccountRequest { - email?: string | null; - name?: string | null; - roles?: Array | null; - organization_id?: string | null; - password?: string | null; - openalex_person_id?: string | null; - deleted?: boolean | null; - activated?: boolean | null; + +export interface UpdateAccountRequest { + email?: string | null; + name?: string | null; + roles?: Array | null; + organization_id?: string | null; + password?: string | null; + openalex_person_id?: string | null; + deleted?: boolean | null; + activated?: boolean | null; } + diff --git a/webapp/src/app/api/model/updateOrganizationRequest.ts b/webapp/src/app/api/model/updateOrganizationRequest.ts index eede4ba0..45c1e01e 100644 --- a/webapp/src/app/api/model/updateOrganizationRequest.ts +++ b/webapp/src/app/api/model/updateOrganizationRequest.ts @@ -1,16 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface UpdateOrganizationRequest { - name?: string | null; - other_inst_id?: string | null; - selected_openalex_institution_ids?: Array | null; - deleted?: boolean | null; + +export interface UpdateOrganizationRequest { + name?: string | null; + other_inst_id?: string | null; + selected_openalex_institution_ids?: Array | null; + deleted?: boolean | null; } + diff --git a/webapp/src/app/api/model/work.ts b/webapp/src/app/api/model/work.ts index 97c4d648..3fcb9511 100644 --- a/webapp/src/app/api/model/work.ts +++ b/webapp/src/app/api/model/work.ts @@ -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 @@ -24,49 +24,51 @@ import { WorkHasContent } from './workHasContent'; import { Location } from './location'; import { WorkBiblio } from './workBiblio'; + /** * A scholarly document (article, book, dataset, thesis, etc.) */ -export interface Work { - id?: string | null; - doi?: string | null; - title?: string | null; - display_name?: string | null; - publication_year?: number | null; - publication_date?: string | null; - type?: string | null; - language?: string | null; - cited_by_count?: number | null; - is_retracted?: boolean | null; - is_paratext?: boolean | null; - primary_location?: Location | null; - locations?: Array | null; - best_oa_location?: Location | null; - open_access?: OpenAccess | null; - authorships?: Array | null; - ids?: WorkIds | null; - biblio?: WorkBiblio | null; - abstract_inverted_index?: object | null; - referenced_works?: Array | null; - referenced_works_count?: number | null; - related_works?: Array | null; - topics?: Array | null; - primary_topic?: WorkTopic | null; - keywords?: Array | null; - funders?: Array | null; - awards?: Array | null; - fwci?: Fwci | null; - citation_normalized_percentile?: WorkCitationNormalizedPercentile | null; - cited_by_percentile_year?: WorkCitedByPercentileYear | null; - counts_by_year?: Array | null; - sustainable_development_goals?: Array | null; - mesh?: Array | null; - indexed_in?: Array | null; - has_content?: WorkHasContent | null; - content_url?: string | null; - created_date?: string | null; - updated_date?: string | null; - snippet?: string | null; - snippet_field?: string | null; - matched_via?: Array | null; +export interface Work { + id?: string | null; + doi?: string | null; + title?: string | null; + display_name?: string | null; + publication_year?: number | null; + publication_date?: string | null; + type?: string | null; + language?: string | null; + cited_by_count?: number | null; + is_retracted?: boolean | null; + is_paratext?: boolean | null; + primary_location?: Location | null; + locations?: Array | null; + best_oa_location?: Location | null; + open_access?: OpenAccess | null; + authorships?: Array | null; + ids?: WorkIds | null; + biblio?: WorkBiblio | null; + abstract_inverted_index?: object | null; + referenced_works?: Array | null; + referenced_works_count?: number | null; + related_works?: Array | null; + topics?: Array | null; + primary_topic?: WorkTopic | null; + keywords?: Array | null; + funders?: Array | null; + awards?: Array | null; + fwci?: Fwci | null; + citation_normalized_percentile?: WorkCitationNormalizedPercentile | null; + cited_by_percentile_year?: WorkCitedByPercentileYear | null; + counts_by_year?: Array | null; + sustainable_development_goals?: Array | null; + mesh?: Array | null; + indexed_in?: Array | null; + has_content?: WorkHasContent | null; + content_url?: string | null; + created_date?: string | null; + updated_date?: string | null; + snippet?: string | null; + snippet_field?: string | null; + matched_via?: Array | null; } + diff --git a/webapp/src/app/api/model/workClassification.ts b/webapp/src/app/api/model/workClassification.ts index e732ec26..25951d4a 100644 --- a/webapp/src/app/api/model/workClassification.ts +++ b/webapp/src/app/api/model/workClassification.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,31 +14,33 @@ import { WorkClassificationMeta } from './workClassificationMeta'; import { WorkClassificationValidation } from './workClassificationValidation'; import { WorkClassificationAuthor } from './workClassificationAuthor'; + /** * Represents a full work-classification document. */ -export interface WorkClassification { - /** - * The full OpenAlex work id/URL. - */ - work_id: string; - doi?: string | null; - title?: string | null; - publication_year?: number | null; - publication_type?: string | null; - /** - * The authors of the work. - */ - authors?: Array; - /** - * The institutions associated with the work. - */ - institutions?: Array; - /** - * The topics associated with the work. - */ - topics?: Array; - classification?: WorkClassificationDetails | null; - classification_meta?: WorkClassificationMeta | null; - validation?: WorkClassificationValidation | null; +export interface WorkClassification { + /** + * The full OpenAlex work id/URL. + */ + work_id: string; + doi?: string | null; + title?: string | null; + publication_year?: number | null; + publication_type?: string | null; + /** + * The authors of the work. + */ + authors?: Array; + /** + * The institutions associated with the work. + */ + institutions?: Array; + /** + * The topics associated with the work. + */ + topics?: Array; + classification?: WorkClassificationDetails | null; + classification_meta?: WorkClassificationMeta | null; + validation?: WorkClassificationValidation | null; } + diff --git a/webapp/src/app/api/model/workClassificationAuthor.ts b/webapp/src/app/api/model/workClassificationAuthor.ts index aef36e2b..a28e37de 100644 --- a/webapp/src/app/api/model/workClassificationAuthor.ts +++ b/webapp/src/app/api/model/workClassificationAuthor.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * An author entry within a work classification document. */ -export interface WorkClassificationAuthor { - id?: string | null; - display_name?: string | null; - orcid?: string | null; +export interface WorkClassificationAuthor { + id?: string | null; + display_name?: string | null; + orcid?: string | null; } + diff --git a/webapp/src/app/api/model/workClassificationDetails.ts b/webapp/src/app/api/model/workClassificationDetails.ts index 20593e72..e096423b 100644 --- a/webapp/src/app/api/model/workClassificationDetails.ts +++ b/webapp/src/app/api/model/workClassificationDetails.ts @@ -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,20 @@ */ import { WorkPrimaryCategory } from './workPrimaryCategory'; + /** * The core classification result for a work. */ -export interface WorkClassificationDetails { - primary_category?: WorkPrimaryCategory | null; - confidence?: string | null; - pasteur_quadrant?: string | null; - applied_orientation_score?: number | null; - insufficient_context?: boolean | null; - signals_used?: Array | null; - classification_reason?: string | null; +export interface WorkClassificationDetails { + primary_category?: WorkPrimaryCategory | null; + confidence?: string | null; + pasteur_quadrant?: string | null; + applied_orientation_score?: number | null; + insufficient_context?: boolean | null; + signals_used?: Array | null; + classification_reason?: string | null; } -export namespace WorkClassificationDetails {} +export namespace WorkClassificationDetails { +} + + diff --git a/webapp/src/app/api/model/workClassificationInstitution.ts b/webapp/src/app/api/model/workClassificationInstitution.ts index 754b1eb8..db2eae24 100644 --- a/webapp/src/app/api/model/workClassificationInstitution.ts +++ b/webapp/src/app/api/model/workClassificationInstitution.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * An institution entry within a work classification document. */ -export interface WorkClassificationInstitution { - id?: string | null; - display_name?: string | null; - ror?: string | null; +export interface WorkClassificationInstitution { + id?: string | null; + display_name?: string | null; + ror?: string | null; } + diff --git a/webapp/src/app/api/model/workClassificationMeta.ts b/webapp/src/app/api/model/workClassificationMeta.ts index 9e6619d5..eb67e185 100644 --- a/webapp/src/app/api/model/workClassificationMeta.ts +++ b/webapp/src/app/api/model/workClassificationMeta.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Metadata about how and when a classification was produced. */ -export interface WorkClassificationMeta { - model?: string | null; - prompt_version?: string | null; - classified_at?: string | null; +export interface WorkClassificationMeta { + model?: string | null; + prompt_version?: string | null; + classified_at?: string | null; } + diff --git a/webapp/src/app/api/model/workClassificationPage.ts b/webapp/src/app/api/model/workClassificationPage.ts index db7e3e0d..22b71991 100644 --- a/webapp/src/app/api/model/workClassificationPage.ts +++ b/webapp/src/app/api/model/workClassificationPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { WorkClassification } from './workClassification'; -export interface WorkClassificationPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; + +export interface WorkClassificationPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/workClassificationTopic.ts b/webapp/src/app/api/model/workClassificationTopic.ts index 34f8c96a..5ea5b9f9 100644 --- a/webapp/src/app/api/model/workClassificationTopic.ts +++ b/webapp/src/app/api/model/workClassificationTopic.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,14 +9,16 @@ */ import { WorkClassificationTopicGroup } from './workClassificationTopicGroup'; + /** * A topic entry within a work classification document. */ -export interface WorkClassificationTopic { - id?: string | null; - display_name?: string | null; - score?: number | null; - domain?: WorkClassificationTopicGroup | null; - field?: WorkClassificationTopicGroup | null; - subfield?: WorkClassificationTopicGroup | null; +export interface WorkClassificationTopic { + id?: string | null; + display_name?: string | null; + score?: number | null; + domain?: WorkClassificationTopicGroup | null; + field?: WorkClassificationTopicGroup | null; + subfield?: WorkClassificationTopicGroup | null; } + diff --git a/webapp/src/app/api/model/workClassificationTopicGroup.ts b/webapp/src/app/api/model/workClassificationTopicGroup.ts index 8e574397..58ce3fe6 100644 --- a/webapp/src/app/api/model/workClassificationTopicGroup.ts +++ b/webapp/src/app/api/model/workClassificationTopicGroup.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * A domain/field/subfield group referenced within a classification topic. */ -export interface WorkClassificationTopicGroup { - id?: string | null; - display_name?: string | null; +export interface WorkClassificationTopicGroup { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/workClassificationValidation.ts b/webapp/src/app/api/model/workClassificationValidation.ts index 46c91824..da1db647 100644 --- a/webapp/src/app/api/model/workClassificationValidation.ts +++ b/webapp/src/app/api/model/workClassificationValidation.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Validation results for a classification. */ -export interface WorkClassificationValidation { - valid?: boolean | null; - errors?: Array | null; - corrections?: Array | null; +export interface WorkClassificationValidation { + valid?: boolean | null; + errors?: Array | null; + corrections?: Array | null; } + diff --git a/webapp/src/app/api/model/workNode.ts b/webapp/src/app/api/model/workNode.ts index 47f3f756..d3e2075c 100644 --- a/webapp/src/app/api/model/workNode.ts +++ b/webapp/src/app/api/model/workNode.ts @@ -1,28 +1,30 @@ /** * 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 WorkNode { - /** - * The ID of the work. - */ - id: string; - /** - * The title of the work. - */ - display_name: string; - /** - * The publication year of the work. - */ - publication_year: number; - /** - * IDs of authors who contributed to this work. - */ - author_ids?: Array; + +export interface WorkNode { + /** + * The ID of the work. + */ + id: string; + /** + * The title of the work. + */ + display_name: string; + /** + * The publication year of the work. + */ + publication_year: number; + /** + * IDs of authors who contributed to this work. + */ + author_ids?: Array; } + diff --git a/webapp/src/app/api/model/workPage.ts b/webapp/src/app/api/model/workPage.ts index 285d2065..8490c3ab 100644 --- a/webapp/src/app/api/model/workPage.ts +++ b/webapp/src/app/api/model/workPage.ts @@ -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,25 +9,27 @@ */ import { Work } from './work'; -export interface WorkPage { - /** - * Total number of works matching the query - */ - total: number; - /** - * List of works on the current page - */ - elements: Array; - /** - * Offset of the current page - */ - offset: number; - /** - * Size of the current page - */ - size: number; - /** - * Indicates if the current page is the last page - */ - last_page: boolean; + +export interface WorkPage { + /** + * Total number of works matching the query + */ + total: number; + /** + * List of works on the current page + */ + elements: Array; + /** + * Offset of the current page + */ + offset: number; + /** + * Size of the current page + */ + size: number; + /** + * Indicates if the current page is the last page + */ + last_page: boolean; } + diff --git a/webapp/src/app/api/model/workPageV2.ts b/webapp/src/app/api/model/workPageV2.ts index bc93d6ce..a22b6855 100644 --- a/webapp/src/app/api/model/workPageV2.ts +++ b/webapp/src/app/api/model/workPageV2.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { Work } from './work'; -export interface WorkPageV2 { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; + +export interface WorkPageV2 { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } + diff --git a/webapp/src/app/api/model/workPrimaryCategory.ts b/webapp/src/app/api/model/workPrimaryCategory.ts index 563359d3..ddbbde75 100644 --- a/webapp/src/app/api/model/workPrimaryCategory.ts +++ b/webapp/src/app/api/model/workPrimaryCategory.ts @@ -1,22 +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. */ + /** * Represents the primary category of a work. */ export const WorkPrimaryCategory = { - BasicResearch: 'basic_research', - AppliedResearch: 'applied_research', - NonResearch: 'non_research', - ExperimentalDevelopment: 'experimental_development', - NotClassified: 'not_classified', + BasicResearch: 'basic_research', + AppliedResearch: 'applied_research', + NonResearch: 'non_research', + ExperimentalDevelopment: 'experimental_development', + NotClassified: 'not_classified' } as const; -export type WorkPrimaryCategory = - (typeof WorkPrimaryCategory)[keyof typeof WorkPrimaryCategory]; +export type WorkPrimaryCategory = typeof WorkPrimaryCategory[keyof typeof WorkPrimaryCategory]; + diff --git a/webapp/src/app/api/model/workSortBy.ts b/webapp/src/app/api/model/workSortBy.ts index 56f89162..7580ac82 100644 --- a/webapp/src/app/api/model/workSortBy.ts +++ b/webapp/src/app/api/model/workSortBy.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const WorkSortBy = { - Title: 'title', - Type: 'type', - PublicationYear: 'publication_year', - Language: 'language', - CitedByCount: 'cited_by_count', + Title: 'title', + Type: 'type', + PublicationYear: 'publication_year', + Language: 'language', + CitedByCount: 'cited_by_count' } as const; -export type WorkSortBy = (typeof WorkSortBy)[keyof typeof WorkSortBy]; +export type WorkSortBy = typeof WorkSortBy[keyof typeof WorkSortBy]; + -- 2.56.1 From db5591085758cc26afc9e6d3556fd73661f7c1b0 Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 4 Nov 2026 12:09:19 +0100 Subject: [PATCH 2/7] multipliers added --- service/src/main/inse/config.py | 2 +- service/src/main/inse/model.py | 5 +- webapp/src/app/api/api/dashboard.service.ts | 1861 +++++------------ webapp/src/app/app.routes.ts | 50 + .../founder-dashboard.component.html | 270 +++ .../founder-dashboard.component.scss | 538 +++++ .../founder-dashboard.component.ts | 272 +++ .../founder-potential.utils.ts | 98 + .../researcher-network.component.html | 137 ++ .../researcher-network.component.scss | 289 +++ .../researcher-network.component.ts | 139 ++ .../resolvers/founder-candidates.resolver.ts | 63 + .../resolvers/founder-statistics.resolver.ts | 24 + .../multiplier-researcher-network.resolver.ts | 12 + .../multiplier-researcher.resolver.ts | 12 + .../shared/ui/app-menu/app-menu.component.ts | 9 + webapp/src/app/shared/ui/icons.ts | 1 + .../multiplier-network-graph.component.html | 6 + .../multiplier-network-graph.component.scss | 4 + .../multiplier-network-graph.component.ts | 214 ++ .../ui/score-bar/score-bar.component.html | 13 + .../ui/score-bar/score-bar.component.scss | 58 + .../ui/score-bar/score-bar.component.ts | 50 + 23 files changed, 2826 insertions(+), 1301 deletions(-) create mode 100644 webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html create mode 100644 webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss create mode 100644 webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts create mode 100644 webapp/src/app/modules/founder-potential/founder-potential.utils.ts create mode 100644 webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html create mode 100644 webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss create mode 100644 webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts create mode 100644 webapp/src/app/resolvers/founder-candidates.resolver.ts create mode 100644 webapp/src/app/resolvers/founder-statistics.resolver.ts create mode 100644 webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts create mode 100644 webapp/src/app/resolvers/multiplier-researcher.resolver.ts create mode 100644 webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html create mode 100644 webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.scss create mode 100644 webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.ts create mode 100644 webapp/src/app/shared/ui/score-bar/score-bar.component.html create mode 100644 webapp/src/app/shared/ui/score-bar/score-bar.component.scss create mode 100644 webapp/src/app/shared/ui/score-bar/score-bar.component.ts diff --git a/service/src/main/inse/config.py b/service/src/main/inse/config.py index 3cae933d..85f80f01 100644 --- a/service/src/main/inse/config.py +++ b/service/src/main/inse/config.py @@ -93,7 +93,7 @@ class Settings(BaseSettings): environment: Literal["dev", "prod"] = "dev" token_issuer_id: str | None = None - token_hmac_key: str | None = None + token_hmac_key: str | None = "92fb8c1e6f1e868567552e02cdd3693bca689d80a09ee13207b73ab53f42bb81" skip_otk_validation: bool = True # SMTP / email config diff --git a/service/src/main/inse/model.py b/service/src/main/inse/model.py index aa1ebc3e..94748a0f 100644 --- a/service/src/main/inse/model.py +++ b/service/src/main/inse/model.py @@ -123,7 +123,10 @@ class ESIndex(StrEnum): PROJECTS_CORDIS_EU_H2020_TOPICS = "projects_cordiseu_h2020_openalex_topics" PROJECTS_CORDIS_EU_HEUROPE_TOPICS = "projects_cordiseu_heurope_openalex_topics" PATENTS_OPENALEX_KEYWORDS = "patents_openalex_keywords" - + + MULTIPLICATORS_V1 = "multiplicators_v1" + MULTIPLICATOR_NETWORKS_V1 = "multiplicator_networks_v1" + UDE_ORGANIZATION_CONTENT = "ude_organization_content_august_2025_draft" TUD_ORGANIZATION_CONTENT = "tud_organization_content_test_genja" RUB_ORGANIZATION_CONTENT = "placeholder.." diff --git a/webapp/src/app/api/api/dashboard.service.ts b/webapp/src/app/api/api/dashboard.service.ts index c39e85ff..0d2df866 100644 --- a/webapp/src/app/api/api/dashboard.service.ts +++ b/webapp/src/app/api/api/dashboard.service.ts @@ -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 { BmbfProjectStatusStatistics } from '../model/bmbfProjectStatusStatistics'; @@ -46,16 +52,21 @@ import { TopicHeatmap } from '../model/topicHeatmap'; import { TopicWordCloud } from '../model/topicWordCloud'; // @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 DashboardService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } /** * Dashboard Bmbf Project Statuses @@ -156,87 +167,43 @@ export class DashboardService extends BaseService { ); } - /** - * Dashboard Bmbf Project Statuses - * @endpoint get /api/dashboard/projects/bmbf/status - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/projects/bmbf/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Bmbf Projects - * @endpoint get /api/dashboard/statistics/projects/bmbf - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/bmbf/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Bmbf Projects @@ -317,131 +284,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/statistics/projects/bmbf`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Bund Project Topics - * @endpoint get /api/dashboard/projects/bund/topics - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBundProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/projects/bund/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Dfg Project Statuses - * @endpoint get /api/dashboard/projects/dfg/status - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/statistics/projects/bmbf`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Bund Project Topics @@ -522,131 +421,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/projects/dfg/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Dfg Project Topics - * @endpoint get /api/dashboard/projects/dfg/topics - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/projects/dfg/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Dfg Projects - * @endpoint get /api/dashboard/statistics/projects/dfg - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/bund/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Dfg Project Statuses @@ -727,131 +558,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/statistics/projects/dfg`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Eu Project Statuses - * @endpoint get /api/dashboard/projects/eu/status - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjectStatuses(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/projects/eu/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Eu Project Topics - * @endpoint get /api/dashboard/projects/eu/topics - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjectTopics(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/dfg/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Dfg Project Topics @@ -932,128 +695,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/projects/eu/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Eu Projects - * @endpoint get /api/dashboard/statistics/projects/eu - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjects(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/statistics/projects/eu`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Institutions - * @endpoint get /api/dashboard/institutions - * @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 getDashboardInstitutions(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardInstitutions(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getDashboardInstitutions(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getDashboardInstitutions(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/dfg/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Dfg Projects @@ -1134,128 +832,63 @@ export class DashboardService extends BaseService { 'to_year', ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const 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/dashboard/institutions`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Patents - * @endpoint get /api/dashboard/statistics/patents - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPatents(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/statistics/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Persons - * @endpoint get /api/dashboard/statistics/persons - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPersons(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/statistics/projects/dfg`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Eu Project Statuses @@ -1336,128 +969,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/statistics/persons`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Publications - * @endpoint get /api/dashboard/statistics/publications - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPublications(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/statistics/publications`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Statistics - * @endpoint get /api/dashboard/statistics - * @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 getDashboardStatistics(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardStatistics(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardStatistics(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardStatistics(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/eu/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Eu Project Topics @@ -1538,131 +1106,63 @@ export class DashboardService extends BaseService { 'to_year', ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const 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/dashboard/statistics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Top Authors - * @endpoint get /api/dashboard/top-authors - * @param worksPeriod - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - worksPeriod, 'works_period'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/top-authors`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Top Eu Project Authors - * @endpoint get /api/dashboard/top-authors/eu-projects - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopEuProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/eu/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Eu Projects @@ -1743,131 +1243,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/top-authors/eu-projects`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Top News Authors - * @endpoint get /api/dashboard/top-authors/news - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopNewsAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/top-authors/news`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Top Patent Authors - * @endpoint get /api/dashboard/top-authors/patents - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopPatentAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/statistics/projects/eu`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Institutions @@ -2052,132 +1484,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/top-authors/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Top Project Authors - * @endpoint get /api/dashboard/top-authors/projects - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopProjectAuthors(institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/top-authors/projects`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Top Work Authors - * @endpoint get /api/dashboard/top-authors/works - * @param worksPeriod - * @param institutionId - * @param fromYear - * @param toYear - * @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 getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopWorkAuthors(worksPeriod?: 'all_time' | 'last_5_years', institutionId?: string, fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/statistics/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Persons @@ -2258,139 +1621,63 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/top-authors/works`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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, + ); } - /** - * Dashboard Topic Heatmap - * @endpoint get /api/dashboard/topic-heatmap - * @param institutionId - * @param fromYear - * @param toYear - * @param limit - * @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 getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopicHeatmap(institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - limit, 'limit'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - 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/dashboard/topic-heatmap`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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'; + } } - /** - * Dashboard Topic Word Cloud - * @endpoint get /api/dashboard/topic-wordcloud - * @param topicId - * @param institutionId - * @param fromYear - * @param toYear - * @param limit - * @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 getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopicWordCloud(topicId: string, institutionId?: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (topicId === null || topicId === undefined) { - throw new Error('Required parameter topicId was null or undefined when calling getDashboardTopicWordCloud.'); - } + let localVarPath = `/api/dashboard/statistics/persons`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } /** * Dashboard Publications @@ -2471,48 +1758,24 @@ export class DashboardService extends BaseService { 'to_year', ); - 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; - - - 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/dashboard/topic-wordcloud`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: 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 = diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 92dcfd7a..702320d6 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -1,6 +1,10 @@ import { Routes } from '@angular/router'; import { guestOnlyGuard } from './shared/guards/guest-only.guard'; import { personListResolver } from './resolvers/person-list.resolver'; +import { founderStatisticsResolver } from './resolvers/founder-statistics.resolver'; +import { founderCandidatesResolver } from './resolvers/founder-candidates.resolver'; +import { multiplierResearcherResolver } from './resolvers/multiplier-researcher.resolver'; +import { multiplierResearcherNetworkResolver } from './resolvers/multiplier-researcher-network.resolver'; import { personBioResolver } from './resolvers/person-bio.resolver'; import { personPatentsResolver } from './resolvers/person-patents.resolver'; import { personResolver } from './resolvers/person.resolver'; @@ -136,6 +140,52 @@ export const routes: Routes = [ (mod) => mod.CompareAuthorsComponent, ), }, + { + path: 'founders', + canActivate: [ + roleGuard([ + UserRole.User, + UserRole.Manager, + UserRole.Admin, + UserRole.SuperAdmin, + ]), + ], + loadComponent: () => + import( + './modules/founder-potential/founder-dashboard/founder-dashboard.component' + ).then((mod) => mod.FounderDashboardComponent), + resolve: { + statistics: founderStatisticsResolver, + candidates: founderCandidatesResolver, + }, + runGuardsAndResolvers: (from, to) => { + const keys = ['threshold', 'screened', 'page', 'size', 'sortBy', 'sortOrder']; + return keys.some( + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), + ); + }, + }, + { + path: 'founders/:authorId', + canActivate: [ + roleGuard([ + UserRole.User, + UserRole.Manager, + UserRole.Admin, + UserRole.SuperAdmin, + ]), + ], + loadComponent: () => + import( + './modules/founder-potential/researcher-network/researcher-network.component' + ).then((mod) => mod.ResearcherNetworkComponent), + resolve: { + researcher: multiplierResearcherResolver, + network: multiplierResearcherNetworkResolver, + }, + runGuardsAndResolvers: (from, to) => + from.params['authorId'] !== to.params['authorId'], + }, { path: 'bookmarks', canActivate: [ diff --git a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html new file mode 100644 index 00000000..69c55fad --- /dev/null +++ b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html @@ -0,0 +1,270 @@ +
+
+

Universität · Gründungspotenzial

+

Welche Forschenden könnten künftig gründen?

+

+ Ein Modell bewertet jede Forschende und jeden Forschenden gegen rund 9.000 + Wissenschaftler:innen aus acht Universitäten. Der Score allein ist noch + keine Shortlist – viele Top-Scores sind fehlerhafte Datensätze. Dieses + Dashboard zeigt zuerst das Screening, danach die Personen, die es + bestehen. +

+
+ +
+
+
Forschende im Index
+
{{ fmtInt(kpis().total) }}
+
gesamte Kohorte
+
+
+
Bestehen Datenqualität
+
{{ fmtInt(kpis().passed) }}
+
{{ kpis().share }} % der Kohorte
+
+
+
Auf der Shortlist
+
{{ fmtInt(kpis().shortlisted) }}
+
+ Score ≥ {{ fmt1(threshold()) }}{{ screened() ? ', gescreent' : ', ungescreent' }} +
+
+
+ +
+

1 · Warum die Shortlist klein ist

+

+ Jeder Balken zeigt, wie viele Personen nach einer Screening-Regel übrig + bleiben. Die mittleren Regeln existieren, weil OpenAlex-Profile manchmal + zusammengeführt oder falsch datiert sind – und dieses Modell darauf + besonders empfindlich reagiert. +

+
+ @for (row of funnel(); track row.key) { +
+
{{ row.label }}
+
+
+
+
{{ fmtInt(row.count) }}
+
{{ row.lost ? '−' + fmtInt(row.lost) : '' }}
+
+ } +
+
+ +
+

2 · Die Shortlist

+

+ Verschiebe den Schwellenwert, um Listenlänge gegen Sicherheit abzuwägen. + Aktiviere das Screening für eine handlungsfähige Liste; deaktiviere es, um + zu sehen, was der rohe Modell-Score hervorgebracht hätte – orange Zeilen + sind Datensätze, die eine Datenqualitätsregel verletzt haben. Klicke auf + eine Person, um ihre Karte zu öffnen. +

+ +
+ + + Fehlerhafte Datensätze aussortieren + + + {{ fmtInt(total()) }} {{ total() === 1 ? 'Person' : 'Personen' }} + +
+ +
+
+ Forschende:r + Score + Innerhalb 1 / 3 / 5 J. + Evidenz + +
+ + @for (row of rows(); track row.id) { +
+ + {{ row.name }} + + {{ row.careerBucket ?? '–' }}@if (row.areaLabel) { · {{ row.areaLabel }} } + + + + + @if (row.score !== null) { + + + + {{ fmt1(row.score) }} + } @else { + – + } + + + + + @for (v of row.within; track $index) { + + } + + + {{ row.within.map((v) => (v === null ? '–' : round(v))).join(' · ') }} + + + + + {{ fmtInt(row.pubs) }} Publ. + @if (row.patents) { · {{ fmtInt(row.patents) }} Pat. } + @if (row.industry) { · {{ fmtInt(row.industry) }} Ind. } + + + + @if (!row.passed && row.flagLabel) { + {{ row.flagLabel }} + } + + +
+ } @empty { +
+ Niemand erreicht diesen Schwellenwert, sobald fehlerhafte Datensätze + aussortiert sind. Senke den Schwellenwert für eine handlungsfähige + Liste. +
+ } +
+ + + + @if (selectedRow(); as row) { +
+
+
+

{{ row.name }}

+
+ {{ row.careerBucket ?? '–' }}@if (row.areaLabel) { · {{ row.areaLabel }} } · + {{ fmtInt(row.activeYears) }} aktive Jahre + @if (!row.passed && row.flagLabel) { + · auffällig: {{ row.flagLabel }} + } +
+
+ +
+ +
+
+
Gründungspotenzial
+

Rang gegen ~9.000 Wissenschaftler:innen an anderen Universitäten.

+ + + + +
+ +
+
Multiplikator-Rollen
+

+ Rang gegen Peers dieser Universität auf derselben Karrierestufe. +

+ + + +
+ @if (row.tags.length) { + @for (tag of row.tags; track tag) { + Badge: {{ tagLabel(tag) }} + } + } @else { + kein Multiplikator-Badge + } +
+
+
+ +
+ Publikationen {{ fmtInt(row.pubs) }} + Patente {{ fmtInt(row.patents) }} + Industrie-Publikationen {{ fmtInt(row.industry) }} + Förderungen {{ fmtInt(row.grants) }} + aktive Jahre {{ fmtInt(row.activeYears) }} +
+
+ } +
+ +
+

3 · Woher die Kandidat:innen kommen

+

Beide Panels nutzen die Shortlist am aktuellen Schwellenwert.

+
+
+
Karrierestufe
+
+ @for (s of stageRows(); track s.label) { +
+ {{ s.label }} + + + + {{ s.count }} / {{ fmtInt(s.pool) }} +
+ } +
+
Balken sind Kandidatenzahlen; die graue Zahl ist der gescreente Pool der Stufe.
+
+
+
Forschungsfeld, vs. Anteil an der Kohorte
+
+ @for (a of areaRows(); track a.label) { +
+ {{ a.label }} + + + + {{ a.count }} · {{ fmt1(a.cohortShare) }} % der Kohorte +
+ } +
+
+ Balken sind Kandidatenzahlen. Die graue Zahl ist der Anteil des Feldes an der + gescreenten Kohorte – ein Feld deutlich über seinem Anteil überproduziert. +
+
+
+
+
diff --git a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss new file mode 100644 index 00000000..06365095 --- /dev/null +++ b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss @@ -0,0 +1,538 @@ +.founder-dashboard { + max-width: 1080px; + margin: 0 auto; + padding: 24px 8px 64px; +} + +.hero { + margin-bottom: 8px; + + .eyebrow { + font-size: 11px; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--sg-text-soft); + margin: 0 0 10px; + } + + h1 { + font-size: 30px; + line-height: 1.15; + margin: 0 0 12px; + font-weight: 700; + color: var(--sg-text); + } + + .lede { + color: var(--sg-text-muted); + font-size: 15.5px; + margin: 0; + max-width: 66ch; + } +} + +section { + margin-top: 40px; +} + +h2 { + font-size: 20px; + margin: 0 0 4px; + font-weight: 700; + color: var(--sg-text); +} + +.note { + font-size: 13px; + color: var(--sg-text-muted); + margin: 2px 0 18px; + max-width: 74ch; + line-height: 1.5; +} + +// -- KPIs --------------------------------------------------------------- + +.kpis { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); + gap: 12px; + margin-top: 26px; +} + +.kpi { + background: var(--sg-surface-muted); + border: 1px solid var(--sg-border); + border-radius: 10px; + padding: 14px 16px; + + .kpi__key { + font-size: 11px; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--sg-text-soft); + margin-bottom: 6px; + } + + .kpi__value { + font-size: 30px; + font-weight: 700; + line-height: 1; + letter-spacing: -0.02em; + color: var(--sg-text); + font-variant-numeric: tabular-nums; + } + + .kpi__sub { + font-size: 12px; + color: var(--sg-text-muted); + margin-top: 5px; + } + + &.kpi--hero .kpi__value { + color: var(--sg-blue-highlight); + } +} + +// -- Funnel ------------------------------------------------------------- + +.funnel { + display: flex; + flex-direction: column; + gap: 9px; +} + +.funnel__row { + display: grid; + grid-template-columns: minmax(140px, 240px) 1fr 64px 56px; + gap: 12px; + align-items: center; +} + +.funnel__label { + font-size: 13px; + color: var(--sg-text-muted); +} + +.funnel__track { + background: var(--sg-surface-muted); + border-radius: 4px; + height: 22px; + overflow: hidden; + border: 1px solid var(--sg-border); +} + +.funnel__bar { + height: 100%; + background: var(--sg-blue-highlight); + border-radius: 0 4px 4px 0; +} + +.funnel__count { + font-size: 13px; + font-variant-numeric: tabular-nums; + color: var(--sg-text); + text-align: right; + font-weight: 600; +} + +.funnel__lost { + font-size: 11.5px; + color: var(--sg-error); + text-align: right; +} + +// -- Controls ----------------------------------------------------------- + +.controls { + display: flex; + flex-wrap: wrap; + gap: 10px 22px; + align-items: center; + padding: 12px 14px; + background: var(--sg-surface-muted); + border: 1px solid var(--sg-border); + border-radius: 10px; + margin-bottom: 16px; + font-size: 13px; + + &__range { + display: inline-flex; + align-items: center; + gap: 10px; + color: var(--sg-text-muted); + } + + &__value { + font-weight: 700; + font-variant-numeric: tabular-nums; + color: var(--sg-text); + min-width: 24px; + display: inline-block; + } + + &__count { + color: var(--sg-text-soft); + margin-left: auto; + } + + input[type='range'] { + accent-color: var(--sg-blue-highlight); + width: 150px; + } +} + +// -- List --------------------------------------------------------------- + +.list { + border: 1px solid var(--sg-border); + border-radius: 10px; + overflow: hidden; +} + +.list__head, +.list__row { + display: grid; + grid-template-columns: 1.5fr 0.9fr 1.15fr 0.95fr auto; + gap: 12px; + padding: 9px 14px; + align-items: center; + font-size: 13px; +} + +.list__head { + background: var(--sg-surface-muted); + border-bottom: 1px solid var(--sg-border); + font-size: 11px; + letter-spacing: 0.07em; + text-transform: uppercase; + color: var(--sg-text-soft); +} + +.list__row { + border: none; + border-bottom: 1px solid var(--sg-border); + width: 100%; + text-align: left; + color: inherit; + background: none; + cursor: pointer; + font: inherit; + color: var(--sg-text); + + &:last-child { + border-bottom: none; + } + + &:hover, + &:focus-visible { + background: var(--sg-primary-soft); + outline: none; + } + + &--flag { + background: var(--sg-error-soft); + + &:hover { + background: var(--sg-error-soft); + filter: brightness(0.97); + } + } + + &--selected { + box-shadow: inset 3px 0 0 var(--sg-blue-highlight); + } +} + +.list__nm { + font-weight: 600; + color: var(--sg-text); +} + +.list__sub { + display: block; + font-size: 11.5px; + color: var(--sg-text-soft); +} + +.list__score { + display: flex; + align-items: center; + gap: 7px; +} + +.list__meter { + display: block; + background: var(--sg-surface-soft); + border-radius: 3px; + height: 9px; + flex: 1; + min-width: 44px; + overflow: hidden; +} + +.list__meter-fill { + display: block; + height: 100%; + background: var(--sg-blue-highlight); + border-radius: 0 3px 3px 0; +} + +.list__score-value { + font-variant-numeric: tabular-nums; + font-size: 12.5px; + min-width: 34px; + text-align: right; + font-weight: 600; +} + +.list__within { + display: flex; + align-items: center; + gap: 7px; +} + +.list__hist { + display: flex; + gap: 2px; + align-items: flex-end; + height: 22px; + + i { + display: block; + width: 9px; + background: var(--sg-blue-highlight); + border-radius: 2px 2px 0 0; + opacity: 0.85; + } +} + +.list__within-nums { + font-size: 12px; + color: var(--sg-text-muted); + font-variant-numeric: tabular-nums; +} + +.list__evidence { + font-variant-numeric: tabular-nums; + color: var(--sg-text-muted); + font-size: 12.5px; +} + +.list__actions { + display: flex; + align-items: center; + gap: 8px; + justify-content: flex-end; +} + +.warn-pill { + font-size: 10.5px; + color: var(--sg-error); + border: 1px solid currentColor; + border-radius: 999px; + padding: 1px 7px; + white-space: nowrap; +} + +.net-button { + display: inline-flex; + align-items: center; + justify-content: center; + border: 1px solid var(--sg-border); + background: var(--sg-surface); + color: var(--sg-text-muted); + border-radius: 8px; + width: 30px; + height: 30px; + cursor: pointer; + + &:hover { + color: var(--sg-blue-highlight); + border-color: var(--sg-blue-highlight); + } + + mat-icon { + font-size: 18px; + width: 18px; + height: 18px; + } +} + +.list__empty { + padding: 24px 14px; + color: var(--sg-text-soft); + font-size: 13.5px; +} + +// -- Detail card -------------------------------------------------------- + +.card { + border: 1px solid var(--sg-border); + border-radius: 12px; + background: var(--sg-surface-muted); + padding: 20px; + margin-top: 16px; + + h3 { + margin: 0 0 2px; + font-size: 20px; + color: var(--sg-text); + } +} + +.card__head { + display: flex; + flex-wrap: wrap; + gap: 12px; + align-items: flex-start; + justify-content: space-between; +} + +.card__meta { + font-size: 12.5px; + color: var(--sg-text-soft); + margin-bottom: 16px; +} + +.card__flag { + color: var(--sg-error); +} + +.open-network { + display: inline-flex; + align-items: center; + gap: 6px; + border: 1px solid var(--sg-border); + background: var(--sg-surface); + color: var(--sg-text); + border-radius: 8px; + padding: 7px 12px; + cursor: pointer; + font-size: 13px; + font-weight: 600; + + &:hover { + border-color: var(--sg-blue-highlight); + color: var(--sg-blue-highlight); + } + + mat-icon { + font-size: 18px; + width: 18px; + height: 18px; + } +} + +.card__grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 18px; +} + +.panel { + background: var(--sg-surface); + border: 1px solid var(--sg-border); + border-radius: 10px; + padding: 14px 15px; + + .panel__ttl { + font-size: 11px; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--sg-text-soft); + margin-bottom: 3px; + } + + .panel__cap { + font-size: 12px; + color: var(--sg-text-soft); + margin: 0 0 12px; + line-height: 1.45; + } +} + +.facts { + display: flex; + flex-wrap: wrap; + gap: 7px; + margin-top: 14px; +} + +.fact { + font-size: 12px; + background: var(--sg-surface-soft); + border-radius: 6px; + padding: 4px 9px; + color: var(--sg-text-muted); + + b { + color: var(--sg-text); + font-variant-numeric: tabular-nums; + } +} + +// -- Charts ------------------------------------------------------------- + +.charts { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 24px; +} + +.chart__ttl { + font-size: 11px; + letter-spacing: 0.08em; + text-transform: uppercase; + color: var(--sg-text-soft); + margin-bottom: 12px; +} + +.chart__row { + display: grid; + grid-template-columns: 118px 1fr auto; + gap: 10px; + align-items: center; + margin-bottom: 7px; + font-size: 12.5px; +} + +.chart__label { + color: var(--sg-text-muted); +} + +.chart__track { + display: block; + background: var(--sg-surface-muted); + border-radius: 3px; + height: 16px; + overflow: hidden; + border: 1px solid var(--sg-border); +} + +.chart__fill { + display: block; + height: 100%; + border-radius: 0 3px 3px 0; + background: var(--sg-blue-highlight); +} + +.chart__num { + font-variant-numeric: tabular-nums; + font-size: 12px; + min-width: 96px; + text-align: right; + color: var(--sg-text); + + small { + color: var(--sg-text-soft); + font-weight: 400; + } +} + +.chart__axis { + border-top: 1px solid var(--sg-border); + margin-top: 10px; + padding-top: 6px; + font-size: 11px; + color: var(--sg-text-soft); +} diff --git a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts new file mode 100644 index 00000000..ecf58241 --- /dev/null +++ b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts @@ -0,0 +1,272 @@ +import { + Component, + computed, + effect, + inject, + input, + signal, +} from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { ActivatedRoute, Router, RouterModule } from '@angular/router'; +import { toSignal } from '@angular/core/rxjs-interop'; +import { MatIconModule } from '@angular/material/icon'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; + +import { + FounderCandidate, + FounderCandidatePage, + FounderStatistics, +} from '../../../api'; +import { + FUNNEL_STAGE_LABELS, + SCREEN_REASON_LABELS, + TAG_LABELS, + clamp, + fmt1, + fmtInt, + fmtSubScore, +} from '../founder-potential.utils'; +import { ScoreBarComponent } from '../../../shared/ui/score-bar/score-bar.component'; +import { QueryParamPaginatorComponent } from '../../../shared/ui/query-param-paginator/query-param-paginator.component'; +import { NETWORK_ICON } from '../../../shared/ui/icons'; + +interface FounderRow { + id: string; + name: string; + careerBucket: string | null; + areaLabel: string | null; + score: number | null; + within: (number | null)[]; + pubs: number; + patents: number; + industry: number; + grants: number; + activeYears: number; + passed: boolean; + flagLabel: string | null; + sub: { bridger: number; mentor: number; amplifier: number }; + tags: string[]; +} + +interface StageRow { + label: string; + count: number; + pool: number; +} + +interface AreaRow { + label: string; + count: number; + cohortShare: number; + ratio: number | null; +} + +@Component({ + selector: 'app-founder-dashboard', + standalone: true, + imports: [ + CommonModule, + RouterModule, + MatIconModule, + MatSlideToggleModule, + ScoreBarComponent, + QueryParamPaginatorComponent, + ], + templateUrl: './founder-dashboard.component.html', + styleUrl: './founder-dashboard.component.scss', +}) +export class FounderDashboardComponent { + readonly NETWORK_ICON = NETWORK_ICON; + + readonly statistics = input.required(); + readonly candidates = input.required(); + + private readonly router = inject(Router); + private readonly route = inject(ActivatedRoute); + + private readonly queryParams = toSignal(this.route.queryParamMap, { + initialValue: this.route.snapshot.queryParamMap, + }); + + readonly threshold = computed(() => toNumber(this.queryParams().get('threshold')) ?? 90); + readonly screened = computed(() => (this.queryParams().get('screened') ?? 'true') === 'true'); + + /** Live value while dragging the slider; committed to the URL on release. */ + readonly thresholdDraft = signal(90); + + constructor() { + effect(() => this.thresholdDraft.set(this.threshold()), { + allowSignalWrites: true, + }); + } + + // -- KPIs --------------------------------------------------------------- + + readonly kpis = computed(() => { + const stats = this.statistics(); + const total = stats.provenance?.document_count ?? 0; + const passed = stats.overall?.screened ?? 0; + const share = total ? Math.round((passed / total) * 100) : 0; + const shortlisted = this.candidates().total ?? 0; + return { total, passed, share, shortlisted }; + }); + + // -- Funnel ------------------------------------------------------------- + + readonly funnel = computed(() => { + const stages = this.statistics().funnel ?? []; + const max = stages[0]?.count ?? 1; + return stages.map((stage, i) => { + const count = stage.count ?? 0; + const lost = i === 0 ? 0 : (stages[i - 1]?.count ?? 0) - count; + return { + key: stage.key, + label: FUNNEL_STAGE_LABELS[stage.key] ?? stage.label, + count, + lost, + pct: clamp((count / max) * 100, 0, 100), + }; + }); + }); + + // -- Shortlist ---------------------------------------------------------- + + readonly total = computed(() => this.candidates().total ?? 0); + + readonly rows = computed(() => + (this.candidates().elements ?? []).map((c) => toRow(c)), + ); + + readonly selectedId = signal(null); + + readonly selectedRow = computed(() => { + const id = this.selectedId(); + const rows = this.rows(); + if (id) return rows.find((r) => r.id === id) ?? null; + return rows[0] ?? null; + }); + + selectCandidate(id: string): void { + this.selectedId.set(id); + } + + openNetwork(id: string): void { + void this.router.navigate(['/founders', id]); + } + + // -- Controls ----------------------------------------------------------- + + onThresholdInput(event: Event): void { + const value = (event.target as HTMLInputElement).valueAsNumber; + if (Number.isFinite(value)) this.thresholdDraft.set(value); + } + + onThresholdCommit(event: Event): void { + const value = (event.target as HTMLInputElement).valueAsNumber; + if (!Number.isFinite(value)) return; + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { threshold: value, page: 0 }, + queryParamsHandling: 'merge', + }); + } + + onScreenedChange(checked: boolean): void { + void this.router.navigate([], { + relativeTo: this.route, + queryParams: { screened: checked ? 'true' : 'false', page: 0 }, + queryParamsHandling: 'merge', + }); + } + + // -- Stage / area charts ------------------------------------------------ + + readonly stageRows = computed(() => { + const stages = this.statistics().career_stages ?? []; + return stages.map((s) => ({ + label: s.career_bucket, + count: s.shortlist_plain ?? 0, + pool: s.screened ?? 0, + })); + }); + + readonly stageMax = computed(() => + Math.max(1, ...this.stageRows().map((s) => s.count)), + ); + + readonly areaRows = computed(() => { + const areas = [...(this.statistics().research_areas ?? [])] + .sort((a, b) => (b.shortlist_count ?? 0) - (a.shortlist_count ?? 0)) + .slice(0, 7); + return areas.map((a) => ({ + label: a.label ?? a.code, + count: a.shortlist_count ?? 0, + cohortShare: (a.cohort_share ?? 0) * 100, + ratio: a.ratio ?? null, + })); + }); + + readonly areaMax = computed(() => + Math.max(1, ...this.areaRows().map((a) => a.count)), + ); + + // -- Formatting helpers for the template -------------------------------- + + readonly fmtInt = fmtInt; + readonly fmt1 = fmt1; + readonly fmtSubScore = fmtSubScore; + readonly tagLabel = (tag: string) => TAG_LABELS[tag] ?? tag; + + /** Clamp a percentile into the 0-100 band for bar widths. */ + readonly clamp0 = (value: number | null) => + value === null ? 0 : clamp(value, 0, 100); + + /** Height (in %) of a bar in the within-1/3/5y mini histogram. */ + readonly histHeight = (value: number | null) => + value === null ? 3 : Math.max(3, (clamp(value, 0, 100) / 100) * 22); + + /** Round a percentile for the within-1/3/5y summary. */ + readonly round = (value: number) => Math.round(value); +} + +function toRow(c: FounderCandidate): FounderRow { + const fp = c.founder_potential; + const ff = c.founder_features; + const pr = c.multiplier_peer_ranks; + const reasons = c.screen?.reasons ?? []; + const passed = c.screen?.passed ?? true; + return { + id: c.author_id, + name: c.display_name ?? c.author_id, + careerBucket: c.career_bucket ?? null, + areaLabel: ff?.publication_research_area_label ?? null, + score: fp?.external_percentile ?? null, + within: [ + fp?.external_percentile_within_1y ?? null, + fp?.external_percentile_within_3y ?? null, + fp?.external_percentile_within_5y ?? null, + ], + pubs: ff?.publications ?? 0, + patents: ff?.patents ?? 0, + industry: ff?.industry_collab_papers ?? 0, + grants: ff?.grants ?? 0, + activeYears: c.active_years ?? 0, + passed, + flagLabel: + reasons.length > 0 + ? (SCREEN_REASON_LABELS[reasons[0]] ?? reasons[0]) + : null, + sub: { + bridger: pr?.bridger ?? 0, + mentor: pr?.mentor ?? 0, + amplifier: pr?.amplifier ?? 0, + }, + tags: c.tags ?? [], + }; +} + +function toNumber(value: string | null): number | null { + if (value === null || value === '') return null; + const parsed = Number(value); + return Number.isFinite(parsed) ? parsed : null; +} diff --git a/webapp/src/app/modules/founder-potential/founder-potential.utils.ts b/webapp/src/app/modules/founder-potential/founder-potential.utils.ts new file mode 100644 index 00000000..07723f14 --- /dev/null +++ b/webapp/src/app/modules/founder-potential/founder-potential.utils.ts @@ -0,0 +1,98 @@ +import { ResearcherMetrics } from '../../api'; + +/** German labels for multiplier archetype tags. */ +export const TAG_LABELS: Record = { + bridger: 'Brückenbauer', + mentor: 'Mentor', + amplifier: 'Verstärker', +}; + +/** German labels for the data-quality screen reasons. */ +export const SCREEN_REASON_LABELS: Record = { + MERGED_PROFILE: 'Zusammengeführtes Profil', + IMPLAUSIBLE_CAREER_LENGTH: 'Unplausible Karrieredauer', + UNKNOWN_CAREER_LENGTH: 'Unbekannte Karrieredauer', + THIN_PROFILE: 'Zu wenige Publikationen', + OUT_OF_POPULATION: 'Außerhalb der Modellpopulation', +}; + +/** German labels for the funnel stages, keyed by their stable key. */ +export const FUNNEL_STAGE_LABELS: Record = { + ALL: 'Alle Forschenden im Index', + IN_POPULATION: 'Vom Modell bewertbar (mind. 4 Publikationen)', + NOT_SUSPICIOUS: 'Kein zusammengeführtes Profil', + CAREER_AGE_PLAUSIBLE: 'Plausible Karrieredauer (max. 40 Jahre)', + MIN_PUBLICATIONS: 'Mind. 7 Publikationen', +}; + +/** Ordered metric definitions for the researcher detail table. */ +export interface MetricDef { + key: keyof ResearcherMetrics; + label: string; +} + +export const METRIC_DEFS: MetricDef[] = [ + { key: 'betweenness', label: 'Betweenness-Zentralität' }, + { key: 'brokerage', label: 'Brokerage' }, + { key: 'constraint', label: 'Constraint' }, + { key: 'field_entropy', label: 'Feld-Entropie' }, + { key: 'cross_institution_share', label: 'Institutionsübergreifender Anteil' }, + { key: 'strength', label: 'Stärke' }, + { key: 'n_coauthors', label: 'Koautor:innen' }, + { key: 'juniors_mentored', label: 'Betreute Nachwuchsforschende' }, + { key: 'junior_progression_rate', label: 'Nachwuchs-Fortschrittsrate' }, + { key: 'mentoring_rate', label: 'Mentoring-Rate' }, + { key: 'last_author_with_junior_first', label: 'Letztautor mit Nachwuchs-Erstautor' }, + { key: 'industry_coauthor_share', label: 'Industrie-Koautoranteil' }, + { key: 'industry_coauthor_share_shrunk', label: 'Industrie-Koautoranteil (korrigiert)' }, + { key: 'patent_count', label: 'Patente' }, + { key: 'cordis_eu_projects', label: 'EU-Projekte (CORDIS)' }, + { key: 'news_mentions', label: 'Medienerwähnungen' }, +]; + +/** Whole numbers with German thousands separator. */ +export function fmtInt(value: number | null | undefined): string { + if (value === null || value === undefined) return '—'; + return value.toLocaleString('de-DE'); +} + +/** One decimal place, German locale. */ +export function fmt1(value: number | null | undefined): string { + if (value === null || value === undefined) return '—'; + return value.toLocaleString('de-DE', { + minimumFractionDigits: 1, + maximumFractionDigits: 1, + }); +} + +/** Percentile (0-100) with one decimal and a % sign. */ +export function fmtPct(value: number | null | undefined): string { + if (value === null || value === undefined) return '—'; + return `${fmt1(value)} %`; +} + +/** Sub-score (0-1) as a percentage, e.g. 0.9613 → "96,1 %". */ +export function fmtSubScore(value: number | null | undefined): string { + if (value === null || value === undefined) return '—'; + return fmtPct((value ?? 0) * 100); +} + +/** Peer rank (0-1) as a percentage. */ +export function fmtPeerRank(value: number | null | undefined): string { + if (value === null || value === undefined) return '—'; + return fmtPct((value ?? 0) * 100); +} + +/** Raw metric value: integers stay integers, floats get up to 3 decimals. */ +export function fmtMetricValue( + value: number | null | undefined, +): string { + if (value === null || value === undefined) return '—'; + if (Number.isInteger(value)) return value.toLocaleString('de-DE'); + return value.toLocaleString('de-DE', { maximumFractionDigits: 3 }); +} + +/** Clamp a value into a range. */ +export function clamp(value: number, min: number, max: number): number { + return Math.max(min, Math.min(max, value)); +} diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html new file mode 100644 index 00000000..f53c871b --- /dev/null +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html @@ -0,0 +1,137 @@ +
+ + {{ ARROW_BACK_ICON }} + Zurück zur Übersicht + + +
+

Smart-Guide · Multiplikator-Detektion

+

{{ name() }}

+
+ @if (careerBucket()) { + + } + {{ fmtInt(nWorks()) }} Publikationen · {{ fmtInt(activeYears()) }} aktive Jahre + @if (suspicious()) { + {{ WARNING_ICON }} Zusammengeführtes Profil + } +
+ @if (tags().length) { +
+ @for (tag of tags(); track tag) { + {{ tagLabel(tag) }} + } +
+ } +
+ +
+ @for (entry of roleLegend(); track entry.role) { + + + {{ entry.label }} + + } + Kollaboration (Breite = Stärke) + überwiegend institutionsübergreifend + Knotengröße = aktive Jahre +
+ +
+
+ @if ((network().nodes?.length ?? 0) > 0) { + + } @else { +
Kein Netzwerk verfügbar.
+ } +
+ {{ fmtInt(netMeta().shown) }} der {{ fmtInt(netMeta().totalCoauthors) }} + Koautor:innen dargestellt · {{ fmtInt(netMeta().cohortCoauthors) }} aus der + UDE-Kohorte · {{ fmtInt(netMeta().mentees) }} Mentees +
+
+ +
+
+

Multiplikator-Scores

+

Rang gegen Peers dieser Universität, gleiche Karrierestufe. Schwelle: 85.

+ @for (s of subScores(); track s.label) { + + } +
+ +
+

Gründungspotenzial

+

Rang gegen ~9.000 Wissenschaftler:innen an anderen Universitäten.

+ + + + + @if (founder().timingApplicable && founder().yearsToFounding !== null) { +

+ @if ((founder().yearsToFounding ?? 0) <= 0) { + Das Aktivitätsmuster wirkt bereits gründungsbereit. + } @else { + Voraussichtlich in {{ fmt1(founder().yearsToFounding) }} Jahren gründungsreif. + } +

+ } +
+ +
+ Publikationen {{ fmtInt(facts().pubs) }} + Patente {{ fmtInt(facts().patents) }} + Industrie-Publikationen {{ fmtInt(facts().industry) }} + Förderungen {{ fmtInt(facts().grants) }} + aktive Jahre {{ fmtInt(facts().activeYears) }} +
+
+
+ +
+

Metriken im Detail

+

+ Jeder Rohwert steht neben seinem Peer-Rang (0–1), damit nachvollziehbar + bleibt, warum eine Person so eingestuft wurde. +

+
+ + + + + + + + + + @for (row of metricRows(); track row.key) { + + + + + + } + +
MetrikWertPeer-Rang
{{ row.label }}{{ fmtMetricValue(row.raw) }}{{ fmtPeerRank(row.rank) }}
+
+
+ +
+ Konfiguration {{ network().config_hash ?? '–' }} · + berechnet {{ network().computed_at ?? '–' }}. Klick auf + einen Knoten öffnet das Profil der Person. +
+
diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss new file mode 100644 index 00000000..d03a65f5 --- /dev/null +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss @@ -0,0 +1,289 @@ +.researcher-network { + max-width: 1160px; + margin: 0 auto; + padding: 24px 8px 64px; +} + +.back-link { + display: inline-flex; + align-items: center; + gap: 6px; + font-size: 13px; + color: var(--sg-text-muted); + text-decoration: none; + margin-bottom: 16px; + + mat-icon { + font-size: 18px; + width: 18px; + height: 18px; + } + + &:hover { + color: var(--sg-blue-highlight); + } +} + +.page { + max-width: 72ch; + + .eyebrow { + font-size: 11px; + letter-spacing: 0.14em; + text-transform: uppercase; + color: var(--sg-text-soft); + margin: 0 0 10px; + } + + h1 { + font-size: 30px; + line-height: 1.15; + margin: 0 0 12px; + font-weight: 700; + color: var(--sg-text); + } +} + +.meta-line { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px 14px; + font-size: 13px; + color: var(--sg-text-muted); + margin: 2px 0 8px; +} + +.suspicious { + display: inline-flex; + align-items: center; + gap: 4px; + color: var(--sg-error); + font-size: 12.5px; + + mat-icon { + font-size: 16px; + width: 16px; + height: 16px; + } +} + +.tags { + display: flex; + flex-wrap: wrap; + gap: 7px; + margin-top: 4px; +} + +.tag-pill { + font-size: 11.5px; + font-weight: 600; + padding: 2.5px 10px; + border-radius: 999px; + letter-spacing: 0.04em; + border: 1px solid var(--sg-border); + color: var(--sg-text); + background: var(--sg-blue-highlight); + color: #fff; +} + +.legend { + position: sticky; + top: 0; + z-index: 5; + background: var(--sg-background); + border-block: 1px solid var(--sg-border); + margin: 24px 0 0; + padding: 10px 2px; + display: flex; + flex-wrap: wrap; + gap: 12px 20px; + align-items: center; + font-size: 12.5px; + color: var(--sg-text-muted); + + &__item { + display: inline-flex; + align-items: center; + gap: 7px; + } + + &__dot { + width: 11px; + height: 11px; + border-radius: 50%; + border: 1px solid var(--sg-border-strong); + flex: none; + + &--ego { + outline: 2px solid var(--sg-text); + outline-offset: 1.5px; + } + } + + &__edge { + width: 26px; + height: 0; + border-top: 2px solid var(--sg-text-soft); + flex: none; + + &--dashed { + border-top-style: dashed; + } + } +} + +.case-grid { + display: grid; + grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); + gap: 26px; + align-items: start; + margin-top: 26px; +} + +.netbox { + border: 1px solid var(--sg-border); + border-radius: 10px; + background: var(--sg-surface-muted); + overflow: hidden; + + &__empty { + height: 480px; + display: flex; + align-items: center; + justify-content: center; + color: var(--sg-text-soft); + } +} + +.netfoot { + font-size: 12px; + color: var(--sg-text-soft); + padding: 8px 12px; + border-top: 1px solid var(--sg-border); +} + +.panel { + display: flex; + flex-direction: column; + gap: 22px; + + h3 { + font-size: 11px; + letter-spacing: 0.12em; + text-transform: uppercase; + color: var(--sg-text-soft); + margin: 0 0 8px; + font-weight: 600; + } +} + +.cap { + font-size: 12px; + color: var(--sg-text-soft); + margin: 0 0 12px; + line-height: 1.45; +} + +.timing-note { + font-size: 12.5px; + color: var(--sg-success); + margin: 2px 0 0; +} + +.facts { + display: flex; + flex-wrap: wrap; + gap: 7px; +} + +.fact { + font-size: 12px; + background: var(--sg-surface-soft); + border-radius: 6px; + padding: 4px 9px; + color: var(--sg-text-muted); + + b { + color: var(--sg-text); + font-variant-numeric: tabular-nums; + } +} + +.metrics { + margin-top: 48px; + + h2 { + font-size: 20px; + margin: 0 0 4px; + color: var(--sg-text); + font-weight: 700; + } + + .note { + font-size: 13px; + color: var(--sg-text-muted); + margin: 2px 0 16px; + } +} + +.scroller { + overflow-x: auto; +} + +table.mx { + border-collapse: collapse; + width: 100%; + font-size: 12.5px; + + th, + td { + text-align: left; + padding: 6px 9px; + border-bottom: 1px solid var(--sg-border); + } + + th { + color: var(--sg-text-soft); + font-weight: 600; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.06em; + } + + td { + color: var(--sg-text-muted); + } + + td.num { + font-variant-numeric: tabular-nums; + text-align: right; + color: var(--sg-text); + white-space: nowrap; + + &.hot { + font-weight: 700; + color: var(--sg-success); + } + } +} + +footer.page { + margin-top: 48px; + border-top: 1px solid var(--sg-border); + padding-top: 16px; + font-size: 12.5px; + color: var(--sg-text-soft); + max-width: 78ch; +} + +.mono { + font-family: ui-monospace, SFMono-Regular, Menlo, monospace; + font-size: 11.5px; +} + +@media (max-width: 900px) { + .case-grid { + grid-template-columns: 1fr; + } +} diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts new file mode 100644 index 00000000..779a05f5 --- /dev/null +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts @@ -0,0 +1,139 @@ +import { Component, computed, inject, input } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Router, RouterModule } from '@angular/router'; +import { MatIconModule } from '@angular/material/icon'; + +import { EgoNetwork, ResearcherDetail } from '../../../api'; +import { + METRIC_DEFS, + TAG_LABELS, + fmt1, + fmtInt, + fmtMetricValue, + fmtPeerRank, + fmtSubScore, +} from '../founder-potential.utils'; +import { + MULTIPLIER_ROLE_LABELS, + multiplierRoleColor, + MultiplierNetworkGraphComponent, +} from '../../../shared/ui/multiplier-network-graph/multiplier-network-graph.component'; +import { ScoreBarComponent } from '../../../shared/ui/score-bar/score-bar.component'; +import { CareerStageChipComponent } from '../../../shared/ui/career-stage-chip/career-stage-chip.component'; +import { ChartThemeService } from '../../../shared/services/chart-theme.service'; +import { ARROW_BACK_ICON, WARNING_ICON } from '../../../shared/ui/icons'; + +const TAG_THRESHOLD = 0.85; +const ROLE_ORDER = ['ego', 'cohort', 'mentee', 'industry', 'external']; + +@Component({ + selector: 'app-researcher-network', + standalone: true, + imports: [ + CommonModule, + RouterModule, + MatIconModule, + MultiplierNetworkGraphComponent, + ScoreBarComponent, + CareerStageChipComponent, + ], + templateUrl: './researcher-network.component.html', + styleUrl: './researcher-network.component.scss', +}) +export class ResearcherNetworkComponent { + readonly ARROW_BACK_ICON = ARROW_BACK_ICON; + readonly WARNING_ICON = WARNING_ICON; + + readonly researcher = input.required(); + readonly network = input.required(); + + private readonly router = inject(Router); + private readonly chartTheme = inject(ChartThemeService); + + readonly name = computed( + () => this.researcher().display_name ?? this.network().display_name ?? this.researcher().author_id, + ); + + readonly careerBucket = computed(() => this.researcher().career_bucket ?? null); + readonly activeYears = computed(() => this.researcher().active_years ?? 0); + readonly nWorks = computed(() => this.researcher().n_works ?? 0); + readonly suspicious = computed(() => this.researcher().suspicious_profile ?? false); + + readonly tags = computed(() => this.researcher().tags ?? []); + + readonly subScores = computed(() => { + const pr = this.researcher().multiplier_peer_ranks; + return [ + { label: 'Brückenbauer', raw: pr?.bridger ?? 0 }, + { label: 'Mentor', raw: pr?.mentor ?? 0 }, + { label: 'Verstärker', raw: pr?.amplifier ?? 0 }, + ]; + }); + + readonly founder = computed(() => { + const fp = this.researcher().founder_potential; + return { + score: fp?.external_percentile ?? null, + within1: fp?.external_percentile_within_1y ?? null, + within3: fp?.external_percentile_within_3y ?? null, + within5: fp?.external_percentile_within_5y ?? null, + yearsToFounding: fp?.timing?.years_to_founding ?? null, + timingApplicable: fp?.timing_applicable ?? false, + }; + }); + + readonly facts = computed(() => { + const ff = this.researcher().founder_features; + return { + pubs: ff?.publications ?? 0, + patents: ff?.patents ?? 0, + industry: ff?.industry_collab_papers ?? 0, + grants: ff?.grants ?? 0, + activeYears: this.activeYears(), + }; + }); + + readonly netMeta = computed(() => { + const n = this.network(); + return { + totalCoauthors: n.total_coauthors ?? 0, + cohortCoauthors: n.cohort_coauthors ?? 0, + mentees: n.mentee_count ?? 0, + shown: n.shown ?? 0, + }; + }); + + readonly metricRows = computed(() => + METRIC_DEFS.map((def) => { + const metric = this.researcher().metrics?.[def.key]; + return { + key: def.key, + label: def.label, + raw: metric?.raw ?? null, + rank: metric?.peer_rank ?? null, + }; + }), + ); + + readonly roleLegend = computed(() => + ROLE_ORDER.map((role) => ({ + role, + label: MULTIPLIER_ROLE_LABELS[role] ?? role, + color: multiplierRoleColor(role, this.chartTheme.isDark()), + })), + ); + + onNodeClick(event: { id: string }): void { + if (event?.id) { + void this.router.navigate(['/person', event.id]); + } + } + + readonly fmtInt = fmtInt; + readonly fmt1 = fmt1; + readonly fmtSubScore = fmtSubScore; + readonly fmtPeerRank = fmtPeerRank; + readonly fmtMetricValue = fmtMetricValue; + readonly tagLabel = (tag: string) => TAG_LABELS[tag] ?? tag; + readonly tagThreshold = TAG_THRESHOLD * 100; +} diff --git a/webapp/src/app/resolvers/founder-candidates.resolver.ts b/webapp/src/app/resolvers/founder-candidates.resolver.ts new file mode 100644 index 00000000..593653ff --- /dev/null +++ b/webapp/src/app/resolvers/founder-candidates.resolver.ts @@ -0,0 +1,63 @@ +import { ResolveFn } from '@angular/router'; +import { inject } from '@angular/core'; +import { + FounderCandidatePage, + FounderSortBy, + MultiplicatorsService, + SortDirection, +} from '../api'; + +/** + * The founder-candidate list for the dashboard. Driven entirely by query + * params (threshold, screened, page, size, sort) so the page state stays in + * the URL and re-resolves when any of them change. + */ +export const founderCandidatesResolver: ResolveFn = ( + route, +) => { + const service = inject(MultiplicatorsService); + const params = route.queryParamMap; + + const page = toInt(params.get('page'), 0); + const size = toInt(params.get('size'), 25); + const threshold = toNumber(params.get('threshold')); + + const screenedRaw = params.get('screened'); + const screened = screenedRaw === null ? undefined : screenedRaw === 'true'; + + const sortBy = (params.get('sortBy') as FounderSortBy) ?? + FounderSortBy.ExternalPercentile; + const sortOrder = (params.get('sortOrder') as SortDirection) ?? + SortDirection.Desc; + + return service.searchFounderCandidates( + page, + size, + true, // in_population: only researchers the model can score + threshold ?? undefined, + undefined, // max_external_percentile + undefined, // career_bucket + screened, + undefined, // min_publications + undefined, // has_patents + undefined, // research_area + undefined, // tags + undefined, // name + undefined, // screen_min_publications + undefined, // screen_max_career_age + sortBy, + sortOrder, + ); +}; + +function toInt(value: string | null, fallback: number): number { + if (value === null || value === '') return fallback; + const parsed = Number.parseInt(value, 10); + return Number.isFinite(parsed) ? parsed : fallback; +} + +function toNumber(value: string | null): number | null { + if (value === null || value === '') return null; + const parsed = Number(value); + return Number.isFinite(parsed) ? parsed : null; +} diff --git a/webapp/src/app/resolvers/founder-statistics.resolver.ts b/webapp/src/app/resolvers/founder-statistics.resolver.ts new file mode 100644 index 00000000..c2c1643a --- /dev/null +++ b/webapp/src/app/resolvers/founder-statistics.resolver.ts @@ -0,0 +1,24 @@ +import { ResolveFn } from '@angular/router'; +import { inject } from '@angular/core'; +import { FounderStatistics, MultiplicatorsService } from '../api'; + +/** + * Founder-potential statistics for the dashboard (KPIs, funnel, career-stage + * and research-area breakdowns). Re-resolved when the `threshold` query param + * changes, so the shortlist counts always match the slider in the URL. + */ +export const founderStatisticsResolver: ResolveFn = ( + route, +) => { + const service = inject(MultiplicatorsService); + const threshold = toNumber(route.queryParamMap.get('threshold')) ?? 90; + // Remaining cutoffs mirror the backend defaults; only the threshold is + // exposed to the user for now. + return service.getFounderStatistics(threshold, 7, 0.7, 40, 40); +}; + +function toNumber(value: string | null): number | null { + if (value === null || value === '') return null; + const parsed = Number(value); + return Number.isFinite(parsed) ? parsed : null; +} diff --git a/webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts b/webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts new file mode 100644 index 00000000..fa70f892 --- /dev/null +++ b/webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts @@ -0,0 +1,12 @@ +import { ResolveFn } from '@angular/router'; +import { inject } from '@angular/core'; +import { EgoNetwork, MultiplicatorsService } from '../api'; + +/** One researcher's ego co-author network (nodes and edges, no layout). */ +export const multiplierResearcherNetworkResolver: ResolveFn = ( + route, +) => { + const service = inject(MultiplicatorsService); + const authorId = route.paramMap.get('authorId') ?? ''; + return service.getMultiplicatorResearcherNetwork(authorId); +}; diff --git a/webapp/src/app/resolvers/multiplier-researcher.resolver.ts b/webapp/src/app/resolvers/multiplier-researcher.resolver.ts new file mode 100644 index 00000000..b3ae2802 --- /dev/null +++ b/webapp/src/app/resolvers/multiplier-researcher.resolver.ts @@ -0,0 +1,12 @@ +import { ResolveFn } from '@angular/router'; +import { inject } from '@angular/core'; +import { MultiplicatorsService, ResearcherDetail } from '../api'; + +/** Full multiplier + founder-potential detail for one researcher. */ +export const multiplierResearcherResolver: ResolveFn = ( + route, +) => { + const service = inject(MultiplicatorsService); + const authorId = route.paramMap.get('authorId') ?? ''; + return service.getMultiplicatorResearcher(authorId); +}; diff --git a/webapp/src/app/shared/ui/app-menu/app-menu.component.ts b/webapp/src/app/shared/ui/app-menu/app-menu.component.ts index 5d6834e3..0c478cb4 100644 --- a/webapp/src/app/shared/ui/app-menu/app-menu.component.ts +++ b/webapp/src/app/shared/ui/app-menu/app-menu.component.ts @@ -24,6 +24,7 @@ import { DASHBOARD_ICON, DOUBLE_ARROW_LEFT_ICON, DOUBLE_ARROW_RIGHT_ICON, + FOUNDER_ICON, HIERARCHY_ICON, INSTITUTION_ICON, JOBS_ICON, @@ -115,6 +116,14 @@ export class AppMenuComponent { route: '/dashboard', disabled: false, }, + { + label: 'Gründungspotenzial', + icon: FOUNDER_ICON, + route: '/founders', + disabled: false, + queryParams: { threshold: 90, screened: 'true', page: 0, size: 25 }, + detailRoutePrefixes: ['/founders/'], + }, { label: 'Personen', icon: PERSONS_ICON, diff --git a/webapp/src/app/shared/ui/icons.ts b/webapp/src/app/shared/ui/icons.ts index 4ac984b9..2afd8516 100644 --- a/webapp/src/app/shared/ui/icons.ts +++ b/webapp/src/app/shared/ui/icons.ts @@ -5,6 +5,7 @@ export const BOOKMARK_ICON = 'bookmark' as const; export const BOOKMARKS_ICON = 'bookmarks' as const; export const DASHBOARD_ICON = 'dashboard' as const; +export const FOUNDER_ICON = 'rocket_launch' as const; export const FUNDING_ICON = 'account_balance' as const; export const INSTITUTION_ICON = 'apartment' as const; //was 'school' export const JOBS_ICON = 'sync' as const; diff --git a/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html new file mode 100644 index 00000000..f0b9e634 --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html @@ -0,0 +1,6 @@ +
diff --git a/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.scss b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.scss new file mode 100644 index 00000000..526b754c --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.scss @@ -0,0 +1,4 @@ +.multiplier-graph { + width: 100%; + height: 480px; +} diff --git a/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.ts b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.ts new file mode 100644 index 00000000..976c90ac --- /dev/null +++ b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.ts @@ -0,0 +1,214 @@ +import { Component, computed, inject, input, output } from '@angular/core'; +import { EgoNetwork, EgoNetworkEdge, EgoNetworkNode } from '../../../api'; +import { EChartsCoreOption } from 'echarts'; +import { NgxEchartsDirective } from 'ngx-echarts'; +import { ChartThemeService } from '../../services/chart-theme.service'; + +import * as echarts from 'echarts/core'; +import { GraphChart } from 'echarts/charts'; +import { TooltipComponent } from 'echarts/components'; +import { CanvasRenderer } from 'echarts/renderers'; + +echarts.use([GraphChart, TooltipComponent, CanvasRenderer]); + +export interface MultiplierNodeClickEvent { + id: string; + name: string; + role: string; +} + +/** German labels for the network roles, shared with the HTML legend. */ +export const MULTIPLIER_ROLE_LABELS: Record = { + ego: 'Ego (Person)', + cohort: 'UDE-Kohorte', + mentee: 'Mentee', + industry: 'Unternehmen', + external: 'Extern', +}; + +const LIGHT_COLORS: Record = { + ego: '#e87ba4', + cohort: '#2a78d6', + mentee: '#1baf7a', + industry: '#eb6834', + external: '#b5b4ac', +}; + +const DARK_COLORS: Record = { + ego: '#d55181', + cohort: '#3987e5', + mentee: '#199e70', + industry: '#d95926', + external: '#55544f', +}; + +/** Resolve a role's color for the current light/dark mode. */ +export function multiplierRoleColor(role: string, dark: boolean): string { + const map = dark ? DARK_COLORS : LIGHT_COLORS; + return map[role] ?? map['external']; +} + +/** + * Force-directed ego co-author network for one researcher. Roles are colored + * (ego / cohort / mentee / industry / external), `cross`-institution edges are + * dashed, and node size grows with active years. Layout is computed client-side + * by ECharts, mirroring the reference implementation. + */ +@Component({ + selector: 'app-multiplier-network-graph', + standalone: true, + imports: [NgxEchartsDirective], + templateUrl: './multiplier-network-graph.component.html', + styleUrl: './multiplier-network-graph.component.scss', +}) +export class MultiplierNetworkGraphComponent { + readonly network = input.required(); + readonly nodeClick = output(); + + private readonly chartTheme = inject(ChartThemeService); + + private roleColor(role: string): string { + return multiplierRoleColor(role, this.chartTheme.isDark()); + } + + readonly options = computed(() => { + const network = this.network(); + const colors = this.chartTheme.colors(); + if (!network) return {}; + + const textColor = colors.text; + const nodes = this.buildNodes(network.nodes ?? []); + const links = this.buildLinks(network.edges ?? []); + + return { + tooltip: { + trigger: 'item', + backgroundColor: colors.tooltipBg, + borderColor: colors.tooltipBorder, + textStyle: { color: colors.tooltipTextColor }, + formatter: (params: any) => { + if (!params || params.dataType === 'edge' || !params.data) { + return ''; + } + const d = params.data; + const lines = [ + `${escapeHtml(d.name ?? d.id)}`, + escapeHtml(MULTIPLIER_ROLE_LABELS[d.role] ?? d.role), + ]; + if (d.inst) lines.push(escapeHtml(d.inst)); + if (d.activeYears != null && d.activeYears > 0) { + lines.push(`${d.activeYears} aktive Jahre`); + } + if (d.role === 'ego' && d.nWorks != null) { + lines.push(`${d.nWorks} Publikationen`); + } + return lines.join('
'); + }, + }, + series: [ + { + type: 'graph', + layout: 'force', + data: nodes, + links, + roam: true, + roamTrigger: 'global', + scaleLimit: { min: 0.4, max: 4 }, + label: { + show: false, + position: 'right', + color: textColor, + fontSize: 11, + }, + force: { + repulsion: 1400, + edgeLength: [70, 150], + friction: 0.25, + gravity: 0.1, + }, + emphasis: { + focus: 'adjacency', + label: { show: true, color: textColor, fontWeight: 'bold' }, + lineStyle: { width: 4, opacity: 0.9 }, + }, + blur: { + itemStyle: { opacity: 0.12 }, + label: { show: false, opacity: 0.12 }, + lineStyle: { opacity: 0.08 }, + }, + lineStyle: { + color: colors.mutedTextColor, + opacity: 0.45, + curveness: 0, + }, + }, + ], + }; + }); + + private buildNodes(nodes: EgoNetworkNode[]): any[] { + const textColor = this.chartTheme.colors().text; + const nWorks = this.network().n_works ?? undefined; + return nodes.map((node) => { + const role = node.role || 'external'; + const activeYears = node.active_years ?? 0; + const isEgo = role === 'ego'; + return { + id: node.id, + name: node.name ?? node.id, + role, + inst: node.inst ?? '', + activeYears, + nWorks: isEgo ? nWorks : undefined, + symbolSize: isEgo ? 34 : clamp(12 + activeYears * 2, 12, 44), + itemStyle: { + color: this.roleColor(role), + borderColor: isEgo ? textColor : 'transparent', + borderWidth: isEgo ? 2 : 0, + }, + label: { + show: isEgo, + formatter: '{b}', + position: 'right', + color: textColor, + fontSize: 12, + }, + }; + }); + } + + private buildLinks(edges: EgoNetworkEdge[]): any[] { + return edges.map((edge) => ({ + source: edge.a, + target: edge.b, + lineStyle: { + width: clamp((edge.w ?? 0) * 2.5, 1, 7), + type: edge.cross ? 'dashed' : 'solid', + }, + })); + } + + onChartEvent(event: any): void { + const data = event?.data; + if (!data || !data.id) return; + this.nodeClick.emit({ + id: data.id, + name: data.name ?? data.id, + role: data.role ?? 'external', + }); + } +} + +function clamp(value: number, min: number, max: number): number { + return Math.max(min, Math.min(max, value)); +} + +function escapeHtml(value: string): string { + return String(value).replace( + /[&<>"']/g, + (c) => + ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[ + c + ] ?? c, + ); +} diff --git a/webapp/src/app/shared/ui/score-bar/score-bar.component.html b/webapp/src/app/shared/ui/score-bar/score-bar.component.html new file mode 100644 index 00000000..f54ebef2 --- /dev/null +++ b/webapp/src/app/shared/ui/score-bar/score-bar.component.html @@ -0,0 +1,13 @@ +
+ {{ label() }} + + + @if (thresholdPct() !== null) { + + } + + {{ text() }} +
diff --git a/webapp/src/app/shared/ui/score-bar/score-bar.component.scss b/webapp/src/app/shared/ui/score-bar/score-bar.component.scss new file mode 100644 index 00000000..e58d8169 --- /dev/null +++ b/webapp/src/app/shared/ui/score-bar/score-bar.component.scss @@ -0,0 +1,58 @@ +.score-bar { + display: grid; + grid-template-columns: 96px 1fr 48px; + gap: 10px; + align-items: center; + margin-bottom: 8px; + font-size: 12.5px; + line-height: 1.35; +} + +.score-bar__label { + color: var(--sg-text-muted); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.score-bar__track { + position: relative; + display: block; + height: 10px; + background: var(--sg-surface-soft); + border: 1px solid var(--sg-border); + border-radius: 5px; + overflow: hidden; +} + +.score-bar__fill { + position: absolute; + inset: 0 auto 0 0; + border-radius: 4px 3px 3px 4px; + background: var(--sg-blue-highlight); + transition: width 0.18s ease; +} + +.score-bar--success .score-bar__fill { + background: var(--sg-success); +} + +.score-bar--warn .score-bar__fill { + background: var(--sg-error); +} + +.score-bar__threshold { + position: absolute; + top: -3px; + bottom: -3px; + width: 0; + border-left: 2px dashed var(--sg-text-soft); +} + +.score-bar__value { + font-variant-numeric: tabular-nums; + text-align: right; + font-weight: 600; + color: var(--sg-text); + white-space: nowrap; +} diff --git a/webapp/src/app/shared/ui/score-bar/score-bar.component.ts b/webapp/src/app/shared/ui/score-bar/score-bar.component.ts new file mode 100644 index 00000000..cfff13d9 --- /dev/null +++ b/webapp/src/app/shared/ui/score-bar/score-bar.component.ts @@ -0,0 +1,50 @@ +import { Component, computed, input } from '@angular/core'; + +export type ScoreBarVariant = 'primary' | 'success' | 'warn'; + +/** + * A labelled horizontal meter: label, a filled track and a value. Optionally + * draws a dashed threshold marker. Used for founder percentiles (0-100) and + * multiplier sub-scores (0-1, passed as `value * 100` with `max = 100`). + */ +@Component({ + selector: 'app-score-bar', + standalone: true, + templateUrl: './score-bar.component.html', + styleUrl: './score-bar.component.scss', +}) +export class ScoreBarComponent { + readonly label = input.required(); + /** The current value, in the units of `max`. */ + readonly value = input.required(); + /** Upper bound of the scale. Defaults to 100 (percentiles). */ + readonly max = input(100); + /** Optional pre-formatted value text; falls back to the raw value. */ + readonly display = input(null); + /** Optional threshold (same units as `value`), drawn as a dashed marker. */ + readonly threshold = input(null); + readonly variant = input('primary'); + + readonly pct = computed(() => { + const max = this.max() || 100; + if (max <= 0) return 0; + return clamp((this.value() / max) * 100, 0, 100); + }); + + readonly thresholdPct = computed(() => { + const threshold = this.threshold(); + if (threshold === null || threshold === undefined) return null; + const max = this.max() || 100; + return clamp((threshold / max) * 100, 0, 100); + }); + + readonly text = computed(() => { + const display = this.display(); + if (display !== null && display !== undefined) return display; + return String(this.value()); + }); +} + +function clamp(value: number, min: number, max: number): number { + return Math.max(min, Math.min(max, value)); +} -- 2.56.1 From 517657fa76f051895c271e41dbb4fa671acb115d Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 4 Nov 2026 21:44:20 +0100 Subject: [PATCH 3/7] layout adjusted, shared components reused --- .../founder-dashboard.component.html | 640 +++++++++++------- .../founder-dashboard.component.scss | 256 +++---- .../founder-dashboard.component.ts | 202 ++++-- .../researcher-network.component.html | 351 ++++++---- .../researcher-network.component.scss | 135 ++-- .../researcher-network.component.ts | 170 ++++- .../multiplier-researcher-network.resolver.ts | 12 - .../multiplier-researcher-page.resolver.ts | 103 +++ .../multiplier-researcher.resolver.ts | 12 - .../multiplier-network-graph.component.html | 1 + .../multiplier-network-graph.component.scss | 2 +- .../multiplier-network-graph.component.ts | 4 +- 12 files changed, 1195 insertions(+), 693 deletions(-) delete mode 100644 webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts create mode 100644 webapp/src/app/resolvers/multiplier-researcher-page.resolver.ts delete mode 100644 webapp/src/app/resolvers/multiplier-researcher.resolver.ts diff --git a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html index 69c55fad..911aa83a 100644 --- a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html +++ b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.html @@ -1,270 +1,412 @@
-

Universität · Gründungspotenzial

-

Welche Forschenden könnten künftig gründen?

-

- Ein Modell bewertet jede Forschende und jeden Forschenden gegen rund 9.000 - Wissenschaftler:innen aus acht Universitäten. Der Score allein ist noch - keine Shortlist – viele Top-Scores sind fehlerhafte Datensätze. Dieses - Dashboard zeigt zuerst das Screening, danach die Personen, die es - bestehen. -

+

Gründungspotenzial · {{ universityName() }}

+ @if (hasData()) { +
+

Welche Forschenden könnten künftig gründen?

+

+ Dieses Dashboard zeigt das Gründungspotenzial der Forschenden der + {{ universityName() }}. Ein Modell bewertet jede Person gegen rund 9.000 + Wissenschaftler:innen aus acht Universitäten. Der Score allein ist noch + keine Shortlist – viele Top-Scores sind fehlerhafte Datensätze. Deshalb + zeigt die Seite zuerst das Screening, danach die Personen, die es + bestehen. +

+
-
-
-
Forschende im Index
-
{{ fmtInt(kpis().total) }}
-
gesamte Kohorte
-
-
-
Bestehen Datenqualität
-
{{ fmtInt(kpis().passed) }}
-
{{ kpis().share }} % der Kohorte
-
-
-
Auf der Shortlist
-
{{ fmtInt(kpis().shortlisted) }}
-
- Score ≥ {{ fmt1(threshold()) }}{{ screened() ? ', gescreent' : ', ungescreent' }} -
-
-
- -
-

1 · Warum die Shortlist klein ist

-

- Jeder Balken zeigt, wie viele Personen nach einer Screening-Regel übrig - bleiben. Die mittleren Regeln existieren, weil OpenAlex-Profile manchmal - zusammengeführt oder falsch datiert sind – und dieses Modell darauf - besonders empfindlich reagiert. -

-
- @for (row of funnel(); track row.key) { -
-
{{ row.label }}
-
-
+
+ + +
Forschende im Index
+
{{ fmtInt(kpis().total) }}
+
gesamte Kohorte
+
+
+ + +
Bestehen Datenqualität
+
{{ fmtInt(kpis().passed) }}
+
{{ kpis().share }} % der Kohorte
+
+
+ + +
Auf der Shortlist
+
{{ fmtInt(kpis().shortlisted) }}
+
+ Score ≥ {{ fmt1(threshold()) + }}{{ screened() ? ', gescreent' : ', ungescreent' }}
-
{{ fmtInt(row.count) }}
-
{{ row.lost ? '−' + fmtInt(row.lost) : '' }}
-
- } + +
-
-
-

2 · Die Shortlist

-

- Verschiebe den Schwellenwert, um Listenlänge gegen Sicherheit abzuwägen. - Aktiviere das Screening für eine handlungsfähige Liste; deaktiviere es, um - zu sehen, was der rohe Modell-Score hervorgebracht hätte – orange Zeilen - sind Datensätze, die eine Datenqualitätsregel verletzt haben. Klicke auf - eine Person, um ihre Karte zu öffnen. -

+
+

1 · Warum die Shortlist klein ist

+

+ Jeder Balken zeigt, wie viele Personen nach einer Screening-Regel übrig + bleiben. Die mittleren Regeln existieren, weil OpenAlex-Profile manchmal + zusammengeführt oder falsch datiert sind – und dieses Modell darauf + besonders empfindlich reagiert. +

+
+ @for (row of funnel(); track row.key) { +
+
{{ row.label }}
+
+ +
+
{{ fmtInt(row.count) }}
+
+ {{ row.lost ? '−' + fmtInt(row.lost) : '' }} +
+
+ } +
+
-
-
- -
- Publikationen {{ fmtInt(row.pubs) }} - Patente {{ fmtInt(row.patents) }} - Industrie-Publikationen {{ fmtInt(row.industry) }} - Förderungen {{ fmtInt(row.grants) }} - aktive Jahre {{ fmtInt(row.activeYears) }} -
-
- } - - -
-

3 · Woher die Kandidat:innen kommen

-

Beide Panels nutzen die Shortlist am aktuellen Schwellenwert.

-
-
-
Karrierestufe
-
- @for (s of stageRows(); track s.label) { -
- {{ s.label }} - - - - {{ s.count }} / {{ fmtInt(s.pool) }} +
+ Balken sind Kandidatenzahlen; die graue Zahl ist der gescreente + Pool der Stufe.
- } -
-
Balken sind Kandidatenzahlen; die graue Zahl ist der gescreente Pool der Stufe.
-
-
-
Forschungsfeld, vs. Anteil an der Kohorte
-
- @for (a of areaRows(); track a.label) { -
- {{ a.label }} - - - - {{ a.count }} · {{ fmt1(a.cohortShare) }} % der Kohorte + + + + + +
+ Forschungsfeld, vs. Anteil an der Kohorte
- } -
-
- Balken sind Kandidatenzahlen. Die graue Zahl ist der Anteil des Feldes an der - gescreenten Kohorte – ein Feld deutlich über seinem Anteil überproduziert. -
+
+ @for (a of areaRows(); track a.code) { +
+ {{ a.label ?? a.code }} + + + + {{ a.shortlist_count ?? 0 }} + · {{ fmt1((a.cohort_share ?? 0) * 100) }} % der + Kohorte +
+ } +
+
+ Balken sind Kandidatenzahlen. Die graue Zahl ist der Anteil des + Feldes an der gescreenten Kohorte – ein Feld deutlich über seinem + Anteil überproduziert. +
+ +
-
-
+ + } @else { + + + {{ FOUNDER_ICON }} +

Noch kein Gründungspotenzial berechnet

+

+ Für die {{ universityName() }} wurde das + Gründungspotenzial noch nicht berechnet. Sobald die Auswertung + vorliegt, erscheinen hier die Kandidat:innen, ihre Scores und ihre + Multiplikator-Netzwerke. +

+
+
+ } + + + + {{ row.name }} + + {{ row.candidate.career_bucket ?? '–' }} + @if (row.areaLabel) { + · {{ row.areaLabel }} + } + + + + + + @if (row.score !== null) { + + + + + {{ fmt1(row.score) }} + + } @else { + – + } + + + + + + @for (v of row.within; track $index) { + + } + + + {{ row.within.map((v) => (v === null ? '–' : round(v))).join(' · ') }} + + + + + + + {{ fmtInt(row.candidate.founder_features?.publications) }} Publ. + @if (row.candidate.founder_features?.patents) { + · {{ fmtInt(row.candidate.founder_features?.patents) }} Pat. + } + @if (row.candidate.founder_features?.industry_collab_papers) { + · + {{ fmtInt(row.candidate.founder_features?.industry_collab_papers) }} Ind. + } + + + + + + @if (!row.candidate.screen.passed && row.flagLabel) { + {{ row.flagLabel }} + } + + + diff --git a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss index 06365095..cfb880bf 100644 --- a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss +++ b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.scss @@ -28,6 +28,11 @@ font-size: 15.5px; margin: 0; max-width: 66ch; + + strong { + color: var(--sg-text); + font-weight: 600; + } } } @@ -35,6 +40,42 @@ section { margin-top: 40px; } +.empty-state { + margin-top: 28px; + max-width: 72ch; + background: var(--sg-surface-muted); + + .mat-mdc-card-content { + padding: 28px 30px; + } + + &__icon { + font-size: 34px; + width: 34px; + height: 34px; + color: var(--sg-text-soft); + margin-bottom: 10px; + } + + h2 { + font-size: 22px; + margin: 0 0 10px; + color: var(--sg-text); + } + + p { + font-size: 15px; + line-height: 1.55; + color: var(--sg-text-muted); + margin: 0; + } + + strong { + color: var(--sg-text); + font-weight: 600; + } +} + h2 { font-size: 20px; margin: 0 0 4px; @@ -61,9 +102,10 @@ h2 { .kpi { background: var(--sg-surface-muted); - border: 1px solid var(--sg-border); - border-radius: 10px; - padding: 14px 16px; + + .mat-mdc-card-content { + padding: 14px 16px; + } .kpi__key { font-size: 11px; @@ -114,17 +156,19 @@ h2 { } .funnel__track { + --mat-progress-bar-track-height: 20px; + --mat-progress-bar-active-indicator-height: 20px; + --mat-progress-bar-track-color: transparent; + --mat-progress-bar-active-indicator-color: var(--sg-blue-highlight); background: var(--sg-surface-muted); border-radius: 4px; height: 22px; overflow: hidden; border: 1px solid var(--sg-border); -} -.funnel__bar { - height: 100%; - background: var(--sg-blue-highlight); - border-radius: 0 4px 4px 0; + .mat-mdc-progress-bar { + height: 100%; + } } .funnel__count { @@ -175,70 +219,78 @@ h2 { margin-left: auto; } - input[type='range'] { - accent-color: var(--sg-blue-highlight); - width: 150px; + &__slider { + width: 220px; + min-width: 160px; } } // -- List --------------------------------------------------------------- -.list { - border: 1px solid var(--sg-border); - border-radius: 10px; +.list-card { overflow: hidden; + + .mat-mdc-card-content { + padding: 0; + } } -.list__head, -.list__row { - display: grid; - grid-template-columns: 1.5fr 0.9fr 1.15fr 0.95fr auto; - gap: 12px; - padding: 9px 14px; - align-items: center; - font-size: 13px; -} - -.list__head { - background: var(--sg-surface-muted); - border-bottom: 1px solid var(--sg-border); - font-size: 11px; - letter-spacing: 0.07em; - text-transform: uppercase; - color: var(--sg-text-soft); -} - -.list__row { - border: none; - border-bottom: 1px solid var(--sg-border); +.list-card .data-table-container table { width: 100%; - text-align: left; - color: inherit; - background: none; - cursor: pointer; - font: inherit; - color: var(--sg-text); + background: transparent; + font-size: 13px; - &:last-child { - border-bottom: none; + .mat-mdc-header-cell { + padding: 8px 14px; + background: var(--sg-surface-muted); + font-size: 11px; + letter-spacing: 0.07em; + text-transform: uppercase; + color: var(--sg-text-soft); } - &:hover, - &:focus-visible { - background: var(--sg-primary-soft); - outline: none; + .mat-mdc-cell { + padding: 8px 14px; + color: var(--sg-text); } - &--flag { - background: var(--sg-error-soft); + .mat-column-name { + width: 32%; + } - &:hover { - background: var(--sg-error-soft); - filter: brightness(0.97); + .mat-column-score { + width: 15%; + } + + .mat-column-within { + width: 22%; + } + + .mat-column-evidence { + width: 21%; + } + + .mat-column-actions { + width: 10%; + text-align: right; + } + + tr.element-row { + cursor: pointer; + + &:hover, + &:focus-visible { + background: var(--sg-primary-soft); + outline: none; + } + + &:focus-visible { + outline: 2px solid var(--sg-blue-highlight); + outline-offset: -2px; } } - &--selected { + tr.selected { box-shadow: inset 3px 0 0 var(--sg-blue-highlight); } } @@ -261,6 +313,10 @@ h2 { } .list__meter { + --mat-progress-bar-track-height: 8px; + --mat-progress-bar-active-indicator-height: 8px; + --mat-progress-bar-track-color: transparent; + --mat-progress-bar-active-indicator-color: var(--sg-blue-highlight); display: block; background: var(--sg-surface-soft); border-radius: 3px; @@ -268,13 +324,10 @@ h2 { flex: 1; min-width: 44px; overflow: hidden; -} -.list__meter-fill { - display: block; - height: 100%; - background: var(--sg-blue-highlight); - border-radius: 0 3px 3px 0; + .mat-mdc-progress-bar { + height: 100%; + } } .list__score-value { @@ -334,30 +387,6 @@ h2 { white-space: nowrap; } -.net-button { - display: inline-flex; - align-items: center; - justify-content: center; - border: 1px solid var(--sg-border); - background: var(--sg-surface); - color: var(--sg-text-muted); - border-radius: 8px; - width: 30px; - height: 30px; - cursor: pointer; - - &:hover { - color: var(--sg-blue-highlight); - border-color: var(--sg-blue-highlight); - } - - mat-icon { - font-size: 18px; - width: 18px; - height: 18px; - } -} - .list__empty { padding: 24px 14px; color: var(--sg-text-soft); @@ -367,12 +396,13 @@ h2 { // -- Detail card -------------------------------------------------------- .card { - border: 1px solid var(--sg-border); - border-radius: 12px; background: var(--sg-surface-muted); - padding: 20px; margin-top: 16px; + .mat-mdc-card-content { + padding: 20px; + } + h3 { margin: 0 0 2px; font-size: 20px; @@ -398,31 +428,6 @@ h2 { color: var(--sg-error); } -.open-network { - display: inline-flex; - align-items: center; - gap: 6px; - border: 1px solid var(--sg-border); - background: var(--sg-surface); - color: var(--sg-text); - border-radius: 8px; - padding: 7px 12px; - cursor: pointer; - font-size: 13px; - font-weight: 600; - - &:hover { - border-color: var(--sg-blue-highlight); - color: var(--sg-blue-highlight); - } - - mat-icon { - font-size: 18px; - width: 18px; - height: 18px; - } -} - .card__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); @@ -456,6 +461,11 @@ h2 { flex-wrap: wrap; gap: 7px; margin-top: 14px; + + b { + color: var(--sg-text); + font-variant-numeric: tabular-nums; + } } .fact { @@ -477,6 +487,15 @@ h2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; + align-items: stretch; +} + +.chart-card { + height: 100%; + + .mat-mdc-card-content { + padding: 14px 16px; + } } .chart__ttl { @@ -501,19 +520,20 @@ h2 { } .chart__track { + --mat-progress-bar-track-height: 14px; + --mat-progress-bar-active-indicator-height: 14px; + --mat-progress-bar-track-color: transparent; + --mat-progress-bar-active-indicator-color: var(--sg-blue-highlight); display: block; background: var(--sg-surface-muted); border-radius: 3px; height: 16px; overflow: hidden; border: 1px solid var(--sg-border); -} -.chart__fill { - display: block; - height: 100%; - border-radius: 0 3px 3px 0; - background: var(--sg-blue-highlight); + .mat-mdc-progress-bar { + height: 100%; + } } .chart__num { diff --git a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts index ecf58241..5c3e11c1 100644 --- a/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts +++ b/webapp/src/app/modules/founder-potential/founder-dashboard/founder-dashboard.component.ts @@ -5,60 +5,62 @@ import { inject, input, signal, + TemplateRef, + viewChild, } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { ActivatedRoute, Router, RouterModule } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { toSignal } from '@angular/core/rxjs-interop'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; import { MatIconModule } from '@angular/material/icon'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatSliderModule } from '@angular/material/slider'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { + CareerStageStatistics, FounderCandidate, FounderCandidatePage, FounderStatistics, + ResearchAreaStatistics, } from '../../../api'; import { FUNNEL_STAGE_LABELS, SCREEN_REASON_LABELS, - TAG_LABELS, clamp, fmt1, fmtInt, fmtSubScore, + tagDescription, + tagLabel, } from '../founder-potential.utils'; import { ScoreBarComponent } from '../../../shared/ui/score-bar/score-bar.component'; import { QueryParamPaginatorComponent } from '../../../shared/ui/query-param-paginator/query-param-paginator.component'; -import { NETWORK_ICON } from '../../../shared/ui/icons'; +import { ChipComponent } from '../../../shared/ui/chip/chip.component'; +import { + DataTableComponent, + GenericColumn, +} from '../../../shared/ui/data-table/data-table.component'; +import { FOUNDER_ICON, NETWORK_ICON } from '../../../shared/ui/icons'; +import { CredentialService } from '../../../shared/services/credential.service'; +const FALLBACK_UNIVERSITY = 'Universität Duisburg-Essen'; +const SUB_SCORE_KEYS = ['bridger', 'mentor', 'amplifier'] as const; + +/** + * A shortlist row: the generated candidate plus only the values that the + * table derives from it (display name, the 1/3/5-year slice, the headline + * screen reason). Everything else is read from `candidate` directly. + */ interface FounderRow { - id: string; + candidate: FounderCandidate; name: string; - careerBucket: string | null; areaLabel: string | null; score: number | null; within: (number | null)[]; - pubs: number; - patents: number; - industry: number; - grants: number; - activeYears: number; - passed: boolean; flagLabel: string | null; - sub: { bridger: number; mentor: number; amplifier: number }; - tags: string[]; -} - -interface StageRow { - label: string; - count: number; - pool: number; -} - -interface AreaRow { - label: string; - count: number; - cohortShare: number; - ratio: number | null; } @Component({ @@ -66,23 +68,41 @@ interface AreaRow { standalone: true, imports: [ CommonModule, - RouterModule, + MatButtonModule, + MatCardModule, MatIconModule, + MatProgressBarModule, MatSlideToggleModule, + MatSliderModule, + MatTooltipModule, ScoreBarComponent, QueryParamPaginatorComponent, + ChipComponent, + DataTableComponent, ], templateUrl: './founder-dashboard.component.html', styleUrl: './founder-dashboard.component.scss', }) export class FounderDashboardComponent { readonly NETWORK_ICON = NETWORK_ICON; + readonly FOUNDER_ICON = FOUNDER_ICON; readonly statistics = input.required(); readonly candidates = input.required(); private readonly router = inject(Router); private readonly route = inject(ActivatedRoute); + private readonly credentials = inject(CredentialService, { optional: true }); + + /** The university whose cohort is shown; comes from the account profile. */ + readonly universityName = computed( + () => this.credentials?.organizationName() || FALLBACK_UNIVERSITY, + ); + + /** False when the pipeline has not produced any documents for this university. */ + readonly hasData = computed( + () => (this.statistics().provenance?.document_count ?? 0) > 0, + ); private readonly queryParams = toSignal(this.route.queryParamMap, { initialValue: this.route.snapshot.queryParamMap, @@ -131,6 +151,50 @@ export class FounderDashboardComponent { // -- Shortlist ---------------------------------------------------------- + private readonly nameTemplate = + viewChild.required>('nameTemplate'); + private readonly scoreTemplate = + viewChild.required>('scoreTemplate'); + private readonly withinTemplate = + viewChild.required>('withinTemplate'); + private readonly evidenceTemplate = + viewChild.required>('evidenceTemplate'); + private readonly actionsTemplate = + viewChild.required>('actionsTemplate'); + + readonly columns = computed[]>(() => [ + { + id: 'name', + header: 'Forschende:r', + type: 'display', + cellTemplate: this.nameTemplate(), + }, + { + id: 'score', + header: 'Score', + type: 'display', + cellTemplate: this.scoreTemplate(), + }, + { + id: 'within', + header: 'Innerhalb 1 / 3 / 5 J.', + type: 'display', + cellTemplate: this.withinTemplate(), + }, + { + id: 'evidence', + header: 'Evidenz', + type: 'display', + cellTemplate: this.evidenceTemplate(), + }, + { + id: 'actions', + header: '', + type: 'display', + cellTemplate: this.actionsTemplate(), + }, + ]); + readonly total = computed(() => this.candidates().total ?? 0); readonly rows = computed(() => @@ -142,10 +206,23 @@ export class FounderDashboardComponent { readonly selectedRow = computed(() => { const id = this.selectedId(); const rows = this.rows(); - if (id) return rows.find((r) => r.id === id) ?? null; + if (id) { + return rows.find((r) => r.candidate.author_id === id) ?? null; + } return rows[0] ?? null; }); + /** The three multiplier roles of the selected person, with their tooltips. */ + readonly subScores = computed(() => { + const peerRanks = this.selectedRow()?.candidate.multiplier_peer_ranks; + return SUB_SCORE_KEYS.map((key) => ({ + key, + label: tagLabel(key), + hint: tagDescription(key), + value: peerRanks?.[key] ?? 0, + })); + }); + selectCandidate(id: string): void { this.selectedId.set(id); } @@ -156,14 +233,17 @@ export class FounderDashboardComponent { // -- Controls ----------------------------------------------------------- - onThresholdInput(event: Event): void { - const value = (event.target as HTMLInputElement).valueAsNumber; + /** Discrete label inside the Material slider thumb. */ + readonly formatThreshold = (value: number): string => String(value); + + onSliderInput(value: number): void { if (Number.isFinite(value)) this.thresholdDraft.set(value); } - onThresholdCommit(event: Event): void { - const value = (event.target as HTMLInputElement).valueAsNumber; + onSliderCommit(value = this.thresholdDraft()): void { if (!Number.isFinite(value)) return; + this.thresholdDraft.set(value); + if (value === this.threshold()) return; void this.router.navigate([], { relativeTo: this.route, queryParams: { threshold: value, page: 0 }, @@ -181,33 +261,22 @@ export class FounderDashboardComponent { // -- Stage / area charts ------------------------------------------------ - readonly stageRows = computed(() => { - const stages = this.statistics().career_stages ?? []; - return stages.map((s) => ({ - label: s.career_bucket, - count: s.shortlist_plain ?? 0, - pool: s.screened ?? 0, - })); - }); - - readonly stageMax = computed(() => - Math.max(1, ...this.stageRows().map((s) => s.count)), + readonly stageRows = computed( + () => this.statistics().career_stages ?? [], ); - readonly areaRows = computed(() => { - const areas = [...(this.statistics().research_areas ?? [])] + readonly stageMax = computed(() => + Math.max(1, ...this.stageRows().map((s) => s.shortlist_plain ?? 0)), + ); + + readonly areaRows = computed(() => + [...(this.statistics().research_areas ?? [])] .sort((a, b) => (b.shortlist_count ?? 0) - (a.shortlist_count ?? 0)) - .slice(0, 7); - return areas.map((a) => ({ - label: a.label ?? a.code, - count: a.shortlist_count ?? 0, - cohortShare: (a.cohort_share ?? 0) * 100, - ratio: a.ratio ?? null, - })); - }); + .slice(0, 7), + ); readonly areaMax = computed(() => - Math.max(1, ...this.areaRows().map((a) => a.count)), + Math.max(1, ...this.areaRows().map((a) => a.shortlist_count ?? 0)), ); // -- Formatting helpers for the template -------------------------------- @@ -215,7 +284,8 @@ export class FounderDashboardComponent { readonly fmtInt = fmtInt; readonly fmt1 = fmt1; readonly fmtSubScore = fmtSubScore; - readonly tagLabel = (tag: string) => TAG_LABELS[tag] ?? tag; + readonly tagLabel = tagLabel; + readonly tagDescription = tagDescription; /** Clamp a percentile into the 0-100 band for bar widths. */ readonly clamp0 = (value: number | null) => @@ -231,37 +301,21 @@ export class FounderDashboardComponent { function toRow(c: FounderCandidate): FounderRow { const fp = c.founder_potential; - const ff = c.founder_features; - const pr = c.multiplier_peer_ranks; - const reasons = c.screen?.reasons ?? []; - const passed = c.screen?.passed ?? true; + const reasons = c.screen.reasons ?? []; return { - id: c.author_id, + candidate: c, name: c.display_name ?? c.author_id, - careerBucket: c.career_bucket ?? null, - areaLabel: ff?.publication_research_area_label ?? null, + areaLabel: c.founder_features?.publication_research_area_label ?? null, score: fp?.external_percentile ?? null, within: [ fp?.external_percentile_within_1y ?? null, fp?.external_percentile_within_3y ?? null, fp?.external_percentile_within_5y ?? null, ], - pubs: ff?.publications ?? 0, - patents: ff?.patents ?? 0, - industry: ff?.industry_collab_papers ?? 0, - grants: ff?.grants ?? 0, - activeYears: c.active_years ?? 0, - passed, flagLabel: reasons.length > 0 ? (SCREEN_REASON_LABELS[reasons[0]] ?? reasons[0]) : null, - sub: { - bridger: pr?.bridger ?? 0, - mentor: pr?.mentor ?? 0, - amplifier: pr?.amplifier ?? 0, - }, - tags: c.tags ?? [], }; } diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html index f53c871b..319187b2 100644 --- a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.html @@ -1,137 +1,230 @@
- - {{ ARROW_BACK_ICON }} - Zurück zur Übersicht - - -
-

Smart-Guide · Multiplikator-Detektion

-

{{ name() }}

-
- @if (careerBucket()) { - - } - {{ fmtInt(nWorks()) }} Publikationen · {{ fmtInt(activeYears()) }} aktive Jahre - @if (suspicious()) { - {{ WARNING_ICON }} Zusammengeführtes Profil - } -
- @if (tags().length) { -
- @for (tag of tags(); track tag) { - {{ tagLabel(tag) }} + @if (unavailable(); as empty) { + + + {{ PERSON_OFF_ICON }} +

{{ empty.title }}

+

{{ empty.body }}

+ @if (empty.hint) { +

{{ empty.hint }}

+ } + + {{ ARROW_BACK_ICON }} + Zurück zum Gründungspotenzial + +
+
+ } @else { +
+

+ Smart-Guide · Multiplikator-Detektion · {{ universityName() }} +

+

{{ name() }}

+
+ @if (careerBucket()) { + } -
- } -
- -
- @for (entry of roleLegend(); track entry.role) { - - {{ entry.label }} - - } - Kollaboration (Breite = Stärke) - überwiegend institutionsübergreifend - Knotengröße = aktive Jahre -
- -
-
- @if ((network().nodes?.length ?? 0) > 0) { - - } @else { -
Kein Netzwerk verfügbar.
- } -
- {{ fmtInt(netMeta().shown) }} der {{ fmtInt(netMeta().totalCoauthors) }} - Koautor:innen dargestellt · {{ fmtInt(netMeta().cohortCoauthors) }} aus der - UDE-Kohorte · {{ fmtInt(netMeta().mentees) }} Mentees -
-
- -
-
-

Multiplikator-Scores

-

Rang gegen Peers dieser Universität, gleiche Karrierestufe. Schwelle: 85.

- @for (s of subScores(); track s.label) { - + >{{ fmtInt(nWorks()) }} Publikationen · + {{ fmtInt(activeYears()) }} aktive Jahre + @if (suspicious()) { + {{ WARNING_ICON }} Zusammengeführtes + Profil }
- -
-

Gründungspotenzial

-

Rang gegen ~9.000 Wissenschaftler:innen an anderen Universitäten.

- - - - - @if (founder().timingApplicable && founder().yearsToFounding !== null) { -

- @if ((founder().yearsToFounding ?? 0) <= 0) { - Das Aktivitätsmuster wirkt bereits gründungsbereit. - } @else { - Voraussichtlich in {{ fmt1(founder().yearsToFounding) }} Jahren gründungsreif. - } -

- } -
- -
- Publikationen {{ fmtInt(facts().pubs) }} - Patente {{ fmtInt(facts().patents) }} - Industrie-Publikationen {{ fmtInt(facts().industry) }} - Förderungen {{ fmtInt(facts().grants) }} - aktive Jahre {{ fmtInt(facts().activeYears) }} -
-
-
- -
-

Metriken im Detail

-

- Jeder Rohwert steht neben seinem Peer-Rang (0–1), damit nachvollziehbar - bleibt, warum eine Person so eingestuft wurde. -

-
- - - - - - - - - - @for (row of metricRows(); track row.key) { - - - - - + @if (tags().length) { +
+ @for (tag of tags(); track tag) { + + {{ tagLabel(tag) }} + } -
-
MetrikWertPeer-Rang
{{ row.label }}{{ fmtMetricValue(row.raw) }}{{ fmtPeerRank(row.rank) }}
-
-
+
+ } +
-
- Konfiguration {{ network().config_hash ?? '–' }} · - berechnet {{ network().computed_at ?? '–' }}. Klick auf - einen Knoten öffnet das Profil der Person. -
+
+ @for (entry of roleLegend(); track entry.role) { + + + {{ entry.label }} + + } + Kollaboration (Breite = Stärke) + überwiegend + institutionsübergreifend + Knotengröße = aktive Jahre +
+ +
+ + + @if (network(); as net) { + @if ((net.nodes?.length ?? 0) > 0) { + + } @else { +
Kein Netzwerk verfügbar.
+ } + } @else { +
Kein Netzwerk verfügbar.
+ } +
+ {{ fmtInt(netMeta().shown) }} der + {{ fmtInt(netMeta().totalCoauthors) }} Koautor:innen dargestellt · + {{ fmtInt(netMeta().cohortCoauthors) }} aus der UDE-Kohorte · + {{ fmtInt(netMeta().mentees) }} Mentees +
+
+
+ + + +
+
+

Multiplikator-Scores

+

+ Rang gegen Peers dieser Universität, gleiche Karrierestufe. + Schwelle: 85. +

+ @for (s of subScores(); track s.key) { + + } +
+ +
+

Gründungspotenzial

+

+ Rang gegen ~9.000 Wissenschaftler:innen an anderen + Universitäten. +

+ + + + + @if ( + founder().timingApplicable && founder().yearsToFounding !== null + ) { +

+ @if ((founder().yearsToFounding ?? 0) <= 0) { + Das Aktivitätsmuster wirkt bereits gründungsbereit. + } @else { + Voraussichtlich in + {{ fmt1(founder().yearsToFounding) }} Jahren gründungsreif. + } +

+ } +
+ +
+ Publikationen {{ fmtInt(facts().pubs) }} + Patente {{ fmtInt(facts().patents) }} + Industrie-Publikationen + {{ fmtInt(facts().industry) }} + Förderungen {{ fmtInt(facts().grants) }} + aktive Jahre {{ fmtInt(facts().activeYears) }} +
+ +
+

Metriken im Detail

+

+ Jeder Rohwert steht neben seinem Peer-Rang (0–1), damit + nachvollziehbar bleibt, warum eine Person so eingestuft wurde. +

+
+ + + + + + + + + + + + + + + + + + +
Metrik{{ row.label }}Wert + {{ fmtMetricValue(row.metric.raw) }} + + Peer-Rang + + {{ fmtPeerRank(row.metric.peer_rank) }} +
+
+
+
+
+
+
+ +
+ Konfiguration + {{ network()?.config_hash ?? '–' }} · berechnet + am + {{ + network()?.computed_at | date: 'dd.MM.yyyy HH:mm' + }} +
+ }
diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss index d03a65f5..8cfa7d8b 100644 --- a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.scss @@ -1,22 +1,19 @@ .researcher-network { - max-width: 1160px; + max-width: 1440px; margin: 0 auto; padding: 24px 8px 64px; } .back-link { - display: inline-flex; - align-items: center; - gap: 6px; - font-size: 13px; - color: var(--sg-text-muted); - text-decoration: none; margin-bottom: 16px; + color: var(--sg-text-muted); + font-size: 13px; mat-icon { font-size: 18px; width: 18px; height: 18px; + margin-right: 4px; } &:hover { @@ -75,18 +72,6 @@ margin-top: 4px; } -.tag-pill { - font-size: 11.5px; - font-weight: 600; - padding: 2.5px 10px; - border-radius: 999px; - letter-spacing: 0.04em; - border: 1px solid var(--sg-border); - color: var(--sg-text); - background: var(--sg-blue-highlight); - color: #fff; -} - .legend { position: sticky; top: 0; @@ -135,20 +120,22 @@ .case-grid { display: grid; - grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); - gap: 26px; + grid-template-columns: minmax(0, 1.9fr) minmax(340px, 1fr); + gap: 28px; align-items: start; margin-top: 26px; } .netbox { - border: 1px solid var(--sg-border); - border-radius: 10px; background: var(--sg-surface-muted); overflow: hidden; + .mat-mdc-card-content { + padding: 0; + } + &__empty { - height: 480px; + height: 640px; display: flex; align-items: center; justify-content: center; @@ -156,6 +143,12 @@ } } +.detail-card { + .mat-mdc-card-content { + padding: 18px; + } +} + .netfoot { font-size: 12px; color: var(--sg-text-soft); @@ -195,14 +188,6 @@ display: flex; flex-wrap: wrap; gap: 7px; -} - -.fact { - font-size: 12px; - background: var(--sg-surface-soft); - border-radius: 6px; - padding: 4px 9px; - color: var(--sg-text-muted); b { color: var(--sg-text); @@ -211,20 +196,7 @@ } .metrics { - margin-top: 48px; - - h2 { - font-size: 20px; - margin: 0 0 4px; - color: var(--sg-text); - font-weight: 700; - } - - .note { - font-size: 13px; - color: var(--sg-text-muted); - margin: 2px 0 16px; - } + min-width: 0; } .scroller { @@ -232,18 +204,13 @@ } table.mx { - border-collapse: collapse; width: 100%; - font-size: 12.5px; + background: transparent; + font-size: 12px; - th, - td { - text-align: left; - padding: 6px 9px; - border-bottom: 1px solid var(--sg-border); - } - - th { + .mat-mdc-header-cell { + padding: 0 7px; + height: 20px; color: var(--sg-text-soft); font-weight: 600; font-size: 11px; @@ -251,13 +218,18 @@ table.mx { letter-spacing: 0.06em; } - td { + .mat-mdc-cell { color: var(--sg-text-muted); + vertical-align: middle; + line-height: 1.2; + } + .mat-mdc-row { + height: 25px; } - td.num { - font-variant-numeric: tabular-nums; + .num { text-align: right; + font-variant-numeric: tabular-nums; color: var(--sg-text); white-space: nowrap; @@ -268,6 +240,45 @@ table.mx { } } +.unavailable { + margin-top: 32px; + max-width: 68ch; + background: var(--sg-surface-muted); + + .mat-mdc-card-content { + padding: 28px 30px; + } + + &__icon { + font-size: 34px; + width: 34px; + height: 34px; + color: var(--sg-text-soft); + margin-bottom: 10px; + } + + h1 { + font-size: 24px; + line-height: 1.2; + margin: 0 0 10px; + color: var(--sg-text); + } + + &__body { + font-size: 15px; + line-height: 1.55; + color: var(--sg-text); + margin: 0 0 8px; + } + + &__hint { + font-size: 13px; + line-height: 1.5; + color: var(--sg-text-muted); + margin: 0 0 20px; + } +} + footer.page { margin-top: 48px; border-top: 1px solid var(--sg-border); @@ -282,8 +293,12 @@ footer.page { font-size: 11.5px; } -@media (max-width: 900px) { +@media (max-width: 1000px) { .case-grid { grid-template-columns: 1fr; } + + .netbox__empty { + height: 420px; + } } diff --git a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts index 779a05f5..097477ea 100644 --- a/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts +++ b/webapp/src/app/modules/founder-potential/researcher-network/researcher-network.component.ts @@ -1,18 +1,25 @@ import { Component, computed, inject, input } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { Router, RouterModule } from '@angular/router'; +import { NavigationEnd, Router, RouterModule } from '@angular/router'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; import { MatIconModule } from '@angular/material/icon'; +import { MatTableModule } from '@angular/material/table'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { pipe } from 'rxjs'; -import { EgoNetwork, ResearcherDetail } from '../../../api'; import { METRIC_DEFS, - TAG_LABELS, fmt1, fmtInt, fmtMetricValue, fmtPeerRank, fmtSubScore, + tagDescription, + tagLabel, } from '../founder-potential.utils'; +import { MetricValue, ResearcherMetrics } from '../../../api'; +import { ResearcherPageState } from '../../../resolvers/multiplier-researcher-page.resolver'; import { MULTIPLIER_ROLE_LABELS, multiplierRoleColor, @@ -20,11 +27,32 @@ import { } from '../../../shared/ui/multiplier-network-graph/multiplier-network-graph.component'; import { ScoreBarComponent } from '../../../shared/ui/score-bar/score-bar.component'; import { CareerStageChipComponent } from '../../../shared/ui/career-stage-chip/career-stage-chip.component'; +import { ChipComponent } from '../../../shared/ui/chip/chip.component'; import { ChartThemeService } from '../../../shared/services/chart-theme.service'; -import { ARROW_BACK_ICON, WARNING_ICON } from '../../../shared/ui/icons'; - +import { CredentialService } from '../../../shared/services/credential.service'; +import { + ARROW_BACK_ICON, + PERSON_OFF_ICON, + WARNING_ICON, +} from '../../../shared/ui/icons'; +import { filter } from 'rxjs/operators'; const TAG_THRESHOLD = 0.85; const ROLE_ORDER = ['ego', 'cohort', 'mentee', 'industry', 'external']; +const SUB_SCORE_KEYS = ['bridger', 'mentor', 'amplifier'] as const; +const FALLBACK_UNIVERSITY = 'Universität Duisburg-Essen'; + +interface UnavailableView { + title: string; + body: string; + hint: string | null; +} + +/** A metric definition paired with the API's own raw/peer-rank block. */ +interface MetricRow { + key: keyof ResearcherMetrics; + label: string; + metric: MetricValue; +} @Component({ selector: 'app-researcher-network', @@ -32,46 +60,115 @@ const ROLE_ORDER = ['ego', 'cohort', 'mentee', 'industry', 'external']; imports: [ CommonModule, RouterModule, + MatButtonModule, + MatCardModule, MatIconModule, + MatTableModule, + MatTooltipModule, MultiplierNetworkGraphComponent, ScoreBarComponent, CareerStageChipComponent, + ChipComponent, ], templateUrl: './researcher-network.component.html', styleUrl: './researcher-network.component.scss', }) export class ResearcherNetworkComponent { + constructor() { + this.router.events + .pipe(filter((event: any) => event instanceof NavigationEnd)) + .subscribe(() => { + document.body.scrollTo({ + top: 0, + behavior: 'smooth', + }); + }); + } + readonly ARROW_BACK_ICON = ARROW_BACK_ICON; readonly WARNING_ICON = WARNING_ICON; + readonly PERSON_OFF_ICON = PERSON_OFF_ICON; - readonly researcher = input.required(); - readonly network = input.required(); + /** Resolved detail + network, or the backend's explanation why they are missing. */ + readonly page = input.required(); private readonly router = inject(Router); private readonly chartTheme = inject(ChartThemeService); + private readonly credentials = inject(CredentialService, { optional: true }); - readonly name = computed( - () => this.researcher().display_name ?? this.network().display_name ?? this.researcher().author_id, + readonly universityName = computed( + () => this.credentials?.organizationName() || FALLBACK_UNIVERSITY, ); - readonly careerBucket = computed(() => this.researcher().career_bucket ?? null); - readonly activeYears = computed(() => this.researcher().active_years ?? 0); - readonly nWorks = computed(() => this.researcher().n_works ?? 0); - readonly suspicious = computed(() => this.researcher().suspicious_profile ?? false); + private readonly available = computed(() => { + const page = this.page(); + return page.status === 'ok' ? page : null; + }); - readonly tags = computed(() => this.researcher().tags ?? []); + readonly researcher = computed(() => this.available()?.researcher ?? null); + readonly network = computed(() => this.available()?.network ?? null); + + readonly unavailable = computed(() => { + const page = this.page(); + if (page.status !== 'unavailable') return null; + + const university = this.universityName(); + const who = page.displayName ?? 'diese Person'; + + if (page.reason === 'OTHER_INSTITUTION') { + return { + title: 'Kein Gründungspotenzial für diese Universität', + body: `Für ${who} wurde kein Gründungspotenzial für die ${university} berechnet.`, + hint: page.authorInstitution + ? `Die Person ist aktuell der Einrichtung „${page.authorInstitution}“ zugeordnet, nicht der ${university}.` + : `Die Person ist keiner Einrichtung der ${university} zugeordnet.`, + }; + } + if (page.reason === 'NOT_INDEXED') { + return { + title: 'Noch keine berechneten Daten', + body: `Für ${who} wurde noch kein Gründungspotenzial berechnet.`, + hint: `Die Person gehört zur ${university}, ist aber noch nicht in der Auswertung enthalten.`, + }; + } + return { + title: 'Keine Daten zu dieser Person', + body: 'Zu dieser Person liegen keine berechneten Daten vor.', + hint: null, + }; + }); + + readonly name = computed( + () => + this.researcher()?.display_name ?? + this.network()?.display_name ?? + this.researcher()?.author_id ?? + 'Unbekannt', + ); + + readonly careerBucket = computed( + () => this.researcher()?.career_bucket ?? null, + ); + readonly activeYears = computed(() => this.researcher()?.active_years ?? 0); + readonly nWorks = computed(() => this.researcher()?.n_works ?? 0); + readonly suspicious = computed( + () => this.researcher()?.suspicious_profile ?? false, + ); + + readonly tags = computed(() => this.researcher()?.tags ?? []); readonly subScores = computed(() => { - const pr = this.researcher().multiplier_peer_ranks; - return [ - { label: 'Brückenbauer', raw: pr?.bridger ?? 0 }, - { label: 'Mentor', raw: pr?.mentor ?? 0 }, - { label: 'Verstärker', raw: pr?.amplifier ?? 0 }, - ]; + const pr = this.researcher()?.multiplier_peer_ranks; + return SUB_SCORE_KEYS.map((key) => ({ + key, + label: tagLabel(key), + hint: tagDescription(key), + value: pr?.[key] ?? 0, + })); }); readonly founder = computed(() => { - const fp = this.researcher().founder_potential; + const fp = this.researcher()?.founder_potential; return { score: fp?.external_percentile ?? null, within1: fp?.external_percentile_within_1y ?? null, @@ -83,7 +180,7 @@ export class ResearcherNetworkComponent { }); readonly facts = computed(() => { - const ff = this.researcher().founder_features; + const ff = this.researcher()?.founder_features; return { pubs: ff?.publications ?? 0, patents: ff?.patents ?? 0, @@ -96,25 +193,23 @@ export class ResearcherNetworkComponent { readonly netMeta = computed(() => { const n = this.network(); return { - totalCoauthors: n.total_coauthors ?? 0, - cohortCoauthors: n.cohort_coauthors ?? 0, - mentees: n.mentee_count ?? 0, - shown: n.shown ?? 0, + totalCoauthors: n?.total_coauthors ?? 0, + cohortCoauthors: n?.cohort_coauthors ?? 0, + mentees: n?.mentee_count ?? 0, + shown: n?.shown ?? 0, }; }); - readonly metricRows = computed(() => - METRIC_DEFS.map((def) => { - const metric = this.researcher().metrics?.[def.key]; - return { - key: def.key, - label: def.label, - raw: metric?.raw ?? null, - rank: metric?.peer_rank ?? null, - }; - }), + readonly metricRows = computed(() => + METRIC_DEFS.map((def) => ({ + key: def.key, + label: def.label, + metric: this.researcher()?.metrics?.[def.key] ?? {}, + })), ); + readonly displayedMetricColumns = ['metric', 'value', 'rank']; + readonly roleLegend = computed(() => ROLE_ORDER.map((role) => ({ role, @@ -134,6 +229,7 @@ export class ResearcherNetworkComponent { readonly fmtSubScore = fmtSubScore; readonly fmtPeerRank = fmtPeerRank; readonly fmtMetricValue = fmtMetricValue; - readonly tagLabel = (tag: string) => TAG_LABELS[tag] ?? tag; + readonly tagLabel = tagLabel; + readonly tagDescription = tagDescription; readonly tagThreshold = TAG_THRESHOLD * 100; } diff --git a/webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts b/webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts deleted file mode 100644 index fa70f892..00000000 --- a/webapp/src/app/resolvers/multiplier-researcher-network.resolver.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ResolveFn } from '@angular/router'; -import { inject } from '@angular/core'; -import { EgoNetwork, MultiplicatorsService } from '../api'; - -/** One researcher's ego co-author network (nodes and edges, no layout). */ -export const multiplierResearcherNetworkResolver: ResolveFn = ( - route, -) => { - const service = inject(MultiplicatorsService); - const authorId = route.paramMap.get('authorId') ?? ''; - return service.getMultiplicatorResearcherNetwork(authorId); -}; diff --git a/webapp/src/app/resolvers/multiplier-researcher-page.resolver.ts b/webapp/src/app/resolvers/multiplier-researcher-page.resolver.ts new file mode 100644 index 00000000..d79b6882 --- /dev/null +++ b/webapp/src/app/resolvers/multiplier-researcher-page.resolver.ts @@ -0,0 +1,103 @@ +import { inject } from '@angular/core'; +import { HttpErrorResponse } from '@angular/common/http'; +import { ResolveFn } from '@angular/router'; +import { catchError, map, of, switchMap, throwError } from 'rxjs'; + +import { EgoNetwork, MultiplicatorsService, ResearcherDetail } from '../api'; + +/** + * Why the backend has no multiplicator document for this author. + * + * This mirrors `ResearcherUnavailableReason` on the backend. It is not in the + * generated client because it is transported in the 404 *error body*, and the + * OpenAPI generator (and the Angular client) do not type error responses. + */ +export type ResearcherUnavailableReason = + | 'OTHER_INSTITUTION' + | 'NOT_INDEXED' + | 'UNKNOWN_AUTHOR' + | 'UNKNOWN'; + +export type ResearcherPageState = + | { + status: 'ok'; + /** Generated model, unchanged. */ + researcher: ResearcherDetail; + /** Generated model; null when the ego network document is missing. */ + network: EgoNetwork | null; + } + | { + status: 'unavailable'; + authorId: string; + reason: ResearcherUnavailableReason; + /** Technical message from the API; used for logging only. */ + message: string | null; + displayName: string | null; + /** The author's current institution, when it is somewhere else. */ + authorInstitution: string | null; + }; + +const REASONS: readonly ResearcherUnavailableReason[] = [ + 'OTHER_INSTITUTION', + 'NOT_INDEXED', + 'UNKNOWN_AUTHOR', +]; + +/** + * Loads the researcher detail and, only on success, their ego network. + * + * A 404 is not an error for this page: the backend explains in the body why + * the person is missing (other institution, not indexed, unknown author), so + * we turn it into a renderable state instead of letting the global navigation + * error handler redirect to /error. Any other status is rethrown. + */ +export const multiplierResearcherPageResolver: ResolveFn< + ResearcherPageState +> = (route) => { + const service = inject(MultiplicatorsService); + const authorId = route.paramMap.get('authorId') ?? ''; + + return service.getMultiplicatorResearcher(authorId).pipe( + switchMap((researcher) => + service.getMultiplicatorResearcherNetwork(authorId).pipe( + catchError(() => of(null)), + map( + (network): ResearcherPageState => ({ + status: 'ok', + researcher, + network, + }), + ), + ), + ), + catchError((error: unknown) => { + if (error instanceof HttpErrorResponse && error.status === 404) { + return of(toUnavailable(authorId, error)); + } + return throwError(() => error); + }), + ); +}; + +function toUnavailable( + requestedAuthorId: string, + error: HttpErrorResponse, +): Extract { + const body = (error.error ?? {}) as Record; + const reason = REASONS.includes(body['reason'] as ResearcherUnavailableReason) + ? (body['reason'] as ResearcherUnavailableReason) + : 'UNKNOWN'; + + return { + status: 'unavailable', + authorId: asString(body['author_id']) ?? requestedAuthorId, + reason, + message: asString(body['message']), + displayName: asString(body['display_name']), + authorInstitution: asString(body['author_institution']), + }; +} + +function asString(value: unknown): string | null { + return typeof value === 'string' && value.length > 0 ? value : null; +} diff --git a/webapp/src/app/resolvers/multiplier-researcher.resolver.ts b/webapp/src/app/resolvers/multiplier-researcher.resolver.ts deleted file mode 100644 index b3ae2802..00000000 --- a/webapp/src/app/resolvers/multiplier-researcher.resolver.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ResolveFn } from '@angular/router'; -import { inject } from '@angular/core'; -import { MultiplicatorsService, ResearcherDetail } from '../api'; - -/** Full multiplier + founder-potential detail for one researcher. */ -export const multiplierResearcherResolver: ResolveFn = ( - route, -) => { - const service = inject(MultiplicatorsService); - const authorId = route.paramMap.get('authorId') ?? ''; - return service.getMultiplicatorResearcher(authorId); -}; diff --git a/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html index f0b9e634..0317a26b 100644 --- a/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html +++ b/webapp/src/app/shared/ui/multiplier-network-graph/multiplier-network-graph.component.html @@ -1,5 +1,6 @@
(); + /** Chart height in pixels. */ + readonly height = input(480); readonly nodeClick = output(); private readonly chartTheme = inject(ChartThemeService); @@ -160,7 +162,7 @@ export class MultiplierNetworkGraphComponent { inst: node.inst ?? '', activeYears, nWorks: isEgo ? nWorks : undefined, - symbolSize: isEgo ? 34 : clamp(12 + activeYears * 2, 12, 44), + symbolSize: isEgo ? 24 : clamp(8 + activeYears * 1.1, 8, 26), itemStyle: { color: this.roleColor(role), borderColor: isEgo ? textColor : 'transparent', -- 2.56.1 From 2367bfeb59154c8a753f3c4f04b178927ea855bc Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 4 Nov 2026 21:45:16 +0100 Subject: [PATCH 4/7] layout adjusted to use mat-angular components --- .../ui/score-bar/score-bar.component.html | 13 +++++++++++- .../ui/score-bar/score-bar.component.scss | 21 ++++++++++++++++++- .../ui/score-bar/score-bar.component.ts | 5 +++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/webapp/src/app/shared/ui/score-bar/score-bar.component.html b/webapp/src/app/shared/ui/score-bar/score-bar.component.html index f54ebef2..5dbb1f99 100644 --- a/webapp/src/app/shared/ui/score-bar/score-bar.component.html +++ b/webapp/src/app/shared/ui/score-bar/score-bar.component.html @@ -2,7 +2,18 @@ class="score-bar" [class.score-bar--success]="variant() === 'success'" [class.score-bar--warn]="variant() === 'warn'"> - {{ label() }} + + {{ label() }} + @if (hint()) { + + } + @if (thresholdPct() !== null) { diff --git a/webapp/src/app/shared/ui/score-bar/score-bar.component.scss b/webapp/src/app/shared/ui/score-bar/score-bar.component.scss index e58d8169..4913fce1 100644 --- a/webapp/src/app/shared/ui/score-bar/score-bar.component.scss +++ b/webapp/src/app/shared/ui/score-bar/score-bar.component.scss @@ -1,6 +1,6 @@ .score-bar { display: grid; - grid-template-columns: 96px 1fr 48px; + grid-template-columns: minmax(0, 132px) 1fr 50px; gap: 10px; align-items: center; margin-bottom: 8px; @@ -9,12 +9,31 @@ } .score-bar__label { + display: inline-flex; + align-items: center; + gap: 3px; + min-width: 0; color: var(--sg-text-muted); + + &--hinted { + cursor: help; + } +} + +.score-bar__label-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.score-bar__hint { + flex: none; + font-size: 14px; + width: 14px; + height: 14px; + color: var(--sg-text-soft); +} + .score-bar__track { position: relative; display: block; diff --git a/webapp/src/app/shared/ui/score-bar/score-bar.component.ts b/webapp/src/app/shared/ui/score-bar/score-bar.component.ts index cfff13d9..8246bb61 100644 --- a/webapp/src/app/shared/ui/score-bar/score-bar.component.ts +++ b/webapp/src/app/shared/ui/score-bar/score-bar.component.ts @@ -1,4 +1,6 @@ import { Component, computed, input } from '@angular/core'; +import { MatIconModule } from '@angular/material/icon'; +import { MatTooltipModule } from '@angular/material/tooltip'; export type ScoreBarVariant = 'primary' | 'success' | 'warn'; @@ -10,6 +12,7 @@ export type ScoreBarVariant = 'primary' | 'success' | 'warn'; @Component({ selector: 'app-score-bar', standalone: true, + imports: [MatIconModule, MatTooltipModule], templateUrl: './score-bar.component.html', styleUrl: './score-bar.component.scss', }) @@ -23,6 +26,8 @@ export class ScoreBarComponent { readonly display = input(null); /** Optional threshold (same units as `value`), drawn as a dashed marker. */ readonly threshold = input(null); + /** Optional explanation, shown as a tooltip on the label. */ + readonly hint = input(null); readonly variant = input('primary'); readonly pct = computed(() => { -- 2.56.1 From 72daa3f2e84f966fc43f0c20b72562e24810187a Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 4 Nov 2026 21:47:41 +0100 Subject: [PATCH 5/7] fix: added error handling for unauthorized, wrong uni and wrong Openalex ID accesses --- service/src/main/inse/exceptions.py | 28 +++ service/src/main/inse/main.py | 18 ++ service/src/main/inse/multiplicators/model.py | 12 ++ .../src/main/inse/multiplicators/service.py | 153 +++++++++++++- .../main/inse/multiplicators/test_service.py | 194 +++++++++++++++++- 5 files changed, 398 insertions(+), 7 deletions(-) diff --git a/service/src/main/inse/exceptions.py b/service/src/main/inse/exceptions.py index eea6c9de..65610f5b 100644 --- a/service/src/main/inse/exceptions.py +++ b/service/src/main/inse/exceptions.py @@ -8,6 +8,34 @@ class NotFoundException(Exception): super().__init__(message) +class ResearcherDataUnavailableException(NotFoundException): + """Raised when no multiplicator document exists for an author. + + The ``reason`` tells the client *why* the person is missing, so the UI can + explain it instead of showing a generic error page: + + ``NOT_INDEXED`` the author belongs to the institution but the pipeline + produced no document for them, + ``OTHER_INSTITUTION`` the author's current affiliations are elsewhere, + ``UNKNOWN_AUTHOR`` OpenAlex does not know the author at all. + """ + + def __init__( + self, + message: str, + *, + reason: str, + author_id: str | None = None, + display_name: str | None = None, + author_institution: str | None = None, + ): + super().__init__(message) + self.reason = reason + self.author_id = author_id + self.display_name = display_name + self.author_institution = author_institution + + class ElasticsearchException(Exception): """Base exception for all Elasticsearch integrations.""" diff --git a/service/src/main/inse/main.py b/service/src/main/inse/main.py index 0de99712..f957d0e1 100644 --- a/service/src/main/inse/main.py +++ b/service/src/main/inse/main.py @@ -28,6 +28,7 @@ from inse.exceptions import ( ElasticsearchException, MissingApiKeyError, NotFoundException, + ResearcherDataUnavailableException, UpstreamAPIException, ) from inse.funders.service import router as funders_service_router @@ -160,6 +161,23 @@ async def handle_not_found(request: Request, exc: NotFoundException): return JSONResponse(status_code=404, content={"message": str(exc)}) +@app.exception_handler(ResearcherDataUnavailableException) +async def handle_researcher_unavailable( + request: Request, exc: ResearcherDataUnavailableException +): + """404 with a machine-readable reason, so the UI can explain the gap.""" + return JSONResponse( + status_code=404, + content={ + "message": str(exc), + "reason": exc.reason, + "author_id": exc.author_id, + "display_name": exc.display_name, + "author_institution": exc.author_institution, + }, + ) + + @app.exception_handler(ElasticsearchException) async def handle_elasticsearch_error(request: Request, exc: ElasticsearchException): logger.error("Elasticsearch integration error: %s", str(exc)) diff --git a/service/src/main/inse/multiplicators/model.py b/service/src/main/inse/multiplicators/model.py index b8ee1317..f7d692dd 100644 --- a/service/src/main/inse/multiplicators/model.py +++ b/service/src/main/inse/multiplicators/model.py @@ -110,6 +110,18 @@ class ShowcaseKind(StrEnum): EXAMPLE = "example" +class ResearcherUnavailableReason(StrEnum): + """Why no multiplicator document exists for a requested author.""" + + #: The author is an active member of this university, but the pipeline has + #: no document for them yet. + NOT_INDEXED = "NOT_INDEXED" + #: The author's current affiliations are at other institutions. + OTHER_INSTITUTION = "OTHER_INSTITUTION" + #: OpenAlex has no author with this id. + UNKNOWN_AUTHOR = "UNKNOWN_AUTHOR" + + class MultiplicatorsBase(BaseModel): """Ignores unknown source keys so retired index fields never leak out.""" diff --git a/service/src/main/inse/multiplicators/service.py b/service/src/main/inse/multiplicators/service.py index 5268d197..20047762 100644 --- a/service/src/main/inse/multiplicators/service.py +++ b/service/src/main/inse/multiplicators/service.py @@ -10,14 +10,20 @@ request; nothing is precomputed or cached beyond the shared ETag middleware. """ import json +import logging from functools import lru_cache from pathlib import Path from typing import Any +from inse.authors.v2.service import ( + author_currently_belongs_to_institution, + get_author_by_id, +) from inse.exceptions import ( BadRequestException, ElasticsearchNotFoundException, NotFoundException, + ResearcherDataUnavailableException, ) from inse.integrations import elasticsearch from inse.model import ESIndex, SortDirection @@ -54,12 +60,15 @@ from .model import ( ResearcherSortBy, ResearcherSummary, ResearcherSummaryPage, + ResearcherUnavailableReason, ResearchAreaStatistics, Showcase, ShowcaseEntry, ShowcaseKind, ) +logger = logging.getLogger(__name__) + MAX_RESULT_WINDOW = 10_000 MODEL_INFO_PATH = Path(__file__).parent / "data" / "founder_model_info.json" @@ -586,10 +595,85 @@ async def _get_doc(index: ESIndex, institution_id: str, author_id: str) -> dict[ return source +async def _explain_missing_researcher( + institution_id: str, author_id: str +) -> ResearcherDataUnavailableException: + """Diagnose a missing document with OpenAlex author data. + + Only runs on the 404 path, so the happy path keeps its single document + lookup. Any failure here must not mask the original 404: the helper falls + back to ``UNKNOWN_AUTHOR``. + """ + short_author = short_openalex_id(author_id) + message = ( + f"No multiplicator data for author {short_author} " + f"at institution {institution_id}." + ) + + author = None + try: + author = await get_author_by_id(short_author) + except Exception: + logger.debug( + "Author lookup failed for %s while explaining a missing document", + short_author, + exc_info=True, + ) + + belongs = False + if author is not None: + try: + belongs = await author_currently_belongs_to_institution( + short_author, institution_id + ) + except Exception: + logger.debug( + "Membership check failed for %s at %s", + short_author, + institution_id, + exc_info=True, + ) + + institutions = (author.last_known_institutions or []) if author else [] + # The activity check uses a two-year affiliation cutoff, so a long-retired + # member can fail it while still listing this institution. In that case the + # honest answer is "not indexed", not "belongs elsewhere". + listed_at_institution = any( + i.id and short_openalex_id(i.id) == institution_id for i in institutions + ) + + if belongs or listed_at_institution: + return ResearcherDataUnavailableException( + f"{message} The author belongs to this institution but is not indexed.", + reason=ResearcherUnavailableReason.NOT_INDEXED.value, + author_id=short_author, + display_name=author.display_name if author else None, + ) + + if author is not None: + names = [i.display_name for i in institutions if i.display_name] + return ResearcherDataUnavailableException( + f"{message} The author's current affiliations are at other institutions.", + reason=ResearcherUnavailableReason.OTHER_INSTITUTION.value, + author_id=short_author, + display_name=author.display_name, + author_institution=names[0] if names else None, + ) + + return ResearcherDataUnavailableException( + f"{message} OpenAlex has no author with this id.", + reason=ResearcherUnavailableReason.UNKNOWN_AUTHOR.value, + author_id=short_author, + ) + + async def get_researcher_detail( institution_id: str, author_id: str ) -> ResearcherDetail: - source = await _get_doc(ESIndex.MULTIPLICATORS_V1, institution_id, author_id) + try: + source = await _get_doc(ESIndex.MULTIPLICATORS_V1, institution_id, author_id) + except NotFoundException as exc: + raise await _explain_missing_researcher(institution_id, author_id) from exc return _to_detail(source) @@ -924,6 +1008,62 @@ def _to_stage_statistics( ) +def _empty_founder_statistics( + *, + institution_id: str, + percentile_threshold: float, + min_publications: int, + soft_peer_rank_threshold: float, + max_career_age: int, + tagged_band: float, +) -> FounderStatistics: + """A valid, all-zero response for a university without indexed data. + + Returning 200 instead of 404 lets the dashboard tell "the computation has + not run for this university yet" apart from a real failure and render its + empty state. ``provenance.document_count == 0`` is the signal. + """ + funnel_labels = ( + (FunnelStageKey.ALL, "All researchers in the index"), + ( + FunnelStageKey.IN_POPULATION, + "Scoreable by the model (at least 4 publications)", + ), + (FunnelStageKey.NOT_SUSPICIOUS, "Not a merged/duplicate profile"), + ( + FunnelStageKey.CAREER_AGE_PLAUSIBLE, + f"Career length plausible (at most {max_career_age} years)", + ), + ( + FunnelStageKey.MIN_PUBLICATIONS, + f"Has at least {min_publications} publications", + ), + ) + return FounderStatistics( + provenance=FounderStatisticsProvenance( + institution_id=institution_id, + document_count=0, + patent_sources=[], + ), + parameters=FounderStatisticsParameters( + percentile_threshold=percentile_threshold, + min_publications=min_publications, + soft_peer_rank_threshold=soft_peer_rank_threshold, + max_career_age=max_career_age, + tagged_band=tagged_band, + ), + funnel=[ + FunnelStage(key=key, label=label, count=0) for key, label in funnel_labels + ], + overall=_to_stage_statistics("ALL", 0, {}), + career_stages=[], + research_areas=[], + archetypes=[ArchetypeOverlap(tag=tag) for tag in MultiplierTag], + untagged_shortlist_count=0, + untagged_robust_count=0, + ) + + async def get_founder_statistics( institution_id: str, percentile_threshold: float = 90.0, @@ -949,8 +1089,15 @@ async def get_founder_statistics( total = response.get("hits", {}).get("total", {}).get("value", 0) if total == 0: - raise NotFoundException( - f"No multiplicator data indexed for institution {institution_id}." + # No computation for this university yet: answer with an empty payload + # instead of a 404, so the UI can show its "not computed" state. + return _empty_founder_statistics( + institution_id=institution_id, + percentile_threshold=percentile_threshold, + min_publications=min_publications, + soft_peer_rank_threshold=soft_peer_rank_threshold, + max_career_age=max_career_age, + tagged_band=tagged_band, ) aggs = response.get("aggregations", {}) diff --git a/service/src/main/inse/multiplicators/test_service.py b/service/src/main/inse/multiplicators/test_service.py index 42de512c..6ff4c17a 100644 --- a/service/src/main/inse/multiplicators/test_service.py +++ b/service/src/main/inse/multiplicators/test_service.py @@ -2,7 +2,11 @@ from unittest.mock import AsyncMock, patch import pytest -from inse.exceptions import BadRequestException, NotFoundException +from inse.exceptions import ( + BadRequestException, + NotFoundException, + ResearcherDataUnavailableException, +) from inse.integrations.elasticsearch import _index_to_cluster from inse.model import ESCluster, ESIndex, SortDirection @@ -14,6 +18,7 @@ from .model import ( MultiplierTag, PeerRankField, ResearcherSortBy, + ResearcherUnavailableReason, ShowcaseKind, ) @@ -390,6 +395,177 @@ async def test_researcher_detail_rejects_document_from_another_institution(): await service.get_researcher_detail(INSTITUTION, "A5113304257") +def _author(author_id: str = "A5113304257", institutions: list[str] | None = None): + from inse.models.openalex.author import Author + + return Author( + id=f"https://openalex.org/{author_id}", + display_name="Test Person", + last_known_institutions=[ + {"id": f"https://openalex.org/I{index}", "display_name": name} + for index, name in enumerate(institutions or []) + ], + ) + + +@pytest.mark.anyio +async def test_missing_detail_reports_author_of_another_institution(): + with ( + patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": False}), + ), + patch( + "inse.multiplicators.service.get_author_by_id", + new=AsyncMock(return_value=_author(institutions=["TU Berlin"])), + ), + patch( + "inse.multiplicators.service.author_currently_belongs_to_institution", + new=AsyncMock(return_value=False), + ), + ): + with pytest.raises(ResearcherDataUnavailableException) as excinfo: + await service.get_researcher_detail(INSTITUTION, "A5113304257") + + exc = excinfo.value + assert exc.reason == ResearcherUnavailableReason.OTHER_INSTITUTION + assert exc.author_institution == "TU Berlin" + assert exc.display_name == "Test Person" + assert exc.author_id == "A5113304257" + + +@pytest.mark.anyio +async def test_missing_detail_reports_member_that_was_never_indexed(): + with ( + patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": False}), + ), + patch( + "inse.multiplicators.service.get_author_by_id", + new=AsyncMock(return_value=_author()), + ), + patch( + "inse.multiplicators.service.author_currently_belongs_to_institution", + new=AsyncMock(return_value=True), + ), + ): + with pytest.raises(ResearcherDataUnavailableException) as excinfo: + await service.get_researcher_detail(INSTITUTION, "A5113304257") + + assert excinfo.value.reason == ResearcherUnavailableReason.NOT_INDEXED + assert excinfo.value.author_institution is None + + +@pytest.mark.anyio +async def test_missing_detail_treats_listed_member_as_not_indexed(): + """A long-retired member fails the activity check but still lists UDE.""" + from inse.models.openalex.author import Author + + author = Author( + id="https://openalex.org/A5113304257", + display_name="Test Person", + last_known_institutions=[ + { + "id": f"https://openalex.org/{INSTITUTION}", + "display_name": "Universität Duisburg-Essen", + } + ], + ) + with ( + patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": False}), + ), + patch( + "inse.multiplicators.service.get_author_by_id", + new=AsyncMock(return_value=author), + ), + patch( + "inse.multiplicators.service.author_currently_belongs_to_institution", + new=AsyncMock(return_value=False), + ), + ): + with pytest.raises(ResearcherDataUnavailableException) as excinfo: + await service.get_researcher_detail(INSTITUTION, "A5113304257") + + assert excinfo.value.reason == ResearcherUnavailableReason.NOT_INDEXED + assert excinfo.value.author_institution is None + + +@pytest.mark.anyio +async def test_missing_detail_reports_unknown_author(): + with ( + patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": False}), + ), + patch( + "inse.multiplicators.service.get_author_by_id", + new=AsyncMock(return_value=None), + ), + ): + with pytest.raises(ResearcherDataUnavailableException) as excinfo: + await service.get_researcher_detail(INSTITUTION, "A0000000000") + + assert excinfo.value.reason == ResearcherUnavailableReason.UNKNOWN_AUTHOR + + +@pytest.mark.anyio +async def test_missing_detail_survives_a_broken_author_lookup(): + with ( + patch( + "inse.multiplicators.service.elasticsearch.get", + new=AsyncMock(return_value={"found": False}), + ), + patch( + "inse.multiplicators.service.get_author_by_id", + new=AsyncMock(side_effect=RuntimeError("author index unavailable")), + ), + ): + with pytest.raises(NotFoundException) as excinfo: + await service.get_researcher_detail(INSTITUTION, "A5113304257") + + assert isinstance(excinfo.value, ResearcherDataUnavailableException) + assert excinfo.value.reason == ResearcherUnavailableReason.UNKNOWN_AUTHOR + + +def test_unavailable_researcher_maps_to_a_structured_404(): + """The specific handler must win over the generic NotFoundException one.""" + from starlette.applications import Starlette + from starlette.requests import Request + from starlette.routing import Route + from starlette.testclient import TestClient + + from inse.main import handle_not_found, handle_researcher_unavailable + + async def boom(request: Request): + raise ResearcherDataUnavailableException( + "No multiplicator data.", + reason=ResearcherUnavailableReason.OTHER_INSTITUTION, + author_id="A5113304257", + display_name="Test Person", + author_institution="TU Berlin", + ) + + app = Starlette(routes=[Route("/boom", boom)]) + app.add_exception_handler(NotFoundException, handle_not_found) + app.add_exception_handler( + ResearcherDataUnavailableException, handle_researcher_unavailable + ) + + response = TestClient(app).get("/boom") + + assert response.status_code == 404 + assert response.json() == { + "message": "No multiplicator data.", + "reason": "OTHER_INSTITUTION", + "author_id": "A5113304257", + "display_name": "Test Person", + "author_institution": "TU Berlin", + } + + def _network_source() -> dict: return { "institution_id": INSTITUTION, @@ -764,13 +940,23 @@ async def test_founder_statistics_ratio_is_none_when_cohort_share_is_zero(): @pytest.mark.anyio -async def test_founder_statistics_raises_not_found_when_no_documents(): +async def test_founder_statistics_returns_an_empty_payload_for_unindexed_university(): + """A university without data gets 200 + document_count=0, not a 404.""" with patch( "inse.multiplicators.service.elasticsearch.search", new=AsyncMock(return_value={"hits": {"hits": [], "total": {"value": 0}}}), ): - with pytest.raises(NotFoundException): - await service.get_founder_statistics(INSTITUTION) + stats = await service.get_founder_statistics("TU9") + + assert stats.provenance.institution_id == "TU9" + assert stats.provenance.document_count == 0 + assert stats.overall.career_bucket == "ALL" + assert stats.overall.total == 0 + assert stats.career_stages == [] + assert stats.research_areas == [] + assert [stage.count for stage in stats.funnel] == [0, 0, 0, 0, 0] + assert {a.tag for a in stats.archetypes} == set(MultiplierTag) + assert all(a.tagged_in_population == 0 for a in stats.archetypes) @pytest.mark.anyio -- 2.56.1 From 0bab32de74a166dbd035b5a6a4c38065ee8bd83f Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 4 Nov 2026 21:48:12 +0100 Subject: [PATCH 6/7] fix: resolving issue --- webapp/src/app/app.routes.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 702320d6..aaa7467f 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -3,8 +3,7 @@ import { guestOnlyGuard } from './shared/guards/guest-only.guard'; import { personListResolver } from './resolvers/person-list.resolver'; import { founderStatisticsResolver } from './resolvers/founder-statistics.resolver'; import { founderCandidatesResolver } from './resolvers/founder-candidates.resolver'; -import { multiplierResearcherResolver } from './resolvers/multiplier-researcher.resolver'; -import { multiplierResearcherNetworkResolver } from './resolvers/multiplier-researcher-network.resolver'; +import { multiplierResearcherPageResolver } from './resolvers/multiplier-researcher-page.resolver'; import { personBioResolver } from './resolvers/person-bio.resolver'; import { personPatentsResolver } from './resolvers/person-patents.resolver'; import { personResolver } from './resolvers/person.resolver'; @@ -158,12 +157,7 @@ export const routes: Routes = [ statistics: founderStatisticsResolver, candidates: founderCandidatesResolver, }, - runGuardsAndResolvers: (from, to) => { - const keys = ['threshold', 'screened', 'page', 'size', 'sortBy', 'sortOrder']; - return keys.some( - (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), - ); - }, + runGuardsAndResolvers: 'paramsOrQueryParamsChange', }, { path: 'founders/:authorId', @@ -180,8 +174,7 @@ export const routes: Routes = [ './modules/founder-potential/researcher-network/researcher-network.component' ).then((mod) => mod.ResearcherNetworkComponent), resolve: { - researcher: multiplierResearcherResolver, - network: multiplierResearcherNetworkResolver, + page: multiplierResearcherPageResolver, }, runGuardsAndResolvers: (from, to) => from.params['authorId'] !== to.params['authorId'], -- 2.56.1 From ec1d891d8db60e8acf712a2ce6b27371cc19a61c Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 4 Nov 2026 21:48:22 +0100 Subject: [PATCH 7/7] regenerated models and services --- webapp/src/app/api/.openapi-generator/FILES | 7 ++++ webapp/src/app/api/api/api.ts | 28 +--------------- webapp/src/app/api/api/orgminer.service.ts | 8 ++--- .../src/app/api/model/authorTopicProfile.ts | 10 +----- webapp/src/app/api/model/egoNetworkNode.ts | 32 +++++++++---------- webapp/src/app/api/model/models.ts | 13 ++++++++ .../founder-potential.utils.ts | 30 +++++++++++++++-- 7 files changed, 68 insertions(+), 60 deletions(-) diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index 889a86cb..26cb2bb5 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -83,6 +83,7 @@ model/bundProjectTopics.ts model/careerBucket.ts model/careerMetrics.ts model/careerStage.ts +model/careerStageStatistics.ts model/category.ts model/categoryBucket.ts model/classifiedPage.ts @@ -293,6 +294,12 @@ model/rankingResponse.ts model/rankingWeights.ts model/rebuildResponse.ts model/registryHealth.ts +model/researchAreaStatistics.ts +model/researcherDetail.ts +model/researcherMetrics.ts +model/researcherSortBy.ts +model/researcherSummary.ts +model/researcherSummaryPage.ts model/saveHierarchyResponse.ts model/score.ts model/selectedAuthorsRequest.ts diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index b9bc071b..372e35e6 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -50,30 +50,4 @@ export * from './works.service'; import { WorksService } from './works.service'; export * from './worksV2.service'; import { WorksV2Service } from './worksV2.service'; -export const APIS = [ - AuthService, - AuthorsV2Service, - BUNDInstitutionsService, - BackgroundJobsService, - BookmarksService, - CompanyConnectionsService, - DFGInstitutionsService, - DFGPersonsService, - DashboardService, - FundingService, - InstitutionsService, - InstitutionsV2Service, - KeywordsService, - NewsService, - OrganizationService, - OrgminerService, - PatentsService, - PersonsService, - ProjectsService, - RankingService, - TopicsService, - TopicsV2Service, - UniversityRankingsService, - WorksService, - WorksV2Service, -]; +export const APIS = [AuthService, AuthorsV2Service, BUNDInstitutionsService, BackgroundJobsService, BookmarksService, CompanyConnectionsService, DFGInstitutionsService, DFGPersonsService, DashboardService, FundingService, InstitutionsService, InstitutionsV2Service, KeywordsService, MultiplicatorsService, NewsService, OrganizationService, OrgminerService, PatentsService, PersonsService, ProjectsService, RankingService, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service]; diff --git a/webapp/src/app/api/api/orgminer.service.ts b/webapp/src/app/api/api/orgminer.service.ts index 3328a54b..0c334726 100644 --- a/webapp/src/app/api/api/orgminer.service.ts +++ b/webapp/src/app/api/api/orgminer.service.ts @@ -2251,8 +2251,8 @@ export class OrgminerService extends BaseService { } /** - * Submits a suggestion or, for managers, updates the active hierarchy. - * Users submit suggestions (max. 3 per account and day); managers update the active hierarchy. + * Creates or updates a hierarchy suggestion. + * Admins can create one suggestion and update it until it is reviewed. * @endpoint post /api/orgminer/save-hierarchy * @param requestBody * @param secureFgpAcc @@ -2379,8 +2379,8 @@ export class OrgminerService extends BaseService { } /** - * Submits a suggestion or, for managers, updates the active hierarchy. - * Users submit suggestions (max. 3 per account and day); managers update the active hierarchy. + * Creates or updates a hierarchy suggestion. + * Admins can create one suggestion and update it until it is reviewed. * @endpoint post /api/orgminer/save-hierarchy * @param requestBody * @param secureFgpAcc diff --git a/webapp/src/app/api/model/authorTopicProfile.ts b/webapp/src/app/api/model/authorTopicProfile.ts index 075bc8ec..8c7aa8c7 100644 --- a/webapp/src/app/api/model/authorTopicProfile.ts +++ b/webapp/src/app/api/model/authorTopicProfile.ts @@ -20,17 +20,9 @@ export interface AuthorTopicProfile { */ display_name: string; /** - * All works of the author in the timespan, regardless of the topic filter. + * All works of the author in the timespan. */ works_total: number; - /** - * Works matching the topic filter (same subset as Section 1). - */ - matched_works: number; - /** - * Matched works where one of the searched topics is the work\'s primary topic. - */ - primary_topic_matches: number; /** * Number of distinct primary topics across all works. */ diff --git a/webapp/src/app/api/model/egoNetworkNode.ts b/webapp/src/app/api/model/egoNetworkNode.ts index b92d88eb..b674afcd 100644 --- a/webapp/src/app/api/model/egoNetworkNode.ts +++ b/webapp/src/app/api/model/egoNetworkNode.ts @@ -1,30 +1,28 @@ /** * 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. */ - /** * One person in an ego network. No layout coordinates - the client lays out. */ -export interface EgoNetworkNode { - /** - * OpenAlex author id, short form. - */ - id: string; - name?: string | null; - /** - * One of: ego, mentee, cohort, industry, external. Typed as a string rather than an enum because the index is rebuilt independently of this API. - */ - role: string; - inst?: string | null; - active_years?: number; - suspicious?: boolean; - company_insts?: Array | null; +export interface EgoNetworkNode { + /** + * OpenAlex author id, short form. + */ + id: string; + name?: string | null; + /** + * One of: ego, mentee, cohort, industry, external. `industry` is ego-relative: the person holds a company affiliation on a work shared with the ego (see `company_insts`). Typed as a string rather than an enum because the index is rebuilt independently of this API. + */ + role: string; + inst?: string | null; + active_years?: number; + suspicious?: boolean; + company_insts?: Array | null; } - diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index 6b82c245..115b7196 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -48,6 +48,10 @@ export * from './careerBucket'; export * from './careerMetrics'; export * from './careerStage'; export * from './careerStageStatistics'; +export * from './category'; +export * from './categoryBucket'; +export * from './classifiedPage'; +export * from './classifiedPageResponse'; export * from './collaborationGraph'; export * from './collaborationGraphStatus'; export * from './collaborationGraphStatusResponse'; @@ -163,6 +167,9 @@ export * from './hEUReportSummary'; export * from './hEUTopic'; export * from './hEUWebLink'; export * from './hTTPValidationError'; +export * from './hierarchyNode'; +export * from './hierarchyResponse'; +export * from './hierarchySuggestion'; export * from './idTokenMetadata'; export * from './inseAccountManagementModelOrganizationProfile'; export * from './inseOrganizationManagementModelOrganizationProfile'; @@ -220,6 +227,11 @@ export * from './openAlexTopicTag'; export * from './orgPatentEntry'; export * from './orgPatentsResponse'; export * from './organizationPage'; +export * from './orgminerContent'; +export * from './orgminerKeyword'; +export * from './orgminerNews'; +export * from './orgminerProject'; +export * from './orgminerStaff'; export * from './otkResponse'; export * from './patentEntry'; export * from './patentsByAuthorResponse'; @@ -251,6 +263,7 @@ export * from './researcherMetrics'; export * from './researcherSortBy'; export * from './researcherSummary'; export * from './researcherSummaryPage'; +export * from './saveHierarchyResponse'; export * from './score'; export * from './selectedAuthorsRequest'; export * from './showcase'; diff --git a/webapp/src/app/modules/founder-potential/founder-potential.utils.ts b/webapp/src/app/modules/founder-potential/founder-potential.utils.ts index 07723f14..521e30de 100644 --- a/webapp/src/app/modules/founder-potential/founder-potential.utils.ts +++ b/webapp/src/app/modules/founder-potential/founder-potential.utils.ts @@ -1,12 +1,36 @@ import { ResearcherMetrics } from '../../api'; -/** German labels for multiplier archetype tags. */ +/** + * Multiplier archetype labels. These stay in English on purpose: Bridger, + * Mentor and Amplifier are the model's own role names and are not translated. + */ export const TAG_LABELS: Record = { - bridger: 'Brückenbauer', + bridger: 'Bridger', mentor: 'Mentor', - amplifier: 'Verstärker', + amplifier: 'Amplifier', }; +/** What each multiplier archetype means, shown as a tooltip. */ +export const TAG_DESCRIPTIONS: Record = { + bridger: + 'Bridger: verbindet Personengruppen, die sonst nicht zusammenarbeiten würden. ' + + 'Hohe Brokerage zwischen ansonsten getrennten Koautor:innen-Netzen.', + mentor: + 'Mentor: führt Nachwuchsforschende als Erstautor:innen in gemeinsame ' + + 'Publikationen und fördert deren weitere Laufbahn.', + amplifier: + 'Amplifier: trägt Wissen nach außen – über Patente, ' + + 'Industriekollaborationen, Medienresonanz und EU-Projekte.', +}; + +export function tagLabel(tag: string): string { + return TAG_LABELS[tag] ?? tag; +} + +export function tagDescription(tag: string): string { + return TAG_DESCRIPTIONS[tag] ?? TAG_LABELS[tag] ?? tag; +} + /** German labels for the data-quality screen reasons. */ export const SCREEN_REASON_LABELS: Record = { MERGED_PROFILE: 'Zusammengeführtes Profil', -- 2.56.1