From 5e49e751608b25bc37a0d403c42d219eed5fd1cc Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Tue, 9 Jun 2026 17:47:43 +0200 Subject: [PATCH 01/97] remove terminal prefix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8fa30c4c..0c7c8707 100644 --- a/README.md +++ b/README.md @@ -173,5 +173,5 @@ npm install ```shell cp .githooks/pre-commit .git/hooks/pre-commit -(base) stischer@Stevens-MacBook-Pro smartguide % chmod +x .git/hooks/pre-commit +chmod +x .git/hooks/pre-commit ``` From e9d931fe74b5e01f45d6d1e8386a26f251a5fca4 Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 9 Jun 2026 18:20:11 +0200 Subject: [PATCH 02/97] UI adjusted --- .../person-list/person-list.component.scss | 4 +-- .../app-searchbar.component.html | 1 + webapp/src/styles.scss | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/webapp/src/app/modules/person-list/person-list.component.scss b/webapp/src/app/modules/person-list/person-list.component.scss index a605117a..5b958d69 100644 --- a/webapp/src/app/modules/person-list/person-list.component.scss +++ b/webapp/src/app/modules/person-list/person-list.component.scss @@ -6,10 +6,10 @@ .layout-container { display: grid; - grid-template-columns: 1fr 280px; + grid-template-columns: 1fr 360px; gap: 24px; align-items: start; - max-width: 1200px; + max-width: 1400px; margin: 0 auto; } diff --git a/webapp/src/app/shared/ui/app-searchbar/app-searchbar.component.html b/webapp/src/app/shared/ui/app-searchbar/app-searchbar.component.html index 145c976a..cc3cefd5 100644 --- a/webapp/src/app/shared/ui/app-searchbar/app-searchbar.component.html +++ b/webapp/src/app/shared/ui/app-searchbar/app-searchbar.component.html @@ -16,6 +16,7 @@ @for (person of filteredPersons.results; track person.id) { + person {{ person.display_name }} } diff --git a/webapp/src/styles.scss b/webapp/src/styles.scss index 0a3a5f8d..7bc24191 100644 --- a/webapp/src/styles.scss +++ b/webapp/src/styles.scss @@ -190,4 +190,29 @@ h3 { @keyframes sk-shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } +} + +.cdk-overlay-pane { + color: var(--sg-text); +} + +.cdk-overlay-pane .mat-mdc-option { + padding: 0 18px; + font-size: 13px; + background: var(--sg-surface-muted); + border-bottom: 1px solid var(--sg-border); +} + +.cdk-overlay-pane .mat-mdc-option:last-child { + border-bottom: none; +} + +.cdk-overlay-pane .mat-mdc-option mat-icon { + margin-right: 12px; + color: var(--sg-text-soft); +} + +.cdk-overlay-pane .mat-mdc-option:hover, +.cdk-overlay-pane .mat-mdc-option.mdc-list-item--focused { + background: rgba(0, 0, 0, 0.04); } \ No newline at end of file From bc99b6deb84e100b18b37ec31618ebb89f5965d7 Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 9 Jun 2026 18:21:16 +0200 Subject: [PATCH 03/97] moved sorting logic to backend --- service/src/main/inse/persons/logic.py | 32 ++------ service/src/main/inse/persons/service.py | 8 ++ webapp/src/app/api/api/persons.service.ts | 28 +++++-- .../app/api/api/persons.serviceInterface.ts | 8 +- webapp/src/app/app.routes.ts | 2 + .../person-list/person-list.component.html | 17 ++-- .../person-list/person-list.component.ts | 82 ++++++++++++++----- .../src/app/resolvers/person-list.resolver.ts | 4 + 8 files changed, 117 insertions(+), 64 deletions(-) diff --git a/service/src/main/inse/persons/logic.py b/service/src/main/inse/persons/logic.py index a4dc5c0f..199548fa 100644 --- a/service/src/main/inse/persons/logic.py +++ b/service/src/main/inse/persons/logic.py @@ -19,7 +19,7 @@ from inse.models.authors_list_response import AuthorsListResponse from inse import util from inse.integrations import elasticsearch from inse.models.meta import Meta -from inse.persons.query_builder import build_authors_search +from inse.persons.query_builder import build_authors_search, build_authors_search_rescored from inse.persons.model import CustomAuthor, CustomAuthorsListResponse, PersonSearchRequest logger = logging.getLogger(__name__) INDEX_NAME="openalex-authors" @@ -122,30 +122,6 @@ def get_person_by_id(author_id: str, include: Optional[str] = None) -> AuthorsLi return AuthorsListResponse(results=persons) - -def get_person_by_id(author_id: str, include: Optional[str] = None) -> AuthorsListResponse: - body = { - "_source":include.split(",") if include else True, - } - - try: - hit = elasticsearch.get( - index="openalex-authors", - body=body, - doc_id=author_id - ) - except NotFoundError: - raise HTTPException( - status_code=404, detail=f"Person with id {author_id} not found" - ) - - except ApiError as e: - raise HTTPException(status_code=500, detail=f"Elasticsearch error: {str(e)}") - persons = [util.get_persons_data(hit)] - - return AuthorsListResponse(results=persons) - - def search_persons_by_name( author_name: str, limit: Optional[int] = 10, page_offset: Optional[int] = 0, include: Optional[str] = None ) -> AuthorsListResponse: @@ -358,6 +334,8 @@ def _enrich_author_data(author_data) -> Optional[CustomAuthor]: def advanced_search_persons( query: Optional[str] = None, institution_name: Optional[str] = None, + sort_by: Optional[str] = None, + sort_order: Optional[str] = None, topics: Optional[List[str]] = None, page: int = 1, page_size: int = 10, @@ -367,9 +345,11 @@ def advanced_search_persons( filter_year: Optional[int] = None, ) -> CustomAuthorsListResponse: try: - query_body = build_authors_search( + query_body = build_authors_search_rescored( query=query, institution_name=institution_name, + sort_by=sort_by, + sort_order=sort_order, topics=topics, page=page, page_size=page_size, diff --git a/service/src/main/inse/persons/service.py b/service/src/main/inse/persons/service.py index c442b578..5f04bd02 100644 --- a/service/src/main/inse/persons/service.py +++ b/service/src/main/inse/persons/service.py @@ -190,6 +190,12 @@ def search_persons_list( institution_name: Annotated[ Optional[str], Query(alias="institutionName", description="Filter by institution name") ] = None, + sort_by: Annotated[ + Optional[str], Query(alias="sortBy", description="Value to sort by") + ] = None, + sort_order: Annotated[ + Optional[str], Query(alias="sortOrder", description="asc or desc?") + ] = None, topic: Annotated[ Optional[List[str]], Query(description="Filter by topic display names") ] = None, @@ -224,6 +230,8 @@ def search_persons_list( return logic.advanced_search_persons( query=query, institution_name=institution_name, + sort_by=sort_by, + sort_order=sort_order, topics=topic, page=page, page_size=page_size, diff --git a/webapp/src/app/api/api/persons.service.ts b/webapp/src/app/api/api/persons.service.ts index b93da20a..7efacfa9 100644 --- a/webapp/src/app/api/api/persons.service.ts +++ b/webapp/src/app/api/api/persons.service.ts @@ -723,6 +723,8 @@ export class PersonsService extends BaseService implements PersonsServiceInterfa * @endpoint get /api/inse-service/persons/search-list * @param query Search query (e.g., Arman AND Arzani) * @param institutionName Filter by institution name + * @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 @@ -733,16 +735,20 @@ export class PersonsService extends BaseService implements PersonsServiceInterfa * @param observe set whether or not to return 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, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public searchPersonsList(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsList(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: 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, institutionName, 'institutionName'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); if (topic) { topic.forEach((element) => { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, @@ -808,6 +814,8 @@ export class PersonsService extends BaseService implements PersonsServiceInterfa * @endpoint get /api/inse-service/persons/search-list * @param query Search query (e.g., Arman AND Arzani) * @param institutionName Filter by institution name + * @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 @@ -818,16 +826,20 @@ export class PersonsService extends BaseService implements PersonsServiceInterfa * @param observe set whether or not to return 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_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public searchPersonsList_5(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsList_5(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList_5(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList_5(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: 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, institutionName, 'institutionName'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); if (topic) { topic.forEach((element) => { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, diff --git a/webapp/src/app/api/api/persons.serviceInterface.ts b/webapp/src/app/api/api/persons.serviceInterface.ts index 0c634b4d..2b68be3a 100644 --- a/webapp/src/app/api/api/persons.serviceInterface.ts +++ b/webapp/src/app/api/api/persons.serviceInterface.ts @@ -130,6 +130,8 @@ export interface PersonsServiceInterface { * @endpoint get /api/inse-service/persons/search-list * @param query Search query (e.g., Arman AND Arzani) * @param institutionName Filter by institution name + * @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 @@ -138,7 +140,7 @@ export interface PersonsServiceInterface { * @param filterMode Filter mode: \'in\' or \'from\' * @param filterYear Filter year */ - searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, extraHttpRequestParams?: any): Observable; + searchPersonsList(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, extraHttpRequestParams?: any): Observable; /** * Searches for persons with advanced filters (Topic & Institution) and pagination. @@ -146,6 +148,8 @@ export interface PersonsServiceInterface { * @endpoint get /api/inse-service/persons/search-list * @param query Search query (e.g., Arman AND Arzani) * @param institutionName Filter by institution name + * @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 @@ -154,6 +158,6 @@ export interface PersonsServiceInterface { * @param filterMode Filter mode: \'in\' or \'from\' * @param filterYear Filter year */ - searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, extraHttpRequestParams?: any): Observable; + searchPersonsList_5(query?: string, institutionName?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, extraHttpRequestParams?: any): Observable; } diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 19a5df19..f3912e15 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -35,6 +35,8 @@ export const routes: Routes = [ 'page', 'pageSize', 'institutionName', + 'sortBy', + 'sortOrder', 'yearFilterEnabled', 'filterMode', 'filterYear', diff --git a/webapp/src/app/modules/person-list/person-list.component.html b/webapp/src/app/modules/person-list/person-list.component.html index 789862a8..e34d6123 100644 --- a/webapp/src/app/modules/person-list/person-list.component.html +++ b/webapp/src/app/modules/person-list/person-list.component.html @@ -50,10 +50,15 @@
Sortierung:
- + + + + + +
@@ -66,9 +71,9 @@ Sortiert nach Publikationen und Zitierungen--> - @if (sortedPersons.length) { + @if (getPersons().length) {
- @for (person of sortedPersons; track person.id) { + @for (person of getPersons(); track person.id) { diff --git a/webapp/src/app/modules/person-list/person-list.component.ts b/webapp/src/app/modules/person-list/person-list.component.ts index b1afc0f0..1cee49fc 100644 --- a/webapp/src/app/modules/person-list/person-list.component.ts +++ b/webapp/src/app/modules/person-list/person-list.component.ts @@ -12,14 +12,30 @@ import { MatButtonModule } from '@angular/material/button'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatRadioModule } from '@angular/material/radio'; -import { CustomAuthor, DehydratedInstitution, PersonsService, InstitutionsService } from '../../api'; +import { + CustomAuthor, + DehydratedInstitution, + PersonsService, + InstitutionsService, +} from '../../api'; import { TopicsService } from '../../api/api/topics.service'; import { TopicHierarchyComponent } from '../topic-hierarchy/topic-hierarchy.component'; import { PersonCardComponent } from '../person-card/person-card.component'; import { SharedStateService } from '../../shared/services/shared-state.service'; import { PaginationService } from '../../shared/services/pagination.service'; -import { finalize, debounceTime, distinctUntilChanged, switchMap, map, of, catchError } from 'rxjs'; -import { MatAutocompleteModule, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; +import { + finalize, + debounceTime, + distinctUntilChanged, + switchMap, + map, + of, + catchError, +} from 'rxjs'; +import { + MatAutocompleteModule, + MatAutocompleteSelectedEvent, +} from '@angular/material/autocomplete'; import { MatSnackBar } from '@angular/material/snack-bar'; import { SkTextDirective } from '../../custom-directives/sk-text.directive'; import { @@ -71,6 +87,8 @@ export class PersonListComponent { readonly institutionOptions = signal([]); readonly institutionLookupLoading = signal(false); + defaultOrderValue = 'desc'; + // Selected filter states selectedTopics = new Set(); searchValue = signal(null); @@ -82,7 +100,13 @@ export class PersonListComponent { appliedFilterYear = new Date().getFullYear() - 1; // Forms - sortControl = new FormControl('works', { nonNullable: true }); + sortValueControl = new FormControl(null, { + nonNullable: true, + }); + sortOrderControl = new FormControl( + { value: this.defaultOrderValue, disabled: this.isRelevanceSelected() }, + { nonNullable: true }, + ); topicSearchControl = new FormControl('', { nonNullable: true }); institutionControl = new FormControl('', { nonNullable: true }); yearFilterEnabledControl = new FormControl(false, { nonNullable: true }); @@ -138,6 +162,8 @@ export class PersonListComponent { ? Number.parseInt(params['pageSize'], 10) : 10; const institutionName = params['institutionName'] || ''; + const sortBy = params['sortBy'] || null + const sortOrder = params['sortOrder'] || this.defaultOrderValue; const yearFilterEnabled = params['yearFilterEnabled'] === 'true'; const filterMode = params['filterMode'] === 'in' || params['filterMode'] === 'from' @@ -149,16 +175,21 @@ export class PersonListComponent { const topics = this.parseQueryParamArray(params['topic']); + // restore values from query params this.selectedTopics = new Set(topics); this.currentPage = page; this.paginationService.selection = pageSize; + this.sortValueControl.setValue(sortBy); + this.sortOrderControl.setValue(sortOrder); // Sync search box & institution input if (this.searchValue() !== query) { this.searchValue.set(query || null); } if (this.institutionControl.value !== institutionName) { - this.institutionControl.setValue(institutionName, { emitEvent: false }); + this.institutionControl.setValue(institutionName, { + emitEvent: false, + }); this.updateYearFilterState(institutionName); } if (this.yearFilterEnabledControl.value !== yearFilterEnabled) { @@ -186,20 +217,24 @@ export class PersonListComponent { this.total = persons.meta?.count; this.loadingState.set(false); }); + // listen for sorting selectors changes + this.sortValueControl.valueChanges.subscribe((value) => { + if (!value) { + this.sortOrderControl.setValue(this.defaultOrderValue) + this.sortOrderControl.disable(); + } else { + this.sortOrderControl.enable(); + } + this.applySidebarFilters(); + }); + this.sortOrderControl.valueChanges.subscribe(() => { + this.applySidebarFilters(); + }); } // Getters for filtered results - get sortedPersons(): CustomAuthor[] { - const sorted = [...this.persons]; - const val = this.sortControl.value; - if (val === 'works') { - return sorted.sort((a, b) => (b.works_count ?? 0) - (a.works_count ?? 0)); - } else if (val === 'citations') { - return sorted.sort( - (a, b) => (b.cited_by_count ?? 0) - (a.cited_by_count ?? 0), - ); - } - return sorted; + getPersons(): CustomAuthor[] { + return this.persons; } get loading(): boolean { @@ -211,6 +246,10 @@ export class PersonListComponent { return this.selectedTopics.has(topic); } + isRelevanceSelected(): boolean { + return !this.sortValueControl.value; + } + toggleTopic(topic: string): void { if (this.selectedTopics.has(topic)) { this.selectedTopics.delete(topic); @@ -280,6 +319,8 @@ export class PersonListComponent { ? Array.from(this.selectedTopics) : null, institutionName: this.institutionControl.value || null, + sortBy: this.sortValueControl.value || null, + sortOrder: this.sortOrderControl.value || null, yearFilterEnabled: this.institutionControl.value && this.yearFilterEnabledControl.value ? 'true' @@ -317,8 +358,6 @@ export class PersonListComponent { return `${start}-${end} von ${this.total} Personen`; } - - // Bookmarks toggleBookmark(person: CustomAuthor): void { if (!person.id) return; @@ -353,12 +392,10 @@ export class PersonListComponent { this.searchValue.set(null); this.router.navigate([], { queryParams: { query: null, page: 1 }, - queryParamsHandling:"merge", + queryParamsHandling: 'merge', }); } - - private setupInstitutionAutocomplete(): void { this.institutionControl.valueChanges .pipe( @@ -386,7 +423,8 @@ export class PersonListComponent { } private searchInstitutions(query: string) { - return this.institutionsService.autocompleteInstitutions(query, undefined, undefined, 10) + return this.institutionsService + .autocompleteInstitutions(query, undefined, undefined, 10) .pipe(map((response) => response.results ?? [])); } diff --git a/webapp/src/app/resolvers/person-list.resolver.ts b/webapp/src/app/resolvers/person-list.resolver.ts index a5503d67..dcf8994e 100644 --- a/webapp/src/app/resolvers/person-list.resolver.ts +++ b/webapp/src/app/resolvers/person-list.resolver.ts @@ -26,6 +26,8 @@ export const personListResolver: ResolveFn = ( : 10; const institutionName = params.get('institutionName') || undefined; + const sortBy= params.get('sortBy') || undefined; + const sortOrder= params.get('sortOrder') || undefined; const topicsParam = params.getAll('topic'); @@ -47,6 +49,8 @@ export const personListResolver: ResolveFn = ( return personsService.searchPersonsList( query, institutionName, + sortBy, + sortOrder, topics, page, pageSize, From f0a83635364aee51e4497402f4fceae5af210a4b Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 9 Jun 2026 18:23:59 +0200 Subject: [PATCH 04/97] added relevancy rescoring for persons search based on publications, citations, h_index, mean_citations and name quality --- .../src/main/inse/persons/query_builder.py | 331 +++++++++++++++++- 1 file changed, 324 insertions(+), 7 deletions(-) diff --git a/service/src/main/inse/persons/query_builder.py b/service/src/main/inse/persons/query_builder.py index 279bfb98..f4f52a5c 100644 --- a/service/src/main/inse/persons/query_builder.py +++ b/service/src/main/inse/persons/query_builder.py @@ -1,11 +1,13 @@ # -*- coding: utf-8 -*- from typing import List, Optional, Set, Any - +import json def build_authors_search( using: Any = None, index: Optional[str] = None, query: Optional[str] = None, institution_name: Optional[str] = None, + sort_by: Optional[str] = None, + sort_order: Optional[str] = None, topics: Optional[List[str]] = None, page: int = 1, page_size: int = 10, @@ -13,7 +15,7 @@ def build_authors_search( strict: Optional[bool] = False, track_total_hits: Optional[bool] = False, filter_mode: Optional[str] = "from", - filter_year: Optional[int] = None + filter_year: Optional[int] = None, ) -> dict: """ Builds an Elasticsearch search request query body for authors as a dictionary. @@ -167,7 +169,7 @@ def build_authors_search( ] } }) - + if topics: for t in topics: if t: @@ -220,11 +222,326 @@ def build_authors_search( body["track_total_hits"] = track_total_hits # 5. Sorting - if not query: + if sort_by and sort_order: body["sort"] = [ - {"cited_by_count": {"order": "desc"}}, - {"works_count": {"order": "desc"}} + {sort_by: {"order": sort_order}}, + ] + return body + + +def build_authors_search_rescored( + using: Any = None, + index: Optional[str] = None, + query: Optional[str] = None, + institution_name: Optional[str] = None, + sort_by: Optional[str] = None, + sort_order: Optional[str] = None, + topics: Optional[List[str]] = None, + page: int = 1, + page_size: int = 10, + include: Optional[Set[str]] = None, + strict: Optional[bool] = False, + track_total_hits: Optional[bool] = False, + filter_mode: Optional[str] = "from", + filter_year: Optional[int] = None, + name_quality_boost = True, + h_index_boost = True, + citations_boost =True, + works_boost = True, + _2yr_mean_citedness_boost = True, +) -> dict: + """ + Builds an Elasticsearch search request query body for authors as a dictionary. + """ + # 1. Build Query Clauses + query_clause = None + if query: + query_clause = { + "bool": { + "should": [ + { + "match_phrase": { + "display_name": { + "query": query, + "boost": 5 + } + } + }, + { + "match_phrase_prefix": { + "display_name": { + "query": query, + "boost": 3 + } + } + }, + { + "match": { + "display_name": { + "query": query, + "fuzziness": 1 + } + } + } + ], + "minimum_should_match": 1 + } + } + + # 2. Build Filters + filter_clauses = [] + + # Filter against false entries (nested ((Works > 2 AND Year > 2020) OR has last_known_institution)) + filter_clauses.append({ + "bool": { + "should": [ + { + "bool": { + "filter": [ + { + "range": { "works_count": { "gt": 2 } } + }, + { + "nested": { + "path": "counts_by_year", + "query": { + "range": { "counts_by_year.year": { "gt": 2020 } } # hardcoded for now + } + } + } + ] + } + }, + { + "nested": { + "path": "last_known_institutions", + "query": { + "exists": { + "field": "last_known_institutions.id" + } + } + } + } + + ], + "minimum_should_match": 1 + } + }) + # Institution filter with optional year-based filtering + if institution_name: + if filter_year is not None: + target_year = filter_year + mode = filter_mode or "from" + else: + from datetime import datetime + current_year = datetime.now().year + target_year = current_year - 1 + mode = "from" + + range_query = {"gte": target_year} + if mode == "in": + range_query["lte"] = target_year + + if strict: + filter_clauses.append({ + "nested": { + "path": "affiliations", + "query": { + "bool": { + "filter": [ + { + "match_phrase": { + "affiliations.institution.display_name": institution_name + } + }, + { + "range": { + "affiliations.years": range_query + } + } + ] + } + } + } + }) + else: + filter_clauses.append({ + "bool": { + "filter": [ + { + "nested": { + "path": "last_known_institutions", + "query": { + "match_phrase": { + "last_known_institutions.display_name": institution_name + } + } + } + }, + { + "nested": { + "path": "affiliations", + "query": { + "bool": { + "filter": [ + { + "match_phrase": { + "affiliations.institution.display_name": institution_name + } + }, + { + "range": { + "affiliations.years": range_query + } + } + ] + } + } + } + } + ] + } + }) + + if topics: + for t in topics: + if t: + filter_clauses.append({ + "nested": { + "path": "topics", + "query": { + "match_phrase": { + "topics.display_name": t + } + } + } + }) + functions = [] + if not sort_by: + + if (name_quality_boost): # Name quality boost, boost names which are not "Value Value" + name_boost_query={ + "script_score": { + "script": { + "lang": "painless", + "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;" + } + } + } + functions.append(name_boost_query) + if (h_index_boost): # h_index boost + h_index_boost_query={ + "script_score": { + "script": { + "lang": "painless", + "source": "if (!doc.containsKey('summary_stats.h_index') || doc['summary_stats.h_index'].empty) return 1.0;double h = doc['summary_stats.h_index'].value;return 1.0 + Math.log1p(h) / 5.0;" + } + } + } + functions.append(h_index_boost_query) + if (citations_boost): # cited_by_count boost + cited_by_count_boost_query = { + "script_score": { + "script": { + "lang": "painless", + "source": "if (!doc.containsKey('cited_by_count') || doc['cited_by_count'].empty) return 1.0;double citations = doc['cited_by_count'].value;return 1.0 + Math.log1p(citations) / 10.0;" + } + } + } + functions.append(cited_by_count_boost_query) + + if (_2yr_mean_citedness_boost): # 2yr mean citedness boost + mean_citedness_boost_query = { + "script_score": { + "script": { + "lang": "painless", + "source": "if (!doc.containsKey('summary_stats.2yr_mean_citedness') || doc['summary_stats.2yr_mean_citedness'].empty) return 1.0;double recent = doc['summary_stats.2yr_mean_citedness'].value;return 1.0 + Math.log1p(recent) / 8.0;" + } + } + } + functions.append(mean_citedness_boost_query) + + if (works_boost): # works_count boost + works_count_boost_query = { + "script_score": { + "script": { + "lang": "painless", + "source": "if (!doc.containsKey('works_count') || doc['works_count'].empty) return 1.0;double works = doc['works_count'].value;return 1.0 + Math.log1p(works) / 8.0;" + } + } + } + functions.append(works_count_boost_query) + # Combine query and filters + body = {} + + if functions: + inner_query = None + if query_clause: + if filter_clauses: + inner_query = { + "bool": { + "must": [query_clause], + "filter": filter_clauses + } + } + else: + inner_query = query_clause + else: + if filter_clauses: + inner_query = { + "bool": { + "filter": filter_clauses + } + } + else: + inner_query = {"match_all": {}} + + body["query"] = { + "function_score": { + "query": inner_query, + "functions": functions, + "score_mode": "multiply", + "boost_mode": "replace" + } + } + else: + if query_clause: + if filter_clauses: + body["query"] = { + "bool": { + "must": [query_clause], + "filter": filter_clauses + } + } + else: + body["query"] = query_clause + else: + if filter_clauses: + body["query"] = { + "bool": { + "filter": filter_clauses + } + } + else: + body["query"] = {"match_all": {}} + + # 3. Source Filtering + if include: + body["_source"] = list(include) + else: + body["_source"] = True + + # 4. Pagination + es_size = page_size + es_from = (page - 1) * page_size + body["from"] = es_from + body["size"] = es_size + body["track_total_hits"] = track_total_hits + + # 5. Sorting + if sort_by and sort_order: + body["sort"] = [ + {sort_by: {"order": sort_order}}, ] - return body From 903ee594a39942f302c6e88dc0a03777c4a8603b Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Tue, 9 Jun 2026 18:55:24 +0200 Subject: [PATCH 05/97] count primary topics via ES aggregation instead of full works --- service/src/main/inse/works/logic.py | 110 +++++++++++++++++++-------- 1 file changed, 79 insertions(+), 31 deletions(-) diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py index ddf63707..b1ec3310 100644 --- a/service/src/main/inse/works/logic.py +++ b/service/src/main/inse/works/logic.py @@ -5,6 +5,7 @@ Business logic for publication works. """ import logging +from time import time from typing import List import httpx @@ -14,6 +15,7 @@ from starlette.status import HTTP_502_BAD_GATEWAY from starlette.status import HTTP_404_NOT_FOUND from starlette.status import HTTP_503_SERVICE_UNAVAILABLE +from inse import config from inse.integrations import elasticsearch from inse.models.work import Work from inse.models.work_page import WorkPage @@ -100,34 +102,76 @@ async def get_primary_topic_counts( author_id: str, client: OpenAlexWorksSearchClient | None = None, ) -> List[TopicCount]: - works = await get_all_author_works(author_id, client=client) + topic_counts = _get_primary_topic_counts_from_es(author_id) - counts = {} + topic_ids = [item["id"] for item in topic_counts if item["id"]] + details = _get_topic_details(topic_ids) - for work in works.results or []: - primary_topic = work.primary_topic - if not primary_topic or not primary_topic.display_name: + result = [] + + for item in topic_counts: + info = details.get(item["id"], {}) + name = info.get("display_name") + if not name: continue - name = primary_topic.display_name - if name not in counts: - counts[name] = {"id": primary_topic.id, "name": name, "count": 0} - counts[name]["count"] += 1 - - items = sorted(counts.values(), key=lambda item: item["count"], reverse=True) - - topic_ids = [item["id"] for item in items if item["id"]] - descriptions = _get_topic_descriptions(topic_ids) - - return [ - TopicCount( - id=item["id"], - name=item["name"], - count=item["count"], - description=descriptions.get(item["id"]), + result.append( + TopicCount( + id=item["id"], + name=name, + count=item["count"], + description=info.get("description"), + ) ) - for item in items - ] + + return result + + +def _get_primary_topic_counts_from_es(author_id: str) -> list[dict]: + + indexed_author_id = f"https://openalex.org/{author_id.strip()}" + + body = { + "size": 0, + "query": { + "nested": { + "path": "authorships", + "query": { + "bool": { + "filter": [ + {"term": {"authorships.author.id": indexed_author_id}}, + ], + }, + }, + }, + }, + "aggs": { + "primary_topics": { + "terms": {"field": "primary_topic.id", "size": 1000}, + }, + }, + } + + try: + response = elasticsearch.search( + index=config.settings.openalex_works_search_index, + body=body, + ) + except httpx.HTTPError as exc: + logger.exception("OpenAlex primary topic aggregation request failed.") + raise HTTPException( + status_code=HTTP_502_BAD_GATEWAY, + detail="OpenAlex works search request failed.", + ) from exc + + aggregations = response.get("aggregations", {}) + buckets = aggregations.get("primary_topics", {}).get("buckets", []) + + counts = [] + for bucket in buckets: + counts.append({"id": bucket["key"], "count": bucket["doc_count"]}) + + return counts async def get_work( @@ -156,7 +200,7 @@ async def get_work( return elements[0] -def _get_topic_descriptions(topic_ids: List[str]) -> dict[str, str]: +def _get_topic_details(topic_ids: List[str]) -> dict[str, dict]: if not topic_ids: return {} @@ -164,22 +208,26 @@ def _get_topic_descriptions(topic_ids: List[str]) -> dict[str, str]: response = elasticsearch.search( index="openalex-topics", query={"terms": {"id": topic_ids}}, - source=["id", "description"], + source=["id", "display_name", "description"], size=len(topic_ids), ) except httpx.HTTPError: - logger.exception("Could not load topic descriptions from Elasticsearch.") + logger.exception("Could not load topic details from Elasticsearch.") return {} - descriptions = {} + details = {} for hit in response.get("hits", {}).get("hits", []): source = hit.get("_source", {}) topic_id = source.get("id") - description = source.get("description") - if topic_id and description: - descriptions[topic_id] = description + if not topic_id: + continue - return descriptions + details[topic_id] = { + "display_name": source.get("display_name"), + "description": source.get("description"), + } + + return details def _limit_works_by_complete_years( From aa28aa0e025304c616cb618a7f019621e20356ec Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 9 Jun 2026 19:00:11 +0200 Subject: [PATCH 06/97] sorting logic in UI fixed --- .../person-list/person-list.component.ts | 52 ++++++++++++++----- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/webapp/src/app/modules/person-list/person-list.component.ts b/webapp/src/app/modules/person-list/person-list.component.ts index 1cee49fc..24648ef7 100644 --- a/webapp/src/app/modules/person-list/person-list.component.ts +++ b/webapp/src/app/modules/person-list/person-list.component.ts @@ -162,7 +162,7 @@ export class PersonListComponent { ? Number.parseInt(params['pageSize'], 10) : 10; const institutionName = params['institutionName'] || ''; - const sortBy = params['sortBy'] || null + const sortBy = params['sortBy'] || null; const sortOrder = params['sortOrder'] || this.defaultOrderValue; const yearFilterEnabled = params['yearFilterEnabled'] === 'true'; const filterMode = @@ -179,8 +179,13 @@ export class PersonListComponent { this.selectedTopics = new Set(topics); this.currentPage = page; this.paginationService.selection = pageSize; - this.sortValueControl.setValue(sortBy); - this.sortOrderControl.setValue(sortOrder); + + if (this.sortValueControl.value !== sortBy) { + this.sortValueControl.setValue(sortBy, { emitEvent: false }); + this.sortOrderControl.setValue(sortOrder, { emitEvent: false }); + this.updateSortOrderState(this.sortValueControl.value); + } + // Sync search box & institution input if (this.searchValue() !== query) { @@ -217,21 +222,40 @@ export class PersonListComponent { this.total = persons.meta?.count; this.loadingState.set(false); }); - // listen for sorting selectors changes - this.sortValueControl.valueChanges.subscribe((value) => { - if (!value) { - this.sortOrderControl.setValue(this.defaultOrderValue) - this.sortOrderControl.disable(); - } else { - this.sortOrderControl.enable(); - } + + // listen for sorting selectors changes + this.sortValueControl.valueChanges + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe((value) => { + if (!value) { + this.sortOrderControl.setValue(this.defaultOrderValue, { + emitEvent: false, + }); + this.sortOrderControl.disable(); + } else { + this.sortOrderControl.enable(); + } + this.applySidebarFilters(); - }); - this.sortOrderControl.valueChanges.subscribe(() => { + }); + + this.sortOrderControl.valueChanges + .pipe(takeUntilDestroyed(this.destroyRef)) + .subscribe(() => { this.applySidebarFilters(); - }); + }); } + private updateSortOrderState(value: any) { + if (!value) { + this.sortOrderControl.setValue(this.defaultOrderValue, { + emitEvent: false, + }); + this.sortOrderControl.disable({ emitEvent: false }); + } else { + this.sortOrderControl.enable({ emitEvent: false }); + } + } // Getters for filtered results getPersons(): CustomAuthor[] { return this.persons; From 58156025e90f517f9edf05f16ae69a7cbac463b7 Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 9 Jun 2026 19:02:31 +0200 Subject: [PATCH 07/97] replaced old person search logic by the new rescored logic --- service/src/main/inse/persons/logic.py | 2 +- .../src/main/inse/persons/query_builder.py | 448 +++++++++--------- 2 files changed, 225 insertions(+), 225 deletions(-) diff --git a/service/src/main/inse/persons/logic.py b/service/src/main/inse/persons/logic.py index 199548fa..8b6cd643 100644 --- a/service/src/main/inse/persons/logic.py +++ b/service/src/main/inse/persons/logic.py @@ -19,7 +19,7 @@ from inse.models.authors_list_response import AuthorsListResponse from inse import util from inse.integrations import elasticsearch from inse.models.meta import Meta -from inse.persons.query_builder import build_authors_search, build_authors_search_rescored +from inse.persons.query_builder import build_authors_search_rescored from inse.persons.model import CustomAuthor, CustomAuthorsListResponse, PersonSearchRequest logger = logging.getLogger(__name__) INDEX_NAME="openalex-authors" diff --git a/service/src/main/inse/persons/query_builder.py b/service/src/main/inse/persons/query_builder.py index f4f52a5c..01bd9343 100644 --- a/service/src/main/inse/persons/query_builder.py +++ b/service/src/main/inse/persons/query_builder.py @@ -1,232 +1,232 @@ # -*- coding: utf-8 -*- from typing import List, Optional, Set, Any import json -def build_authors_search( - using: Any = None, - index: Optional[str] = None, - query: Optional[str] = None, - institution_name: Optional[str] = None, - sort_by: Optional[str] = None, - sort_order: Optional[str] = None, - topics: Optional[List[str]] = None, - page: int = 1, - page_size: int = 10, - include: Optional[Set[str]] = None, - strict: Optional[bool] = False, - track_total_hits: Optional[bool] = False, - filter_mode: Optional[str] = "from", - filter_year: Optional[int] = None, -) -> dict: - """ - Builds an Elasticsearch search request query body for authors as a dictionary. - """ - # 1. Build Query Clauses - query_clause = None - if query: - query_clause = { - "bool": { - "should": [ - { - "match_phrase": { - "display_name": { - "query": query, - "boost": 5 - } - } - }, - { - "match_phrase_prefix": { - "display_name": { - "query": query, - "boost": 3 - } - } - }, - { - "match": { - "display_name": { - "query": query, - "fuzziness": 1 - } - } - } - ], - "minimum_should_match": 1 - } - } +# def build_authors_search( +# using: Any = None, +# index: Optional[str] = None, +# query: Optional[str] = None, +# institution_name: Optional[str] = None, +# sort_by: Optional[str] = None, +# sort_order: Optional[str] = None, +# topics: Optional[List[str]] = None, +# page: int = 1, +# page_size: int = 10, +# include: Optional[Set[str]] = None, +# strict: Optional[bool] = False, +# track_total_hits: Optional[bool] = False, +# filter_mode: Optional[str] = "from", +# filter_year: Optional[int] = None, +# ) -> dict: +# """ +# Builds an Elasticsearch search request query body for authors as a dictionary. +# """ +# # 1. Build Query Clauses +# query_clause = None +# if query: +# query_clause = { +# "bool": { +# "should": [ +# { +# "match_phrase": { +# "display_name": { +# "query": query, +# "boost": 5 +# } +# } +# }, +# { +# "match_phrase_prefix": { +# "display_name": { +# "query": query, +# "boost": 3 +# } +# } +# }, +# { +# "match": { +# "display_name": { +# "query": query, +# "fuzziness": 1 +# } +# } +# } +# ], +# "minimum_should_match": 1 +# } +# } - # 2. Build Filters - filter_clauses = [] +# # 2. Build Filters +# filter_clauses = [] - # Filter against false entries (nested ((Works > 2 AND Year > 2020) OR has last_known_institution)) - filter_clauses.append({ - "bool": { - "should": [ - { - "bool": { - "filter": [ - { - "range": { "works_count": { "gt": 2 } } - }, - { - "nested": { - "path": "counts_by_year", - "query": { - "range": { "counts_by_year.year": { "gt": 2020 } } # hardcoded for now - } - } - } - ] - } - }, - { - "nested": { - "path": "last_known_institutions", - "query": { - "exists": { - "field": "last_known_institutions.id" - } - } - } - } +# # Filter against false entries (nested ((Works > 2 AND Year > 2020) OR has last_known_institution)) +# filter_clauses.append({ +# "bool": { +# "should": [ +# { +# "bool": { +# "filter": [ +# { +# "range": { "works_count": { "gt": 2 } } +# }, +# { +# "nested": { +# "path": "counts_by_year", +# "query": { +# "range": { "counts_by_year.year": { "gt": 2020 } } # hardcoded for now +# } +# } +# } +# ] +# } +# }, +# { +# "nested": { +# "path": "last_known_institutions", +# "query": { +# "exists": { +# "field": "last_known_institutions.id" +# } +# } +# } +# } - ], - "minimum_should_match": 1 - } - }) - # Institution filter with optional year-based filtering - if institution_name: - if filter_year is not None: - target_year = filter_year - mode = filter_mode or "from" - else: - from datetime import datetime - current_year = datetime.now().year - target_year = current_year - 1 - mode = "from" +# ], +# "minimum_should_match": 1 +# } +# }) +# # Institution filter with optional year-based filtering +# if institution_name: +# if filter_year is not None: +# target_year = filter_year +# mode = filter_mode or "from" +# else: +# from datetime import datetime +# current_year = datetime.now().year +# target_year = current_year - 1 +# mode = "from" - range_query = {"gte": target_year} - if mode == "in": - range_query["lte"] = target_year +# range_query = {"gte": target_year} +# if mode == "in": +# range_query["lte"] = target_year - if strict: - filter_clauses.append({ - "nested": { - "path": "affiliations", - "query": { - "bool": { - "filter": [ - { - "match_phrase": { - "affiliations.institution.display_name": institution_name - } - }, - { - "range": { - "affiliations.years": range_query - } - } - ] - } - } - } - }) - else: - filter_clauses.append({ - "bool": { - "filter": [ - { - "nested": { - "path": "last_known_institutions", - "query": { - "match_phrase": { - "last_known_institutions.display_name": institution_name - } - } - } - }, - { - "nested": { - "path": "affiliations", - "query": { - "bool": { - "filter": [ - { - "match_phrase": { - "affiliations.institution.display_name": institution_name - } - }, - { - "range": { - "affiliations.years": range_query - } - } - ] - } - } - } - } - ] - } - }) +# if strict: +# filter_clauses.append({ +# "nested": { +# "path": "affiliations", +# "query": { +# "bool": { +# "filter": [ +# { +# "match_phrase": { +# "affiliations.institution.display_name": institution_name +# } +# }, +# { +# "range": { +# "affiliations.years": range_query +# } +# } +# ] +# } +# } +# } +# }) +# else: +# filter_clauses.append({ +# "bool": { +# "filter": [ +# { +# "nested": { +# "path": "last_known_institutions", +# "query": { +# "match_phrase": { +# "last_known_institutions.display_name": institution_name +# } +# } +# } +# }, +# { +# "nested": { +# "path": "affiliations", +# "query": { +# "bool": { +# "filter": [ +# { +# "match_phrase": { +# "affiliations.institution.display_name": institution_name +# } +# }, +# { +# "range": { +# "affiliations.years": range_query +# } +# } +# ] +# } +# } +# } +# } +# ] +# } +# }) - if topics: - for t in topics: - if t: - filter_clauses.append({ - "nested": { - "path": "topics", - "query": { - "match_phrase": { - "topics.display_name": t - } - } - } - }) +# if topics: +# for t in topics: +# if t: +# filter_clauses.append({ +# "nested": { +# "path": "topics", +# "query": { +# "match_phrase": { +# "topics.display_name": t +# } +# } +# } +# }) - # Combine query and filters - body = {} - if query_clause: - if filter_clauses: - body["query"] = { - "bool": { - "must": [query_clause], - "filter": filter_clauses - } - } - else: - body["query"] = query_clause - else: - if filter_clauses: - body["query"] = { - "bool": { - "filter": filter_clauses - } - } - else: - body["query"] = { - "match_all": {} - } +# # Combine query and filters +# body = {} +# if query_clause: +# if filter_clauses: +# body["query"] = { +# "bool": { +# "must": [query_clause], +# "filter": filter_clauses +# } +# } +# else: +# body["query"] = query_clause +# else: +# if filter_clauses: +# body["query"] = { +# "bool": { +# "filter": filter_clauses +# } +# } +# else: +# body["query"] = { +# "match_all": {} +# } - # 3. Source Filtering - if include: - body["_source"] = list(include) - else: - body["_source"] = True +# # 3. Source Filtering +# if include: +# body["_source"] = list(include) +# else: +# body["_source"] = True - # 4. Pagination - es_size = page_size - es_from = (page - 1) * page_size - body["from"] = es_from - body["size"] = es_size - body["track_total_hits"] = track_total_hits +# # 4. Pagination +# es_size = page_size +# es_from = (page - 1) * page_size +# body["from"] = es_from +# body["size"] = es_size +# body["track_total_hits"] = track_total_hits - # 5. Sorting - if sort_by and sort_order: - body["sort"] = [ - {sort_by: {"order": sort_order}}, - ] - return body +# # 5. Sorting +# if sort_by and sort_order: +# body["sort"] = [ +# {sort_by: {"order": sort_order}}, +# ] +# return body def build_authors_search_rescored( @@ -275,14 +275,14 @@ def build_authors_search_rescored( } } }, - { - "match": { - "display_name": { - "query": query, - "fuzziness": 1 - } - } - } + # { + # "match": { + # "display_name": { + # "query": query, + # "fuzziness": 1 + # } + # } + # } ], "minimum_should_match": 1 } From fc123d81aa49c8bc5f805f1987fcc3a554da15b2 Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Tue, 9 Jun 2026 20:18:28 +0200 Subject: [PATCH 08/97] replace * marker with paper icon --- .../person-interesting.component.html | 10 ++++++++-- .../person-interesting.component.scss | 18 ++++++++++++++++++ .../person-interesting.component.ts | 3 ++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.html b/webapp/src/app/modules/person-interesting/person-interesting.component.html index 34c35799..92f4d52a 100644 --- a/webapp/src/app/modules/person-interesting/person-interesting.component.html +++ b/webapp/src/app/modules/person-interesting/person-interesting.component.html @@ -2,7 +2,10 @@

Interessant für

@if (tags().length > 0) { - * Anzahl Publikationen zum Thema + + article + Anzahl Publikationen zum Thema + }
@@ -16,7 +19,10 @@ [disabled]="!tag.id" (click)="onTagClick(tag)"> {{ tag.label }} - {{ tag.count }}* + + {{ tag.count }} + article + } } @else { diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.scss b/webapp/src/app/modules/person-interesting/person-interesting.component.scss index efedb965..178b12b0 100644 --- a/webapp/src/app/modules/person-interesting/person-interesting.component.scss +++ b/webapp/src/app/modules/person-interesting/person-interesting.component.scss @@ -73,6 +73,7 @@ flex: 0 0 auto; align-items: center; justify-content: center; + gap: 2px; min-width: 18px; height: 18px; padding: 0 5px; @@ -83,6 +84,13 @@ font-weight: 700; } +.topic-count .count-icon { + width: 13px; + height: 13px; + font-size: 13px; + line-height: 1; +} + .purple { --topic-border: #d8cafe; --topic-bg: #f6f0ff; @@ -114,10 +122,20 @@ } .interest-footnote { + display: inline-flex; + align-items: center; + gap: 4px; color: var(--sg-text-muted); font-size: 11px; } +.interest-footnote .footnote-icon { + width: 14px; + height: 14px; + font-size: 14px; + line-height: 1; +} + .interest-tags .interest-empty { padding: 9px 16px; border: 1px solid #e2e8f0; diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.ts b/webapp/src/app/modules/person-interesting/person-interesting.component.ts index 0e981037..d137caa6 100644 --- a/webapp/src/app/modules/person-interesting/person-interesting.component.ts +++ b/webapp/src/app/modules/person-interesting/person-interesting.component.ts @@ -1,5 +1,6 @@ import { Component, input, computed, output } from '@angular/core'; import { MatTooltipModule } from '@angular/material/tooltip'; +import { MatIconModule } from '@angular/material/icon'; import { CommonModule } from '@angular/common'; import { TopicCount } from '../../api'; @@ -16,7 +17,7 @@ const colors = ['purple', 'blue', 'green', 'orange', 'pink']; @Component({ selector: 'app-person-interesting', - imports: [CommonModule, MatTooltipModule], + imports: [CommonModule, MatTooltipModule, MatIconModule], templateUrl: './person-interesting.component.html', styleUrl: './person-interesting.component.scss', }) From 0ed80e2b36fd0842fa0e66f00f5427041f5ea070 Mon Sep 17 00:00:00 2001 From: Kazgatari <56477241+Kazgatari@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:36:06 +0200 Subject: [PATCH 09/97] changed model file structure in backend. Added generated models from other indices. --- .../inse/collaboration_network/schemas.py | 2 +- .../inse/collaboration_network/service.py | 10 +- service/src/main/inse/institutions/logic.py | 8 +- service/src/main/inse/institutions/service.py | 4 +- service/src/main/inse/logic.py | 8 +- service/src/main/inse/models/__init__.py | 129 +------ .../main/inse/models/news_aktuell/aktuell.py | 132 +++++++ .../inse/models/news_aktuell/link_item.py | 90 +++++ .../main/inse/models/news_aktuell/tag_item.py | 88 +++++ .../src/main/inse/models/openalex/__init__.py | 128 +++++++ .../main/inse/models/{ => openalex}/author.py | 14 +- .../author_affiliations_inner.py | 2 +- .../author_counts_by_year_inner.py | 0 .../inse/models/{ => openalex}/author_ids.py | 0 .../author_parsed_longest_name.py | 0 .../{ => openalex}/author_summary_stats.py | 0 .../{ => openalex}/author_topics_inner.py | 0 .../{ => openalex}/authors_list_response.py | 6 +- .../inse/models/{ => openalex}/authorship.py | 4 +- .../{ => openalex}/autocomplete_response.py | 4 +- .../autocomplete_response_meta.py | 0 .../autocomplete_response_results_inner.py | 0 .../main/inse/models/{ => openalex}/award.py | 0 .../inse/models/{ => openalex}/award_full.py | 2 +- .../{ => openalex}/award_full_funder.py | 0 .../{ => openalex}/awards_list_response.py | 4 +- .../inse/models/{ => openalex}/concept.py | 2 +- .../inse/models/{ => openalex}/concept_ids.py | 0 .../{ => openalex}/concepts_list_response.py | 4 +- .../inse/models/{ => openalex}/continent.py | 4 +- .../models/{ => openalex}/continent_ids.py | 0 .../continents_list_response.py | 4 +- .../{ => openalex}/countries_list_response.py | 4 +- .../inse/models/{ => openalex}/country.py | 4 +- .../{ => openalex}/country_continent.py | 0 .../inse/models/{ => openalex}/country_ids.py | 0 .../{ => openalex}/dehydrated_author.py | 0 .../{ => openalex}/dehydrated_funder.py | 0 .../{ => openalex}/dehydrated_institution.py | 0 .../{ => openalex}/dehydrated_source.py | 0 .../main/inse/models/{ => openalex}/domain.py | 4 +- .../{ => openalex}/domain_fields_inner.py | 0 .../inse/models/{ => openalex}/domain_ids.py | 0 .../{ => openalex}/domains_list_response.py | 4 +- .../main/inse/models/{ => openalex}/error.py | 0 .../{ => openalex}/fields_list_response.py | 4 +- .../main/inse/models/{ => openalex}/funder.py | 4 +- .../inse/models/{ => openalex}/funder_ids.py | 0 .../{ => openalex}/funders_list_response.py | 6 +- .../get_changefile200_response.py | 4 +- .../get_changefile200_response_meta.py | 0 ...et_changefile200_response_results_inner.py | 2 +- ...efile200_response_results_inner_formats.py | 4 +- ...00_response_results_inner_formats_jsonl.py | 0 ..._response_results_inner_formats_parquet.py | 0 .../models/{ => openalex}/group_by_result.py | 0 .../inse/models/{ => openalex}/institution.py | 8 +- .../models/{ => openalex}/institution_geo.py | 0 .../models/{ => openalex}/institution_ids.py | 0 .../models/{ => openalex}/institution_type.py | 0 .../institution_types_list_response.py | 4 +- .../institutions_list_response.py | 6 +- .../inse/models/{ => openalex}/keyword.py | 0 .../{ => openalex}/keywords_list_response.py | 6 +- .../inse/models/{ => openalex}/language.py | 0 .../{ => openalex}/languages_list_response.py | 4 +- .../inse/models/{ => openalex}/license.py | 0 .../{ => openalex}/licenses_list_response.py | 4 +- .../list_changefiles200_response.py | 4 +- .../list_changefiles200_response_meta.py | 0 ...t_changefiles200_response_results_inner.py | 0 .../inse/models/{ => openalex}/location.py | 2 +- .../inse/models/{ => openalex}/lsf_person.py | 0 .../main/inse/models/{ => openalex}/meta.py | 0 .../inse/models/{ => openalex}/model_field.py | 6 +- .../inse/models/{ => openalex}/open_access.py | 0 .../inse/models/{ => openalex}/publisher.py | 6 +- .../models/{ => openalex}/publisher_ids.py | 0 .../publisher_parent_publisher.py | 0 .../publishers_list_response.py | 6 +- .../{ => openalex}/rate_limit_response.py | 2 +- .../rate_limit_response_rate_limit.py | 2 +- ..._response_rate_limit_endpoint_costs_usd.py | 0 .../main/inse/models/{ => openalex}/sdg.py | 2 +- .../inse/models/{ => openalex}/sdg_ids.py | 0 .../{ => openalex}/sdgs_list_response.py | 4 +- .../main/inse/models/{ => openalex}/source.py | 6 +- .../inse/models/{ => openalex}/source_ids.py | 0 .../inse/models/{ => openalex}/source_type.py | 0 .../source_types_list_response.py | 4 +- .../{ => openalex}/sources_list_response.py | 6 +- .../inse/models/{ => openalex}/subfield.py | 8 +- .../models/{ => openalex}/subfield_domain.py | 0 .../models/{ => openalex}/subfield_field.py | 0 .../{ => openalex}/subfields_list_response.py | 4 +- .../text_classification_response.py | 4 +- .../text_classification_response_meta.py | 0 .../main/inse/models/{ => openalex}/topic.py | 8 +- .../inse/models/{ => openalex}/topic_count.py | 0 .../models/{ => openalex}/topic_domain.py | 0 .../inse/models/{ => openalex}/topic_field.py | 0 .../inse/models/{ => openalex}/topic_ids.py | 0 .../models/{ => openalex}/topic_subfield.py | 0 .../models/{ => openalex}/topics_by_time.py | 2 +- .../models/{ => openalex}/topics_by_year.py | 2 +- .../{ => openalex}/topics_list_response.py | 6 +- .../models/{ => openalex}/ude_organization.py | 0 .../main/inse/models/{ => openalex}/work.py | 30 +- .../inse/models/{ => openalex}/work_biblio.py | 0 .../work_citation_normalized_percentile.py | 0 .../work_cited_by_percentile_year.py | 0 .../work_counts_by_year_inner.py | 0 .../models/{ => openalex}/work_has_content.py | 0 .../inse/models/{ => openalex}/work_ids.py | 0 .../models/{ => openalex}/work_keyword.py | 0 .../models/{ => openalex}/work_mesh_inner.py | 0 .../inse/models/{ => openalex}/work_page.py | 2 +- ...ork_sustainable_development_goals_inner.py | 0 .../inse/models/{ => openalex}/work_topic.py | 6 +- .../{ => openalex}/work_topic_domain.py | 0 .../models/{ => openalex}/work_topic_field.py | 0 .../{ => openalex}/work_topic_subfield.py | 0 .../inse/models/{ => openalex}/work_type.py | 0 .../work_types_list_response.py | 4 +- .../{ => openalex}/works_list_response.py | 6 +- .../inse/models/patents_epo/epo_document.py | 264 +++++++++++++ .../models/patents_epo/inventor_nested.py | 88 +++++ .../inse/models/patents_uspto/agent_nested.py | 92 +++++ .../models/patents_uspto/applicant_nested.py | 96 +++++ .../assistant_examiner_nested.py | 88 +++++ .../models/patents_uspto/citation_object.py | 98 +++++ .../models/patents_uspto/inventor_nested.py | 90 +++++ .../patents_uspto/primary_examiner_nested.py | 92 +++++ .../patents_uspto/priority_claim_nested.py | 94 +++++ .../patents_uspto/related_documents_object.py | 98 +++++ .../inse/models/patents_uspto/uspto_patent.py | 358 ++++++++++++++++++ .../src/main/inse/models/projects_bund/arb.py | 88 +++++ .../inse/models/projects_bund/project_bund.py | 149 ++++++++ .../main/inse/models/projects_dfg/auslaend.py | 92 +++++ .../inse/models/projects_dfg/project_dfg.py | 252 ++++++++++++ .../inse/models/projects_dfg/stellvertr.py | 96 +++++ .../projects_dfg/stellvertr_sprecherinnen.py | 88 +++++ .../models/projects_eu/category_nested.py | 104 +++++ .../display_code_splitted_nested.py | 88 +++++ .../inse/models/projects_eu/keyword_nested.py | 88 +++++ .../models/projects_eu/organization_nested.py | 98 +++++ .../models/projects_eu/programme_nested.py | 92 +++++ .../inse/models/projects_eu/project_eu.py | 160 ++++++++ .../ude_organizations/keyword_object.py | 90 +++++ .../models/ude_organizations/news_object.py | 98 +++++ .../ude_organizations/project_object.py | 98 +++++ .../models/ude_organizations/staff_object.py | 100 +++++ .../ude_organization_content.py | 112 ++++++ .../models/ude_persons/function_nested.py | 90 +++++ .../inse/models/ude_persons/ude_person.py | 126 ++++++ service/src/main/inse/persons/logic.py | 6 +- service/src/main/inse/persons/model.py | 8 +- service/src/main/inse/persons/service.py | 2 +- service/src/main/inse/topics/logic.py | 8 +- service/src/main/inse/topics/service.py | 4 +- service/src/main/inse/util.py | 2 +- service/src/main/inse/works/logic.py | 14 +- service/src/main/inse/works/model.py | 2 +- service/src/main/inse/works/service.py | 10 +- service/src/main/inse/works/test_service.py | 10 +- 165 files changed, 4182 insertions(+), 304 deletions(-) create mode 100644 service/src/main/inse/models/news_aktuell/aktuell.py create mode 100644 service/src/main/inse/models/news_aktuell/link_item.py create mode 100644 service/src/main/inse/models/news_aktuell/tag_item.py create mode 100644 service/src/main/inse/models/openalex/__init__.py rename service/src/main/inse/models/{ => openalex}/author.py (94%) rename service/src/main/inse/models/{ => openalex}/author_affiliations_inner.py (97%) rename service/src/main/inse/models/{ => openalex}/author_counts_by_year_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/author_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/author_parsed_longest_name.py (100%) rename service/src/main/inse/models/{ => openalex}/author_summary_stats.py (100%) rename service/src/main/inse/models/{ => openalex}/author_topics_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/authors_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/authorship.py (97%) rename service/src/main/inse/models/{ => openalex}/autocomplete_response.py (94%) rename service/src/main/inse/models/{ => openalex}/autocomplete_response_meta.py (100%) rename service/src/main/inse/models/{ => openalex}/autocomplete_response_results_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/award.py (100%) rename service/src/main/inse/models/{ => openalex}/award_full.py (99%) rename service/src/main/inse/models/{ => openalex}/award_full_funder.py (100%) rename service/src/main/inse/models/{ => openalex}/awards_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/concept.py (99%) rename service/src/main/inse/models/{ => openalex}/concept_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/concepts_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/continent.py (97%) rename service/src/main/inse/models/{ => openalex}/continent_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/continents_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/countries_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/country.py (97%) rename service/src/main/inse/models/{ => openalex}/country_continent.py (100%) rename service/src/main/inse/models/{ => openalex}/country_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/dehydrated_author.py (100%) rename service/src/main/inse/models/{ => openalex}/dehydrated_funder.py (100%) rename service/src/main/inse/models/{ => openalex}/dehydrated_institution.py (100%) rename service/src/main/inse/models/{ => openalex}/dehydrated_source.py (100%) rename service/src/main/inse/models/{ => openalex}/domain.py (97%) rename service/src/main/inse/models/{ => openalex}/domain_fields_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/domain_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/domains_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/error.py (100%) rename service/src/main/inse/models/{ => openalex}/fields_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/funder.py (97%) rename service/src/main/inse/models/{ => openalex}/funder_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/funders_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/get_changefile200_response.py (94%) rename service/src/main/inse/models/{ => openalex}/get_changefile200_response_meta.py (100%) rename service/src/main/inse/models/{ => openalex}/get_changefile200_response_results_inner.py (96%) rename service/src/main/inse/models/{ => openalex}/get_changefile200_response_results_inner_formats.py (92%) rename service/src/main/inse/models/{ => openalex}/get_changefile200_response_results_inner_formats_jsonl.py (100%) rename service/src/main/inse/models/{ => openalex}/get_changefile200_response_results_inner_formats_parquet.py (100%) rename service/src/main/inse/models/{ => openalex}/group_by_result.py (100%) rename service/src/main/inse/models/{ => openalex}/institution.py (96%) rename service/src/main/inse/models/{ => openalex}/institution_geo.py (100%) rename service/src/main/inse/models/{ => openalex}/institution_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/institution_type.py (100%) rename service/src/main/inse/models/{ => openalex}/institution_types_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/institutions_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/keyword.py (100%) rename service/src/main/inse/models/{ => openalex}/keywords_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/language.py (100%) rename service/src/main/inse/models/{ => openalex}/languages_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/license.py (100%) rename service/src/main/inse/models/{ => openalex}/licenses_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/list_changefiles200_response.py (94%) rename service/src/main/inse/models/{ => openalex}/list_changefiles200_response_meta.py (100%) rename service/src/main/inse/models/{ => openalex}/list_changefiles200_response_results_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/location.py (98%) rename service/src/main/inse/models/{ => openalex}/lsf_person.py (100%) rename service/src/main/inse/models/{ => openalex}/meta.py (100%) rename service/src/main/inse/models/{ => openalex}/model_field.py (97%) rename service/src/main/inse/models/{ => openalex}/open_access.py (100%) rename service/src/main/inse/models/{ => openalex}/publisher.py (96%) rename service/src/main/inse/models/{ => openalex}/publisher_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/publisher_parent_publisher.py (100%) rename service/src/main/inse/models/{ => openalex}/publishers_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/rate_limit_response.py (97%) rename service/src/main/inse/models/{ => openalex}/rate_limit_response_rate_limit.py (97%) rename service/src/main/inse/models/{ => openalex}/rate_limit_response_rate_limit_endpoint_costs_usd.py (100%) rename service/src/main/inse/models/{ => openalex}/sdg.py (98%) rename service/src/main/inse/models/{ => openalex}/sdg_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/sdgs_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/source.py (97%) rename service/src/main/inse/models/{ => openalex}/source_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/source_type.py (100%) rename service/src/main/inse/models/{ => openalex}/source_types_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/sources_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/subfield.py (96%) rename service/src/main/inse/models/{ => openalex}/subfield_domain.py (100%) rename service/src/main/inse/models/{ => openalex}/subfield_field.py (100%) rename service/src/main/inse/models/{ => openalex}/subfields_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/text_classification_response.py (95%) rename service/src/main/inse/models/{ => openalex}/text_classification_response_meta.py (100%) rename service/src/main/inse/models/{ => openalex}/topic.py (95%) rename service/src/main/inse/models/{ => openalex}/topic_count.py (100%) rename service/src/main/inse/models/{ => openalex}/topic_domain.py (100%) rename service/src/main/inse/models/{ => openalex}/topic_field.py (100%) rename service/src/main/inse/models/{ => openalex}/topic_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/topic_subfield.py (100%) rename service/src/main/inse/models/{ => openalex}/topics_by_time.py (92%) rename service/src/main/inse/models/{ => openalex}/topics_by_year.py (89%) rename service/src/main/inse/models/{ => openalex}/topics_list_response.py (96%) rename service/src/main/inse/models/{ => openalex}/ude_organization.py (100%) rename service/src/main/inse/models/{ => openalex}/work.py (94%) rename service/src/main/inse/models/{ => openalex}/work_biblio.py (100%) rename service/src/main/inse/models/{ => openalex}/work_citation_normalized_percentile.py (100%) rename service/src/main/inse/models/{ => openalex}/work_cited_by_percentile_year.py (100%) rename service/src/main/inse/models/{ => openalex}/work_counts_by_year_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/work_has_content.py (100%) rename service/src/main/inse/models/{ => openalex}/work_ids.py (100%) rename service/src/main/inse/models/{ => openalex}/work_keyword.py (100%) rename service/src/main/inse/models/{ => openalex}/work_mesh_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/work_page.py (91%) rename service/src/main/inse/models/{ => openalex}/work_sustainable_development_goals_inner.py (100%) rename service/src/main/inse/models/{ => openalex}/work_topic.py (95%) rename service/src/main/inse/models/{ => openalex}/work_topic_domain.py (100%) rename service/src/main/inse/models/{ => openalex}/work_topic_field.py (100%) rename service/src/main/inse/models/{ => openalex}/work_topic_subfield.py (100%) rename service/src/main/inse/models/{ => openalex}/work_type.py (100%) rename service/src/main/inse/models/{ => openalex}/work_types_list_response.py (97%) rename service/src/main/inse/models/{ => openalex}/works_list_response.py (96%) create mode 100644 service/src/main/inse/models/patents_epo/epo_document.py create mode 100644 service/src/main/inse/models/patents_epo/inventor_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/agent_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/applicant_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/assistant_examiner_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/citation_object.py create mode 100644 service/src/main/inse/models/patents_uspto/inventor_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/primary_examiner_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/priority_claim_nested.py create mode 100644 service/src/main/inse/models/patents_uspto/related_documents_object.py create mode 100644 service/src/main/inse/models/patents_uspto/uspto_patent.py create mode 100644 service/src/main/inse/models/projects_bund/arb.py create mode 100644 service/src/main/inse/models/projects_bund/project_bund.py create mode 100644 service/src/main/inse/models/projects_dfg/auslaend.py create mode 100644 service/src/main/inse/models/projects_dfg/project_dfg.py create mode 100644 service/src/main/inse/models/projects_dfg/stellvertr.py create mode 100644 service/src/main/inse/models/projects_dfg/stellvertr_sprecherinnen.py create mode 100644 service/src/main/inse/models/projects_eu/category_nested.py create mode 100644 service/src/main/inse/models/projects_eu/display_code_splitted_nested.py create mode 100644 service/src/main/inse/models/projects_eu/keyword_nested.py create mode 100644 service/src/main/inse/models/projects_eu/organization_nested.py create mode 100644 service/src/main/inse/models/projects_eu/programme_nested.py create mode 100644 service/src/main/inse/models/projects_eu/project_eu.py create mode 100644 service/src/main/inse/models/ude_organizations/keyword_object.py create mode 100644 service/src/main/inse/models/ude_organizations/news_object.py create mode 100644 service/src/main/inse/models/ude_organizations/project_object.py create mode 100644 service/src/main/inse/models/ude_organizations/staff_object.py create mode 100644 service/src/main/inse/models/ude_organizations/ude_organization_content.py create mode 100644 service/src/main/inse/models/ude_persons/function_nested.py create mode 100644 service/src/main/inse/models/ude_persons/ude_person.py diff --git a/service/src/main/inse/collaboration_network/schemas.py b/service/src/main/inse/collaboration_network/schemas.py index b68d3547..6830b0f1 100644 --- a/service/src/main/inse/collaboration_network/schemas.py +++ b/service/src/main/inse/collaboration_network/schemas.py @@ -3,7 +3,7 @@ from typing import List, Optional, Set from pydantic import BaseModel, Field -from inse.models.work_topic import WorkTopic +from inse.models.openalex.work_topic import WorkTopic from inse.utils import extract_raw_topic_id diff --git a/service/src/main/inse/collaboration_network/service.py b/service/src/main/inse/collaboration_network/service.py index 2f4dedfd..8122f91f 100644 --- a/service/src/main/inse/collaboration_network/service.py +++ b/service/src/main/inse/collaboration_network/service.py @@ -26,11 +26,11 @@ from inse.utils import ( extract_raw_topic_id, extract_raw_work_id, ) -from inse.models.author import Author -from inse.models.authorship import Authorship -from inse.models.dehydrated_author import DehydratedAuthor -from inse.models.dehydrated_institution import DehydratedInstitution -from inse.models.institution import Institution +from inse.models.openalex.author import Author +from inse.models.openalex.authorship import Authorship +from inse.models.openalex.dehydrated_author import DehydratedAuthor +from inse.models.openalex.dehydrated_institution import DehydratedInstitution +from inse.models.openalex.institution import Institution logger = logging.getLogger(__name__) diff --git a/service/src/main/inse/institutions/logic.py b/service/src/main/inse/institutions/logic.py index 34504553..65a49ed6 100644 --- a/service/src/main/inse/institutions/logic.py +++ b/service/src/main/inse/institutions/logic.py @@ -13,10 +13,10 @@ from pydantic import ValidationError from starlette.status import HTTP_400_BAD_REQUEST from starlette.status import HTTP_502_BAD_GATEWAY -from inse.models.autocomplete_response import AutocompleteResponse -from inse.models.autocomplete_response_meta import AutocompleteResponseMeta -from inse.models.autocomplete_response_results_inner import AutocompleteResponseResultsInner -from inse.models.institutions_list_response import InstitutionsListResponse +from inse.models.openalex.autocomplete_response import AutocompleteResponse +from inse.models.openalex.autocomplete_response_meta import AutocompleteResponseMeta +from inse.models.openalex.autocomplete_response_results_inner import AutocompleteResponseResultsInner +from inse.models.openalex.institutions_list_response import InstitutionsListResponse from .search_client import OpenAlexInstitutionsClient logger = logging.getLogger(__name__) diff --git a/service/src/main/inse/institutions/service.py b/service/src/main/inse/institutions/service.py index 69d6911e..424fb7af 100644 --- a/service/src/main/inse/institutions/service.py +++ b/service/src/main/inse/institutions/service.py @@ -8,8 +8,8 @@ from typing import Annotated from fastapi import APIRouter from fastapi import Query -from inse.models.autocomplete_response import AutocompleteResponse -from inse.models.institutions_list_response import InstitutionsListResponse +from inse.models.openalex.autocomplete_response import AutocompleteResponse +from inse.models.openalex.institutions_list_response import InstitutionsListResponse from inse.tags import Tags from . import logic diff --git a/service/src/main/inse/logic.py b/service/src/main/inse/logic.py index 353626d6..19e9dda3 100644 --- a/service/src/main/inse/logic.py +++ b/service/src/main/inse/logic.py @@ -20,10 +20,10 @@ from . import model from . import config -from inse.models.topic import Topic -from inse.models.topic_subfield import TopicSubfield -from inse.models.topic_field import TopicField -from inse.models.topic_domain import TopicDomain +from inse.models.openalex.topic import Topic +from inse.models.openalex.topic_subfield import TopicSubfield +from inse.models.openalex.topic_field import TopicField +from inse.models.openalex.topic_domain import TopicDomain logger = logging.getLogger(__name__) diff --git a/service/src/main/inse/models/__init__.py b/service/src/main/inse/models/__init__.py index 90e05096..0c1debe0 100644 --- a/service/src/main/inse/models/__init__.py +++ b/service/src/main/inse/models/__init__.py @@ -1,128 +1 @@ -# coding: utf-8 - -# flake8: noqa -""" - OpenAlex API - - The OpenAlex API provides access to a comprehensive catalog of scholarly works, authors, sources, institutions, topics, keywords, publishers, and funders. OpenAlex indexes over 250 million scholarly works. - - The version of the OpenAPI document: 1.0.0 - Contact: support@openalex.org - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -# import models into model package -from inse.models.author import Author -from inse.models.author_affiliations_inner import AuthorAffiliationsInner -from inse.models.author_counts_by_year_inner import AuthorCountsByYearInner -from inse.models.author_ids import AuthorIds -from inse.models.author_parsed_longest_name import AuthorParsedLongestName -from inse.models.author_summary_stats import AuthorSummaryStats -from inse.models.author_topics_inner import AuthorTopicsInner -from inse.models.authors_list_response import AuthorsListResponse -from inse.models.authorship import Authorship -from inse.models.autocomplete_response import AutocompleteResponse -from inse.models.autocomplete_response_meta import AutocompleteResponseMeta -from inse.models.autocomplete_response_results_inner import AutocompleteResponseResultsInner -from inse.models.award import Award -from inse.models.award_full import AwardFull -from inse.models.award_full_funder import AwardFullFunder -from inse.models.awards_list_response import AwardsListResponse -from inse.models.concept import Concept -from inse.models.concept_ids import ConceptIds -from inse.models.concepts_list_response import ConceptsListResponse -from inse.models.continent import Continent -from inse.models.continent_ids import ContinentIds -from inse.models.continents_list_response import ContinentsListResponse -from inse.models.countries_list_response import CountriesListResponse -from inse.models.country import Country -from inse.models.country_continent import CountryContinent -from inse.models.country_ids import CountryIds -from inse.models.dehydrated_author import DehydratedAuthor -from inse.models.dehydrated_funder import DehydratedFunder -from inse.models.dehydrated_institution import DehydratedInstitution -from inse.models.dehydrated_source import DehydratedSource -from inse.models.domain import Domain -from inse.models.domain_fields_inner import DomainFieldsInner -from inse.models.domain_ids import DomainIds -from inse.models.domains_list_response import DomainsListResponse -from inse.models.error import Error -from inse.models.fields_list_response import FieldsListResponse -from inse.models.funder import Funder -from inse.models.funder_ids import FunderIds -from inse.models.funders_list_response import FundersListResponse -from inse.models.get_changefile200_response import GetChangefile200Response -from inse.models.get_changefile200_response_meta import GetChangefile200ResponseMeta -from inse.models.get_changefile200_response_results_inner import GetChangefile200ResponseResultsInner -from inse.models.get_changefile200_response_results_inner_formats import GetChangefile200ResponseResultsInnerFormats -from inse.models.get_changefile200_response_results_inner_formats_jsonl import GetChangefile200ResponseResultsInnerFormatsJsonl -from inse.models.get_changefile200_response_results_inner_formats_parquet import GetChangefile200ResponseResultsInnerFormatsParquet -from inse.models.group_by_result import GroupByResult -from inse.models.institution import Institution -from inse.models.institution_geo import InstitutionGeo -from inse.models.institution_ids import InstitutionIds -from inse.models.institution_type import InstitutionType -from inse.models.institution_types_list_response import InstitutionTypesListResponse -from inse.models.institutions_list_response import InstitutionsListResponse -from inse.models.keyword import Keyword -from inse.models.keywords_list_response import KeywordsListResponse -from inse.models.language import Language -from inse.models.languages_list_response import LanguagesListResponse -from inse.models.license import License -from inse.models.licenses_list_response import LicensesListResponse -from inse.models.list_changefiles200_response import ListChangefiles200Response -from inse.models.list_changefiles200_response_meta import ListChangefiles200ResponseMeta -from inse.models.list_changefiles200_response_results_inner import ListChangefiles200ResponseResultsInner -from inse.models.location import Location -from inse.models.meta import Meta -from inse.models.model_field import ModelField -from inse.models.open_access import OpenAccess -from inse.models.publisher import Publisher -from inse.models.publisher_ids import PublisherIds -from inse.models.publisher_parent_publisher import PublisherParentPublisher -from inse.models.publishers_list_response import PublishersListResponse -from inse.models.rate_limit_response import RateLimitResponse -from inse.models.rate_limit_response_rate_limit import RateLimitResponseRateLimit -from inse.models.rate_limit_response_rate_limit_endpoint_costs_usd import RateLimitResponseRateLimitEndpointCostsUsd -from inse.models.sdg import Sdg -from inse.models.sdg_ids import SdgIds -from inse.models.sdgs_list_response import SdgsListResponse -from inse.models.source import Source -from inse.models.source_ids import SourceIds -from inse.models.source_type import SourceType -from inse.models.source_types_list_response import SourceTypesListResponse -from inse.models.sources_list_response import SourcesListResponse -from inse.models.subfield import Subfield -from inse.models.subfield_domain import SubfieldDomain -from inse.models.subfield_field import SubfieldField -from inse.models.subfields_list_response import SubfieldsListResponse -from inse.models.text_classification_response import TextClassificationResponse -from inse.models.text_classification_response_meta import TextClassificationResponseMeta -from inse.models.topic import Topic -from inse.models.topic_domain import TopicDomain -from inse.models.topic_field import TopicField -from inse.models.topic_ids import TopicIds -from inse.models.topic_subfield import TopicSubfield -from inse.models.topics_list_response import TopicsListResponse -from inse.models.work import Work -from inse.models.work_biblio import WorkBiblio -from inse.models.work_citation_normalized_percentile import WorkCitationNormalizedPercentile -from inse.models.work_cited_by_percentile_year import WorkCitedByPercentileYear -from inse.models.work_counts_by_year_inner import WorkCountsByYearInner -from inse.models.work_has_content import WorkHasContent -from inse.models.work_ids import WorkIds -from inse.models.work_keyword import WorkKeyword -from inse.models.work_mesh_inner import WorkMeshInner -from inse.models.work_sustainable_development_goals_inner import WorkSustainableDevelopmentGoalsInner -from inse.models.work_topic import WorkTopic -from inse.models.work_topic_domain import WorkTopicDomain -from inse.models.work_topic_field import WorkTopicField -from inse.models.work_topic_subfield import WorkTopicSubfield -from inse.models.work_type import WorkType -from inse.models.work_types_list_response import WorkTypesListResponse -from inse.models.works_list_response import WorksListResponse -from inse.models.work_page import WorkPage - -from inse.models.lsf_person import LsfPerson +# empty package marker diff --git a/service/src/main/inse/models/news_aktuell/aktuell.py b/service/src/main/inse/models/news_aktuell/aktuell.py new file mode 100644 index 00000000..9ba7e48c --- /dev/null +++ b/service/src/main/inse/models/news_aktuell/aktuell.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Aktuell Index Backend Models + + Pydantic models for the Elasticsearch \"aktuell\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.link_item import LinkItem +from db_models.models.tag_item import TagItem +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Aktuell(BaseModel): + """ + Main document model for the aktuell index. + """ # noqa: E501 + author: Optional[StrictStr] = None + var_date: Optional[StrictStr] = Field(default=None, alias="date") + date_full: Optional[StrictInt] = None + date_year: Optional[StrictInt] = None + full_content: Optional[StrictStr] = None + further_content: Optional[StrictStr] = None + intro_content: Optional[StrictStr] = None + links_nested: Optional[List[LinkItem]] = None + main_content: Optional[StrictStr] = None + maintitle: Optional[StrictStr] = None + redaktion: Optional[StrictStr] = None + subtitle: Optional[StrictStr] = None + tags: Optional[StrictStr] = None + tags_nested: Optional[List[TagItem]] = None + url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["author", "date", "date_full", "date_year", "full_content", "further_content", "intro_content", "links_nested", "main_content", "maintitle", "redaktion", "subtitle", "tags", "tags_nested", "url"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Aktuell from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in links_nested (list) + _items = [] + if self.links_nested: + for _item_links_nested in self.links_nested: + if _item_links_nested: + _items.append(_item_links_nested.to_dict()) + _dict['links_nested'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in tags_nested (list) + _items = [] + if self.tags_nested: + for _item_tags_nested in self.tags_nested: + if _item_tags_nested: + _items.append(_item_tags_nested.to_dict()) + _dict['tags_nested'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Aktuell from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "author": obj.get("author"), + "date": obj.get("date"), + "date_full": obj.get("date_full"), + "date_year": obj.get("date_year"), + "full_content": obj.get("full_content"), + "further_content": obj.get("further_content"), + "intro_content": obj.get("intro_content"), + "links_nested": [LinkItem.from_dict(_item) for _item in obj["links_nested"]] if obj.get("links_nested") is not None else None, + "main_content": obj.get("main_content"), + "maintitle": obj.get("maintitle"), + "redaktion": obj.get("redaktion"), + "subtitle": obj.get("subtitle"), + "tags": obj.get("tags"), + "tags_nested": [TagItem.from_dict(_item) for _item in obj["tags_nested"]] if obj.get("tags_nested") is not None else None, + "url": obj.get("url") + }) + return _obj + + diff --git a/service/src/main/inse/models/news_aktuell/link_item.py b/service/src/main/inse/models/news_aktuell/link_item.py new file mode 100644 index 00000000..2b3e07c0 --- /dev/null +++ b/service/src/main/inse/models/news_aktuell/link_item.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Aktuell Index Backend Models + + Pydantic models for the Elasticsearch \"aktuell\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class LinkItem(BaseModel): + """ + Nested link object within the Aktuell document. + """ # noqa: E501 + text: Optional[StrictStr] = None + url: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["text", "url"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of LinkItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of LinkItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "text": obj.get("text"), + "url": obj.get("url") + }) + return _obj + + diff --git a/service/src/main/inse/models/news_aktuell/tag_item.py b/service/src/main/inse/models/news_aktuell/tag_item.py new file mode 100644 index 00000000..e7a64e1e --- /dev/null +++ b/service/src/main/inse/models/news_aktuell/tag_item.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Aktuell Index Backend Models + + Pydantic models for the Elasticsearch \"aktuell\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class TagItem(BaseModel): + """ + Nested tag object within the Aktuell document. + """ # noqa: E501 + tag: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["tag"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TagItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TagItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "tag": obj.get("tag") + }) + return _obj + + diff --git a/service/src/main/inse/models/openalex/__init__.py b/service/src/main/inse/models/openalex/__init__.py new file mode 100644 index 00000000..31842253 --- /dev/null +++ b/service/src/main/inse/models/openalex/__init__.py @@ -0,0 +1,128 @@ +# coding: utf-8 + +# flake8: noqa +""" + OpenAlex API + + The OpenAlex API provides access to a comprehensive catalog of scholarly works, authors, sources, institutions, topics, keywords, publishers, and funders. OpenAlex indexes over 250 million scholarly works. + + The version of the OpenAPI document: 1.0.0 + Contact: support@openalex.org + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +# import models into model package +from inse.models.openalex.author import Author +from inse.models.openalex.author_affiliations_inner import AuthorAffiliationsInner +from inse.models.openalex.author_counts_by_year_inner import AuthorCountsByYearInner +from inse.models.openalex.author_ids import AuthorIds +from inse.models.openalex.author_parsed_longest_name import AuthorParsedLongestName +from inse.models.openalex.author_summary_stats import AuthorSummaryStats +from inse.models.openalex.author_topics_inner import AuthorTopicsInner +from inse.models.openalex.authors_list_response import AuthorsListResponse +from inse.models.openalex.authorship import Authorship +from inse.models.openalex.autocomplete_response import AutocompleteResponse +from inse.models.openalex.autocomplete_response_meta import AutocompleteResponseMeta +from inse.models.openalex.autocomplete_response_results_inner import AutocompleteResponseResultsInner +from inse.models.openalex.award import Award +from inse.models.openalex.award_full import AwardFull +from inse.models.openalex.award_full_funder import AwardFullFunder +from inse.models.openalex.awards_list_response import AwardsListResponse +from inse.models.openalex.concept import Concept +from inse.models.openalex.concept_ids import ConceptIds +from inse.models.openalex.concepts_list_response import ConceptsListResponse +from inse.models.openalex.continent import Continent +from inse.models.openalex.continent_ids import ContinentIds +from inse.models.openalex.continents_list_response import ContinentsListResponse +from inse.models.openalex.countries_list_response import CountriesListResponse +from inse.models.openalex.country import Country +from inse.models.openalex.country_continent import CountryContinent +from inse.models.openalex.country_ids import CountryIds +from inse.models.openalex.dehydrated_author import DehydratedAuthor +from inse.models.openalex.dehydrated_funder import DehydratedFunder +from inse.models.openalex.dehydrated_institution import DehydratedInstitution +from inse.models.openalex.dehydrated_source import DehydratedSource +from inse.models.openalex.domain import Domain +from inse.models.openalex.domain_fields_inner import DomainFieldsInner +from inse.models.openalex.domain_ids import DomainIds +from inse.models.openalex.domains_list_response import DomainsListResponse +from inse.models.openalex.error import Error +from inse.models.openalex.fields_list_response import FieldsListResponse +from inse.models.openalex.funder import Funder +from inse.models.openalex.funder_ids import FunderIds +from inse.models.openalex.funders_list_response import FundersListResponse +from inse.models.openalex.get_changefile200_response import GetChangefile200Response +from inse.models.openalex.get_changefile200_response_meta import GetChangefile200ResponseMeta +from inse.models.openalex.get_changefile200_response_results_inner import GetChangefile200ResponseResultsInner +from inse.models.openalex.get_changefile200_response_results_inner_formats import GetChangefile200ResponseResultsInnerFormats +from inse.models.openalex.get_changefile200_response_results_inner_formats_jsonl import GetChangefile200ResponseResultsInnerFormatsJsonl +from inse.models.openalex.get_changefile200_response_results_inner_formats_parquet import GetChangefile200ResponseResultsInnerFormatsParquet +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.institution import Institution +from inse.models.openalex.institution_geo import InstitutionGeo +from inse.models.openalex.institution_ids import InstitutionIds +from inse.models.openalex.institution_type import InstitutionType +from inse.models.openalex.institution_types_list_response import InstitutionTypesListResponse +from inse.models.openalex.institutions_list_response import InstitutionsListResponse +from inse.models.openalex.keyword import Keyword +from inse.models.openalex.keywords_list_response import KeywordsListResponse +from inse.models.openalex.language import Language +from inse.models.openalex.languages_list_response import LanguagesListResponse +from inse.models.openalex.license import License +from inse.models.openalex.licenses_list_response import LicensesListResponse +from inse.models.openalex.list_changefiles200_response import ListChangefiles200Response +from inse.models.openalex.list_changefiles200_response_meta import ListChangefiles200ResponseMeta +from inse.models.openalex.list_changefiles200_response_results_inner import ListChangefiles200ResponseResultsInner +from inse.models.openalex.location import Location +from inse.models.openalex.meta import Meta +from inse.models.openalex.model_field import ModelField +from inse.models.openalex.open_access import OpenAccess +from inse.models.openalex.publisher import Publisher +from inse.models.openalex.publisher_ids import PublisherIds +from inse.models.openalex.publisher_parent_publisher import PublisherParentPublisher +from inse.models.openalex.publishers_list_response import PublishersListResponse +from inse.models.openalex.rate_limit_response import RateLimitResponse +from inse.models.openalex.rate_limit_response_rate_limit import RateLimitResponseRateLimit +from inse.models.openalex.rate_limit_response_rate_limit_endpoint_costs_usd import RateLimitResponseRateLimitEndpointCostsUsd +from inse.models.openalex.sdg import Sdg +from inse.models.openalex.sdg_ids import SdgIds +from inse.models.openalex.sdgs_list_response import SdgsListResponse +from inse.models.openalex.source import Source +from inse.models.openalex.source_ids import SourceIds +from inse.models.openalex.source_type import SourceType +from inse.models.openalex.source_types_list_response import SourceTypesListResponse +from inse.models.openalex.sources_list_response import SourcesListResponse +from inse.models.openalex.subfield import Subfield +from inse.models.openalex.subfield_domain import SubfieldDomain +from inse.models.openalex.subfield_field import SubfieldField +from inse.models.openalex.subfields_list_response import SubfieldsListResponse +from inse.models.openalex.text_classification_response import TextClassificationResponse +from inse.models.openalex.text_classification_response_meta import TextClassificationResponseMeta +from inse.models.openalex.topic import Topic +from inse.models.openalex.topic_domain import TopicDomain +from inse.models.openalex.topic_field import TopicField +from inse.models.openalex.topic_ids import TopicIds +from inse.models.openalex.topic_subfield import TopicSubfield +from inse.models.openalex.topics_list_response import TopicsListResponse +from inse.models.openalex.work import Work +from inse.models.openalex.work_biblio import WorkBiblio +from inse.models.openalex.work_citation_normalized_percentile import WorkCitationNormalizedPercentile +from inse.models.openalex.work_cited_by_percentile_year import WorkCitedByPercentileYear +from inse.models.openalex.work_counts_by_year_inner import WorkCountsByYearInner +from inse.models.openalex.work_has_content import WorkHasContent +from inse.models.openalex.work_ids import WorkIds +from inse.models.openalex.work_keyword import WorkKeyword +from inse.models.openalex.work_mesh_inner import WorkMeshInner +from inse.models.openalex.work_sustainable_development_goals_inner import WorkSustainableDevelopmentGoalsInner +from inse.models.openalex.work_topic import WorkTopic +from inse.models.openalex.work_topic_domain import WorkTopicDomain +from inse.models.openalex.work_topic_field import WorkTopicField +from inse.models.openalex.work_topic_subfield import WorkTopicSubfield +from inse.models.openalex.work_type import WorkType +from inse.models.openalex.work_types_list_response import WorkTypesListResponse +from inse.models.openalex.works_list_response import WorksListResponse +from inse.models.openalex.work_page import WorkPage + +from inse.models.openalex.lsf_person import LsfPerson diff --git a/service/src/main/inse/models/author.py b/service/src/main/inse/models/openalex/author.py similarity index 94% rename from service/src/main/inse/models/author.py rename to service/src/main/inse/models/openalex/author.py index daf271e8..f318c85b 100644 --- a/service/src/main/inse/models/author.py +++ b/service/src/main/inse/models/openalex/author.py @@ -21,13 +21,13 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.author_affiliations_inner import AuthorAffiliationsInner -from inse.models.author_counts_by_year_inner import AuthorCountsByYearInner -from inse.models.author_ids import AuthorIds -from inse.models.author_parsed_longest_name import AuthorParsedLongestName -from inse.models.author_summary_stats import AuthorSummaryStats -from inse.models.work_topic import WorkTopic -from inse.models.dehydrated_institution import DehydratedInstitution +from inse.models.openalex.author_affiliations_inner import AuthorAffiliationsInner +from inse.models.openalex.author_counts_by_year_inner import AuthorCountsByYearInner +from inse.models.openalex.author_ids import AuthorIds +from inse.models.openalex.author_parsed_longest_name import AuthorParsedLongestName +from inse.models.openalex.author_summary_stats import AuthorSummaryStats +from inse.models.openalex.work_topic import WorkTopic +from inse.models.openalex.dehydrated_institution import DehydratedInstitution from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/author_affiliations_inner.py b/service/src/main/inse/models/openalex/author_affiliations_inner.py similarity index 97% rename from service/src/main/inse/models/author_affiliations_inner.py rename to service/src/main/inse/models/openalex/author_affiliations_inner.py index 289e91e5..33985031 100644 --- a/service/src/main/inse/models/author_affiliations_inner.py +++ b/service/src/main/inse/models/openalex/author_affiliations_inner.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from inse.models.dehydrated_institution import DehydratedInstitution +from inse.models.openalex.dehydrated_institution import DehydratedInstitution from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/author_counts_by_year_inner.py b/service/src/main/inse/models/openalex/author_counts_by_year_inner.py similarity index 100% rename from service/src/main/inse/models/author_counts_by_year_inner.py rename to service/src/main/inse/models/openalex/author_counts_by_year_inner.py diff --git a/service/src/main/inse/models/author_ids.py b/service/src/main/inse/models/openalex/author_ids.py similarity index 100% rename from service/src/main/inse/models/author_ids.py rename to service/src/main/inse/models/openalex/author_ids.py diff --git a/service/src/main/inse/models/author_parsed_longest_name.py b/service/src/main/inse/models/openalex/author_parsed_longest_name.py similarity index 100% rename from service/src/main/inse/models/author_parsed_longest_name.py rename to service/src/main/inse/models/openalex/author_parsed_longest_name.py diff --git a/service/src/main/inse/models/author_summary_stats.py b/service/src/main/inse/models/openalex/author_summary_stats.py similarity index 100% rename from service/src/main/inse/models/author_summary_stats.py rename to service/src/main/inse/models/openalex/author_summary_stats.py diff --git a/service/src/main/inse/models/author_topics_inner.py b/service/src/main/inse/models/openalex/author_topics_inner.py similarity index 100% rename from service/src/main/inse/models/author_topics_inner.py rename to service/src/main/inse/models/openalex/author_topics_inner.py diff --git a/service/src/main/inse/models/authors_list_response.py b/service/src/main/inse/models/openalex/authors_list_response.py similarity index 96% rename from service/src/main/inse/models/authors_list_response.py rename to service/src/main/inse/models/openalex/authors_list_response.py index 263fc762..8a266d1e 100644 --- a/service/src/main/inse/models/authors_list_response.py +++ b/service/src/main/inse/models/openalex/authors_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.author import Author -from inse.models.group_by_result import GroupByResult -from inse.models.meta import Meta +from inse.models.openalex.author import Author +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/authorship.py b/service/src/main/inse/models/openalex/authorship.py similarity index 97% rename from service/src/main/inse/models/authorship.py rename to service/src/main/inse/models/openalex/authorship.py index ec3fcd6b..5f112d23 100644 --- a/service/src/main/inse/models/authorship.py +++ b/service/src/main/inse/models/openalex/authorship.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from inse.models.dehydrated_author import DehydratedAuthor -from inse.models.dehydrated_institution import DehydratedInstitution +from inse.models.openalex.dehydrated_author import DehydratedAuthor +from inse.models.openalex.dehydrated_institution import DehydratedInstitution from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/autocomplete_response.py b/service/src/main/inse/models/openalex/autocomplete_response.py similarity index 94% rename from service/src/main/inse/models/autocomplete_response.py rename to service/src/main/inse/models/openalex/autocomplete_response.py index fc5f3d61..953a05a3 100644 --- a/service/src/main/inse/models/autocomplete_response.py +++ b/service/src/main/inse/models/openalex/autocomplete_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.autocomplete_response_meta import AutocompleteResponseMeta -from inse.models.autocomplete_response_results_inner import AutocompleteResponseResultsInner +from inse.models.openalex.autocomplete_response_meta import AutocompleteResponseMeta +from inse.models.openalex.autocomplete_response_results_inner import AutocompleteResponseResultsInner from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/autocomplete_response_meta.py b/service/src/main/inse/models/openalex/autocomplete_response_meta.py similarity index 100% rename from service/src/main/inse/models/autocomplete_response_meta.py rename to service/src/main/inse/models/openalex/autocomplete_response_meta.py diff --git a/service/src/main/inse/models/autocomplete_response_results_inner.py b/service/src/main/inse/models/openalex/autocomplete_response_results_inner.py similarity index 100% rename from service/src/main/inse/models/autocomplete_response_results_inner.py rename to service/src/main/inse/models/openalex/autocomplete_response_results_inner.py diff --git a/service/src/main/inse/models/award.py b/service/src/main/inse/models/openalex/award.py similarity index 100% rename from service/src/main/inse/models/award.py rename to service/src/main/inse/models/openalex/award.py diff --git a/service/src/main/inse/models/award_full.py b/service/src/main/inse/models/openalex/award_full.py similarity index 99% rename from service/src/main/inse/models/award_full.py rename to service/src/main/inse/models/openalex/award_full.py index b9362b8e..06a86912 100644 --- a/service/src/main/inse/models/award_full.py +++ b/service/src/main/inse/models/openalex/award_full.py @@ -21,7 +21,7 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from inse.models.award_full_funder import AwardFullFunder +from inse.models.openalex.award_full_funder import AwardFullFunder from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/award_full_funder.py b/service/src/main/inse/models/openalex/award_full_funder.py similarity index 100% rename from service/src/main/inse/models/award_full_funder.py rename to service/src/main/inse/models/openalex/award_full_funder.py diff --git a/service/src/main/inse/models/awards_list_response.py b/service/src/main/inse/models/openalex/awards_list_response.py similarity index 97% rename from service/src/main/inse/models/awards_list_response.py rename to service/src/main/inse/models/openalex/awards_list_response.py index f2a3b207..c28e4f3b 100644 --- a/service/src/main/inse/models/awards_list_response.py +++ b/service/src/main/inse/models/openalex/awards_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.award_full import AwardFull -from inse.models.meta import Meta +from inse.models.openalex.award_full import AwardFull +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/concept.py b/service/src/main/inse/models/openalex/concept.py similarity index 99% rename from service/src/main/inse/models/concept.py rename to service/src/main/inse/models/openalex/concept.py index caff472a..063f7b5a 100644 --- a/service/src/main/inse/models/concept.py +++ b/service/src/main/inse/models/openalex/concept.py @@ -21,7 +21,7 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.concept_ids import ConceptIds +from inse.models.openalex.concept_ids import ConceptIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/concept_ids.py b/service/src/main/inse/models/openalex/concept_ids.py similarity index 100% rename from service/src/main/inse/models/concept_ids.py rename to service/src/main/inse/models/openalex/concept_ids.py diff --git a/service/src/main/inse/models/concepts_list_response.py b/service/src/main/inse/models/openalex/concepts_list_response.py similarity index 97% rename from service/src/main/inse/models/concepts_list_response.py rename to service/src/main/inse/models/openalex/concepts_list_response.py index 7607e403..4425cd6f 100644 --- a/service/src/main/inse/models/concepts_list_response.py +++ b/service/src/main/inse/models/openalex/concepts_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.concept import Concept -from inse.models.meta import Meta +from inse.models.openalex.concept import Concept +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/continent.py b/service/src/main/inse/models/openalex/continent.py similarity index 97% rename from service/src/main/inse/models/continent.py rename to service/src/main/inse/models/openalex/continent.py index 9b9299a5..e8fbe4d2 100644 --- a/service/src/main/inse/models/continent.py +++ b/service/src/main/inse/models/openalex/continent.py @@ -21,8 +21,8 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.continent_ids import ContinentIds -from inse.models.domain_fields_inner import DomainFieldsInner +from inse.models.openalex.continent_ids import ContinentIds +from inse.models.openalex.domain_fields_inner import DomainFieldsInner from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/continent_ids.py b/service/src/main/inse/models/openalex/continent_ids.py similarity index 100% rename from service/src/main/inse/models/continent_ids.py rename to service/src/main/inse/models/openalex/continent_ids.py diff --git a/service/src/main/inse/models/continents_list_response.py b/service/src/main/inse/models/openalex/continents_list_response.py similarity index 97% rename from service/src/main/inse/models/continents_list_response.py rename to service/src/main/inse/models/openalex/continents_list_response.py index efe0e1ab..ceeb4e68 100644 --- a/service/src/main/inse/models/continents_list_response.py +++ b/service/src/main/inse/models/openalex/continents_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.continent import Continent -from inse.models.meta import Meta +from inse.models.openalex.continent import Continent +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/countries_list_response.py b/service/src/main/inse/models/openalex/countries_list_response.py similarity index 97% rename from service/src/main/inse/models/countries_list_response.py rename to service/src/main/inse/models/openalex/countries_list_response.py index 0979819b..ac26b32e 100644 --- a/service/src/main/inse/models/countries_list_response.py +++ b/service/src/main/inse/models/openalex/countries_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.country import Country -from inse.models.meta import Meta +from inse.models.openalex.country import Country +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/country.py b/service/src/main/inse/models/openalex/country.py similarity index 97% rename from service/src/main/inse/models/country.py rename to service/src/main/inse/models/openalex/country.py index 6fc8bc2d..4d051a60 100644 --- a/service/src/main/inse/models/country.py +++ b/service/src/main/inse/models/openalex/country.py @@ -21,8 +21,8 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.country_continent import CountryContinent -from inse.models.country_ids import CountryIds +from inse.models.openalex.country_continent import CountryContinent +from inse.models.openalex.country_ids import CountryIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/country_continent.py b/service/src/main/inse/models/openalex/country_continent.py similarity index 100% rename from service/src/main/inse/models/country_continent.py rename to service/src/main/inse/models/openalex/country_continent.py diff --git a/service/src/main/inse/models/country_ids.py b/service/src/main/inse/models/openalex/country_ids.py similarity index 100% rename from service/src/main/inse/models/country_ids.py rename to service/src/main/inse/models/openalex/country_ids.py diff --git a/service/src/main/inse/models/dehydrated_author.py b/service/src/main/inse/models/openalex/dehydrated_author.py similarity index 100% rename from service/src/main/inse/models/dehydrated_author.py rename to service/src/main/inse/models/openalex/dehydrated_author.py diff --git a/service/src/main/inse/models/dehydrated_funder.py b/service/src/main/inse/models/openalex/dehydrated_funder.py similarity index 100% rename from service/src/main/inse/models/dehydrated_funder.py rename to service/src/main/inse/models/openalex/dehydrated_funder.py diff --git a/service/src/main/inse/models/dehydrated_institution.py b/service/src/main/inse/models/openalex/dehydrated_institution.py similarity index 100% rename from service/src/main/inse/models/dehydrated_institution.py rename to service/src/main/inse/models/openalex/dehydrated_institution.py diff --git a/service/src/main/inse/models/dehydrated_source.py b/service/src/main/inse/models/openalex/dehydrated_source.py similarity index 100% rename from service/src/main/inse/models/dehydrated_source.py rename to service/src/main/inse/models/openalex/dehydrated_source.py diff --git a/service/src/main/inse/models/domain.py b/service/src/main/inse/models/openalex/domain.py similarity index 97% rename from service/src/main/inse/models/domain.py rename to service/src/main/inse/models/openalex/domain.py index ca17c260..16cec7ff 100644 --- a/service/src/main/inse/models/domain.py +++ b/service/src/main/inse/models/openalex/domain.py @@ -21,8 +21,8 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.domain_fields_inner import DomainFieldsInner -from inse.models.domain_ids import DomainIds +from inse.models.openalex.domain_fields_inner import DomainFieldsInner +from inse.models.openalex.domain_ids import DomainIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/domain_fields_inner.py b/service/src/main/inse/models/openalex/domain_fields_inner.py similarity index 100% rename from service/src/main/inse/models/domain_fields_inner.py rename to service/src/main/inse/models/openalex/domain_fields_inner.py diff --git a/service/src/main/inse/models/domain_ids.py b/service/src/main/inse/models/openalex/domain_ids.py similarity index 100% rename from service/src/main/inse/models/domain_ids.py rename to service/src/main/inse/models/openalex/domain_ids.py diff --git a/service/src/main/inse/models/domains_list_response.py b/service/src/main/inse/models/openalex/domains_list_response.py similarity index 97% rename from service/src/main/inse/models/domains_list_response.py rename to service/src/main/inse/models/openalex/domains_list_response.py index 6c06770b..3ea8e07c 100644 --- a/service/src/main/inse/models/domains_list_response.py +++ b/service/src/main/inse/models/openalex/domains_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.domain import Domain -from inse.models.meta import Meta +from inse.models.openalex.domain import Domain +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/error.py b/service/src/main/inse/models/openalex/error.py similarity index 100% rename from service/src/main/inse/models/error.py rename to service/src/main/inse/models/openalex/error.py diff --git a/service/src/main/inse/models/fields_list_response.py b/service/src/main/inse/models/openalex/fields_list_response.py similarity index 97% rename from service/src/main/inse/models/fields_list_response.py rename to service/src/main/inse/models/openalex/fields_list_response.py index 0fd847e4..cc02907e 100644 --- a/service/src/main/inse/models/fields_list_response.py +++ b/service/src/main/inse/models/openalex/fields_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.meta import Meta -from inse.models.model_field import ModelField +from inse.models.openalex.meta import Meta +from inse.models.openalex.model_field import ModelField from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/funder.py b/service/src/main/inse/models/openalex/funder.py similarity index 97% rename from service/src/main/inse/models/funder.py rename to service/src/main/inse/models/openalex/funder.py index e717a36b..ef860bf1 100644 --- a/service/src/main/inse/models/funder.py +++ b/service/src/main/inse/models/openalex/funder.py @@ -21,8 +21,8 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.author_counts_by_year_inner import AuthorCountsByYearInner -from inse.models.funder_ids import FunderIds +from inse.models.openalex.author_counts_by_year_inner import AuthorCountsByYearInner +from inse.models.openalex.funder_ids import FunderIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/funder_ids.py b/service/src/main/inse/models/openalex/funder_ids.py similarity index 100% rename from service/src/main/inse/models/funder_ids.py rename to service/src/main/inse/models/openalex/funder_ids.py diff --git a/service/src/main/inse/models/funders_list_response.py b/service/src/main/inse/models/openalex/funders_list_response.py similarity index 96% rename from service/src/main/inse/models/funders_list_response.py rename to service/src/main/inse/models/openalex/funders_list_response.py index b93e6f29..c856665c 100644 --- a/service/src/main/inse/models/funders_list_response.py +++ b/service/src/main/inse/models/openalex/funders_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.funder import Funder -from inse.models.group_by_result import GroupByResult -from inse.models.meta import Meta +from inse.models.openalex.funder import Funder +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/get_changefile200_response.py b/service/src/main/inse/models/openalex/get_changefile200_response.py similarity index 94% rename from service/src/main/inse/models/get_changefile200_response.py rename to service/src/main/inse/models/openalex/get_changefile200_response.py index bedd8aec..cd801766 100644 --- a/service/src/main/inse/models/get_changefile200_response.py +++ b/service/src/main/inse/models/openalex/get_changefile200_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.get_changefile200_response_meta import GetChangefile200ResponseMeta -from inse.models.get_changefile200_response_results_inner import GetChangefile200ResponseResultsInner +from inse.models.openalex.get_changefile200_response_meta import GetChangefile200ResponseMeta +from inse.models.openalex.get_changefile200_response_results_inner import GetChangefile200ResponseResultsInner from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/get_changefile200_response_meta.py b/service/src/main/inse/models/openalex/get_changefile200_response_meta.py similarity index 100% rename from service/src/main/inse/models/get_changefile200_response_meta.py rename to service/src/main/inse/models/openalex/get_changefile200_response_meta.py diff --git a/service/src/main/inse/models/get_changefile200_response_results_inner.py b/service/src/main/inse/models/openalex/get_changefile200_response_results_inner.py similarity index 96% rename from service/src/main/inse/models/get_changefile200_response_results_inner.py rename to service/src/main/inse/models/openalex/get_changefile200_response_results_inner.py index b58fd49f..39639cf2 100644 --- a/service/src/main/inse/models/get_changefile200_response_results_inner.py +++ b/service/src/main/inse/models/openalex/get_changefile200_response_results_inner.py @@ -20,7 +20,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.get_changefile200_response_results_inner_formats import GetChangefile200ResponseResultsInnerFormats +from inse.models.openalex.get_changefile200_response_results_inner_formats import GetChangefile200ResponseResultsInnerFormats from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/get_changefile200_response_results_inner_formats.py b/service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats.py similarity index 92% rename from service/src/main/inse/models/get_changefile200_response_results_inner_formats.py rename to service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats.py index 7f05dc40..a78c2bac 100644 --- a/service/src/main/inse/models/get_changefile200_response_results_inner_formats.py +++ b/service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.get_changefile200_response_results_inner_formats_jsonl import GetChangefile200ResponseResultsInnerFormatsJsonl -from inse.models.get_changefile200_response_results_inner_formats_parquet import GetChangefile200ResponseResultsInnerFormatsParquet +from inse.models.openalex.get_changefile200_response_results_inner_formats_jsonl import GetChangefile200ResponseResultsInnerFormatsJsonl +from inse.models.openalex.get_changefile200_response_results_inner_formats_parquet import GetChangefile200ResponseResultsInnerFormatsParquet from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/get_changefile200_response_results_inner_formats_jsonl.py b/service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats_jsonl.py similarity index 100% rename from service/src/main/inse/models/get_changefile200_response_results_inner_formats_jsonl.py rename to service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats_jsonl.py diff --git a/service/src/main/inse/models/get_changefile200_response_results_inner_formats_parquet.py b/service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats_parquet.py similarity index 100% rename from service/src/main/inse/models/get_changefile200_response_results_inner_formats_parquet.py rename to service/src/main/inse/models/openalex/get_changefile200_response_results_inner_formats_parquet.py diff --git a/service/src/main/inse/models/group_by_result.py b/service/src/main/inse/models/openalex/group_by_result.py similarity index 100% rename from service/src/main/inse/models/group_by_result.py rename to service/src/main/inse/models/openalex/group_by_result.py diff --git a/service/src/main/inse/models/institution.py b/service/src/main/inse/models/openalex/institution.py similarity index 96% rename from service/src/main/inse/models/institution.py rename to service/src/main/inse/models/openalex/institution.py index 5e22bc1b..a81ae678 100644 --- a/service/src/main/inse/models/institution.py +++ b/service/src/main/inse/models/openalex/institution.py @@ -21,10 +21,10 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from inse.models.author_counts_by_year_inner import AuthorCountsByYearInner -from inse.models.author_summary_stats import AuthorSummaryStats -from inse.models.institution_geo import InstitutionGeo -from inse.models.institution_ids import InstitutionIds +from inse.models.openalex.author_counts_by_year_inner import AuthorCountsByYearInner +from inse.models.openalex.author_summary_stats import AuthorSummaryStats +from inse.models.openalex.institution_geo import InstitutionGeo +from inse.models.openalex.institution_ids import InstitutionIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/institution_geo.py b/service/src/main/inse/models/openalex/institution_geo.py similarity index 100% rename from service/src/main/inse/models/institution_geo.py rename to service/src/main/inse/models/openalex/institution_geo.py diff --git a/service/src/main/inse/models/institution_ids.py b/service/src/main/inse/models/openalex/institution_ids.py similarity index 100% rename from service/src/main/inse/models/institution_ids.py rename to service/src/main/inse/models/openalex/institution_ids.py diff --git a/service/src/main/inse/models/institution_type.py b/service/src/main/inse/models/openalex/institution_type.py similarity index 100% rename from service/src/main/inse/models/institution_type.py rename to service/src/main/inse/models/openalex/institution_type.py diff --git a/service/src/main/inse/models/institution_types_list_response.py b/service/src/main/inse/models/openalex/institution_types_list_response.py similarity index 96% rename from service/src/main/inse/models/institution_types_list_response.py rename to service/src/main/inse/models/openalex/institution_types_list_response.py index d94fb4c8..c06b2e4b 100644 --- a/service/src/main/inse/models/institution_types_list_response.py +++ b/service/src/main/inse/models/openalex/institution_types_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.institution_type import InstitutionType -from inse.models.meta import Meta +from inse.models.openalex.institution_type import InstitutionType +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/institutions_list_response.py b/service/src/main/inse/models/openalex/institutions_list_response.py similarity index 96% rename from service/src/main/inse/models/institutions_list_response.py rename to service/src/main/inse/models/openalex/institutions_list_response.py index 164954e2..f3313a74 100644 --- a/service/src/main/inse/models/institutions_list_response.py +++ b/service/src/main/inse/models/openalex/institutions_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.group_by_result import GroupByResult -from inse.models.institution import Institution -from inse.models.meta import Meta +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.institution import Institution +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/keyword.py b/service/src/main/inse/models/openalex/keyword.py similarity index 100% rename from service/src/main/inse/models/keyword.py rename to service/src/main/inse/models/openalex/keyword.py diff --git a/service/src/main/inse/models/keywords_list_response.py b/service/src/main/inse/models/openalex/keywords_list_response.py similarity index 96% rename from service/src/main/inse/models/keywords_list_response.py rename to service/src/main/inse/models/openalex/keywords_list_response.py index 7fe1430a..ef7676a2 100644 --- a/service/src/main/inse/models/keywords_list_response.py +++ b/service/src/main/inse/models/openalex/keywords_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.group_by_result import GroupByResult -from inse.models.keyword import Keyword -from inse.models.meta import Meta +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.keyword import Keyword +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/language.py b/service/src/main/inse/models/openalex/language.py similarity index 100% rename from service/src/main/inse/models/language.py rename to service/src/main/inse/models/openalex/language.py diff --git a/service/src/main/inse/models/languages_list_response.py b/service/src/main/inse/models/openalex/languages_list_response.py similarity index 97% rename from service/src/main/inse/models/languages_list_response.py rename to service/src/main/inse/models/openalex/languages_list_response.py index 5b859c16..6c4cc2c1 100644 --- a/service/src/main/inse/models/languages_list_response.py +++ b/service/src/main/inse/models/openalex/languages_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.language import Language -from inse.models.meta import Meta +from inse.models.openalex.language import Language +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/license.py b/service/src/main/inse/models/openalex/license.py similarity index 100% rename from service/src/main/inse/models/license.py rename to service/src/main/inse/models/openalex/license.py diff --git a/service/src/main/inse/models/licenses_list_response.py b/service/src/main/inse/models/openalex/licenses_list_response.py similarity index 97% rename from service/src/main/inse/models/licenses_list_response.py rename to service/src/main/inse/models/openalex/licenses_list_response.py index 78e2e79b..d94b15c0 100644 --- a/service/src/main/inse/models/licenses_list_response.py +++ b/service/src/main/inse/models/openalex/licenses_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.license import License -from inse.models.meta import Meta +from inse.models.openalex.license import License +from inse.models.openalex.meta import Meta from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/list_changefiles200_response.py b/service/src/main/inse/models/openalex/list_changefiles200_response.py similarity index 94% rename from service/src/main/inse/models/list_changefiles200_response.py rename to service/src/main/inse/models/openalex/list_changefiles200_response.py index 80c6633c..a183d821 100644 --- a/service/src/main/inse/models/list_changefiles200_response.py +++ b/service/src/main/inse/models/openalex/list_changefiles200_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.list_changefiles200_response_meta import ListChangefiles200ResponseMeta -from inse.models.list_changefiles200_response_results_inner import ListChangefiles200ResponseResultsInner +from inse.models.openalex.list_changefiles200_response_meta import ListChangefiles200ResponseMeta +from inse.models.openalex.list_changefiles200_response_results_inner import ListChangefiles200ResponseResultsInner from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/list_changefiles200_response_meta.py b/service/src/main/inse/models/openalex/list_changefiles200_response_meta.py similarity index 100% rename from service/src/main/inse/models/list_changefiles200_response_meta.py rename to service/src/main/inse/models/openalex/list_changefiles200_response_meta.py diff --git a/service/src/main/inse/models/list_changefiles200_response_results_inner.py b/service/src/main/inse/models/openalex/list_changefiles200_response_results_inner.py similarity index 100% rename from service/src/main/inse/models/list_changefiles200_response_results_inner.py rename to service/src/main/inse/models/openalex/list_changefiles200_response_results_inner.py diff --git a/service/src/main/inse/models/location.py b/service/src/main/inse/models/openalex/location.py similarity index 98% rename from service/src/main/inse/models/location.py rename to service/src/main/inse/models/openalex/location.py index 01a51fd3..a2b88732 100644 --- a/service/src/main/inse/models/location.py +++ b/service/src/main/inse/models/openalex/location.py @@ -20,7 +20,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from inse.models.dehydrated_source import DehydratedSource +from inse.models.openalex.dehydrated_source import DehydratedSource from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/lsf_person.py b/service/src/main/inse/models/openalex/lsf_person.py similarity index 100% rename from service/src/main/inse/models/lsf_person.py rename to service/src/main/inse/models/openalex/lsf_person.py diff --git a/service/src/main/inse/models/meta.py b/service/src/main/inse/models/openalex/meta.py similarity index 100% rename from service/src/main/inse/models/meta.py rename to service/src/main/inse/models/openalex/meta.py diff --git a/service/src/main/inse/models/model_field.py b/service/src/main/inse/models/openalex/model_field.py similarity index 97% rename from service/src/main/inse/models/model_field.py rename to service/src/main/inse/models/openalex/model_field.py index c6fb8a0f..ce3c8afc 100644 --- a/service/src/main/inse/models/model_field.py +++ b/service/src/main/inse/models/openalex/model_field.py @@ -21,9 +21,9 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.domain_fields_inner import DomainFieldsInner -from inse.models.domain_ids import DomainIds -from inse.models.work_topic_domain import WorkTopicDomain +from inse.models.openalex.domain_fields_inner import DomainFieldsInner +from inse.models.openalex.domain_ids import DomainIds +from inse.models.openalex.work_topic_domain import WorkTopicDomain from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/open_access.py b/service/src/main/inse/models/openalex/open_access.py similarity index 100% rename from service/src/main/inse/models/open_access.py rename to service/src/main/inse/models/openalex/open_access.py diff --git a/service/src/main/inse/models/publisher.py b/service/src/main/inse/models/openalex/publisher.py similarity index 96% rename from service/src/main/inse/models/publisher.py rename to service/src/main/inse/models/openalex/publisher.py index 68885d35..57e477c8 100644 --- a/service/src/main/inse/models/publisher.py +++ b/service/src/main/inse/models/openalex/publisher.py @@ -21,9 +21,9 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.author_counts_by_year_inner import AuthorCountsByYearInner -from inse.models.publisher_ids import PublisherIds -from inse.models.publisher_parent_publisher import PublisherParentPublisher +from inse.models.openalex.author_counts_by_year_inner import AuthorCountsByYearInner +from inse.models.openalex.publisher_ids import PublisherIds +from inse.models.openalex.publisher_parent_publisher import PublisherParentPublisher from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/publisher_ids.py b/service/src/main/inse/models/openalex/publisher_ids.py similarity index 100% rename from service/src/main/inse/models/publisher_ids.py rename to service/src/main/inse/models/openalex/publisher_ids.py diff --git a/service/src/main/inse/models/publisher_parent_publisher.py b/service/src/main/inse/models/openalex/publisher_parent_publisher.py similarity index 100% rename from service/src/main/inse/models/publisher_parent_publisher.py rename to service/src/main/inse/models/openalex/publisher_parent_publisher.py diff --git a/service/src/main/inse/models/publishers_list_response.py b/service/src/main/inse/models/openalex/publishers_list_response.py similarity index 96% rename from service/src/main/inse/models/publishers_list_response.py rename to service/src/main/inse/models/openalex/publishers_list_response.py index 5b35bc39..1dc91eab 100644 --- a/service/src/main/inse/models/publishers_list_response.py +++ b/service/src/main/inse/models/openalex/publishers_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.group_by_result import GroupByResult -from inse.models.meta import Meta -from inse.models.publisher import Publisher +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.meta import Meta +from inse.models.openalex.publisher import Publisher from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/rate_limit_response.py b/service/src/main/inse/models/openalex/rate_limit_response.py similarity index 97% rename from service/src/main/inse/models/rate_limit_response.py rename to service/src/main/inse/models/openalex/rate_limit_response.py index 50be4eb1..2508594b 100644 --- a/service/src/main/inse/models/rate_limit_response.py +++ b/service/src/main/inse/models/openalex/rate_limit_response.py @@ -20,7 +20,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.rate_limit_response_rate_limit import RateLimitResponseRateLimit +from inse.models.openalex.rate_limit_response_rate_limit import RateLimitResponseRateLimit from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/rate_limit_response_rate_limit.py b/service/src/main/inse/models/openalex/rate_limit_response_rate_limit.py similarity index 97% rename from service/src/main/inse/models/rate_limit_response_rate_limit.py rename to service/src/main/inse/models/openalex/rate_limit_response_rate_limit.py index 6263afbd..324aee1d 100644 --- a/service/src/main/inse/models/rate_limit_response_rate_limit.py +++ b/service/src/main/inse/models/openalex/rate_limit_response_rate_limit.py @@ -21,7 +21,7 @@ import json from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt from typing import Any, ClassVar, Dict, List, Optional, Union -from inse.models.rate_limit_response_rate_limit_endpoint_costs_usd import RateLimitResponseRateLimitEndpointCostsUsd +from inse.models.openalex.rate_limit_response_rate_limit_endpoint_costs_usd import RateLimitResponseRateLimitEndpointCostsUsd from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/rate_limit_response_rate_limit_endpoint_costs_usd.py b/service/src/main/inse/models/openalex/rate_limit_response_rate_limit_endpoint_costs_usd.py similarity index 100% rename from service/src/main/inse/models/rate_limit_response_rate_limit_endpoint_costs_usd.py rename to service/src/main/inse/models/openalex/rate_limit_response_rate_limit_endpoint_costs_usd.py diff --git a/service/src/main/inse/models/sdg.py b/service/src/main/inse/models/openalex/sdg.py similarity index 98% rename from service/src/main/inse/models/sdg.py rename to service/src/main/inse/models/openalex/sdg.py index c69fc388..64180e96 100644 --- a/service/src/main/inse/models/sdg.py +++ b/service/src/main/inse/models/openalex/sdg.py @@ -21,7 +21,7 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.sdg_ids import SdgIds +from inse.models.openalex.sdg_ids import SdgIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/sdg_ids.py b/service/src/main/inse/models/openalex/sdg_ids.py similarity index 100% rename from service/src/main/inse/models/sdg_ids.py rename to service/src/main/inse/models/openalex/sdg_ids.py diff --git a/service/src/main/inse/models/sdgs_list_response.py b/service/src/main/inse/models/openalex/sdgs_list_response.py similarity index 97% rename from service/src/main/inse/models/sdgs_list_response.py rename to service/src/main/inse/models/openalex/sdgs_list_response.py index 5d8d4631..f2b680b2 100644 --- a/service/src/main/inse/models/sdgs_list_response.py +++ b/service/src/main/inse/models/openalex/sdgs_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.meta import Meta -from inse.models.sdg import Sdg +from inse.models.openalex.meta import Meta +from inse.models.openalex.sdg import Sdg from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/source.py b/service/src/main/inse/models/openalex/source.py similarity index 97% rename from service/src/main/inse/models/source.py rename to service/src/main/inse/models/openalex/source.py index 8d89286d..bdfefdf3 100644 --- a/service/src/main/inse/models/source.py +++ b/service/src/main/inse/models/openalex/source.py @@ -21,9 +21,9 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from inse.models.author_counts_by_year_inner import AuthorCountsByYearInner -from inse.models.author_summary_stats import AuthorSummaryStats -from inse.models.source_ids import SourceIds +from inse.models.openalex.author_counts_by_year_inner import AuthorCountsByYearInner +from inse.models.openalex.author_summary_stats import AuthorSummaryStats +from inse.models.openalex.source_ids import SourceIds from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/source_ids.py b/service/src/main/inse/models/openalex/source_ids.py similarity index 100% rename from service/src/main/inse/models/source_ids.py rename to service/src/main/inse/models/openalex/source_ids.py diff --git a/service/src/main/inse/models/source_type.py b/service/src/main/inse/models/openalex/source_type.py similarity index 100% rename from service/src/main/inse/models/source_type.py rename to service/src/main/inse/models/openalex/source_type.py diff --git a/service/src/main/inse/models/source_types_list_response.py b/service/src/main/inse/models/openalex/source_types_list_response.py similarity index 97% rename from service/src/main/inse/models/source_types_list_response.py rename to service/src/main/inse/models/openalex/source_types_list_response.py index 95fe9419..9f2f552c 100644 --- a/service/src/main/inse/models/source_types_list_response.py +++ b/service/src/main/inse/models/openalex/source_types_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.meta import Meta -from inse.models.source_type import SourceType +from inse.models.openalex.meta import Meta +from inse.models.openalex.source_type import SourceType from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/sources_list_response.py b/service/src/main/inse/models/openalex/sources_list_response.py similarity index 96% rename from service/src/main/inse/models/sources_list_response.py rename to service/src/main/inse/models/openalex/sources_list_response.py index c90c9c9f..a9d1710e 100644 --- a/service/src/main/inse/models/sources_list_response.py +++ b/service/src/main/inse/models/openalex/sources_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.group_by_result import GroupByResult -from inse.models.meta import Meta -from inse.models.source import Source +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.meta import Meta +from inse.models.openalex.source import Source from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/subfield.py b/service/src/main/inse/models/openalex/subfield.py similarity index 96% rename from service/src/main/inse/models/subfield.py rename to service/src/main/inse/models/openalex/subfield.py index b5976edb..b4edd67c 100644 --- a/service/src/main/inse/models/subfield.py +++ b/service/src/main/inse/models/openalex/subfield.py @@ -21,10 +21,10 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.domain_fields_inner import DomainFieldsInner -from inse.models.domain_ids import DomainIds -from inse.models.subfield_domain import SubfieldDomain -from inse.models.subfield_field import SubfieldField +from inse.models.openalex.domain_fields_inner import DomainFieldsInner +from inse.models.openalex.domain_ids import DomainIds +from inse.models.openalex.subfield_domain import SubfieldDomain +from inse.models.openalex.subfield_field import SubfieldField from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/subfield_domain.py b/service/src/main/inse/models/openalex/subfield_domain.py similarity index 100% rename from service/src/main/inse/models/subfield_domain.py rename to service/src/main/inse/models/openalex/subfield_domain.py diff --git a/service/src/main/inse/models/subfield_field.py b/service/src/main/inse/models/openalex/subfield_field.py similarity index 100% rename from service/src/main/inse/models/subfield_field.py rename to service/src/main/inse/models/openalex/subfield_field.py diff --git a/service/src/main/inse/models/subfields_list_response.py b/service/src/main/inse/models/openalex/subfields_list_response.py similarity index 97% rename from service/src/main/inse/models/subfields_list_response.py rename to service/src/main/inse/models/openalex/subfields_list_response.py index 73b66906..d3721a4d 100644 --- a/service/src/main/inse/models/subfields_list_response.py +++ b/service/src/main/inse/models/openalex/subfields_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.meta import Meta -from inse.models.subfield import Subfield +from inse.models.openalex.meta import Meta +from inse.models.openalex.subfield import Subfield from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/text_classification_response.py b/service/src/main/inse/models/openalex/text_classification_response.py similarity index 95% rename from service/src/main/inse/models/text_classification_response.py rename to service/src/main/inse/models/openalex/text_classification_response.py index ea08d0df..e72b2ba6 100644 --- a/service/src/main/inse/models/text_classification_response.py +++ b/service/src/main/inse/models/openalex/text_classification_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.text_classification_response_meta import TextClassificationResponseMeta -from inse.models.work_topic import WorkTopic +from inse.models.openalex.text_classification_response_meta import TextClassificationResponseMeta +from inse.models.openalex.work_topic import WorkTopic from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/text_classification_response_meta.py b/service/src/main/inse/models/openalex/text_classification_response_meta.py similarity index 100% rename from service/src/main/inse/models/text_classification_response_meta.py rename to service/src/main/inse/models/openalex/text_classification_response_meta.py diff --git a/service/src/main/inse/models/topic.py b/service/src/main/inse/models/openalex/topic.py similarity index 95% rename from service/src/main/inse/models/topic.py rename to service/src/main/inse/models/openalex/topic.py index b26c2e76..da547b58 100644 --- a/service/src/main/inse/models/topic.py +++ b/service/src/main/inse/models/openalex/topic.py @@ -21,10 +21,10 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from inse.models.topic_domain import TopicDomain -from inse.models.topic_field import TopicField -from inse.models.topic_ids import TopicIds -from inse.models.topic_subfield import TopicSubfield +from inse.models.openalex.topic_domain import TopicDomain +from inse.models.openalex.topic_field import TopicField +from inse.models.openalex.topic_ids import TopicIds +from inse.models.openalex.topic_subfield import TopicSubfield from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/topic_count.py b/service/src/main/inse/models/openalex/topic_count.py similarity index 100% rename from service/src/main/inse/models/topic_count.py rename to service/src/main/inse/models/openalex/topic_count.py diff --git a/service/src/main/inse/models/topic_domain.py b/service/src/main/inse/models/openalex/topic_domain.py similarity index 100% rename from service/src/main/inse/models/topic_domain.py rename to service/src/main/inse/models/openalex/topic_domain.py diff --git a/service/src/main/inse/models/topic_field.py b/service/src/main/inse/models/openalex/topic_field.py similarity index 100% rename from service/src/main/inse/models/topic_field.py rename to service/src/main/inse/models/openalex/topic_field.py diff --git a/service/src/main/inse/models/topic_ids.py b/service/src/main/inse/models/openalex/topic_ids.py similarity index 100% rename from service/src/main/inse/models/topic_ids.py rename to service/src/main/inse/models/openalex/topic_ids.py diff --git a/service/src/main/inse/models/topic_subfield.py b/service/src/main/inse/models/openalex/topic_subfield.py similarity index 100% rename from service/src/main/inse/models/topic_subfield.py rename to service/src/main/inse/models/openalex/topic_subfield.py diff --git a/service/src/main/inse/models/topics_by_time.py b/service/src/main/inse/models/openalex/topics_by_time.py similarity index 92% rename from service/src/main/inse/models/topics_by_time.py rename to service/src/main/inse/models/openalex/topics_by_time.py index d4213640..e02863bb 100644 --- a/service/src/main/inse/models/topics_by_time.py +++ b/service/src/main/inse/models/openalex/topics_by_time.py @@ -2,7 +2,7 @@ from typing import List from pydantic import BaseModel, Field -from inse.models.topics_by_year import TopicsByYear +from inse.models.openalex.topics_by_year import TopicsByYear class TopicsByTime(BaseModel): diff --git a/service/src/main/inse/models/topics_by_year.py b/service/src/main/inse/models/openalex/topics_by_year.py similarity index 89% rename from service/src/main/inse/models/topics_by_year.py rename to service/src/main/inse/models/openalex/topics_by_year.py index 91efe7c6..48fd0f6e 100644 --- a/service/src/main/inse/models/topics_by_year.py +++ b/service/src/main/inse/models/openalex/topics_by_year.py @@ -2,7 +2,7 @@ from typing import List from pydantic import BaseModel, Field -from inse.models.topic_count import TopicCount +from inse.models.openalex.topic_count import TopicCount class TopicsByYear(BaseModel): diff --git a/service/src/main/inse/models/topics_list_response.py b/service/src/main/inse/models/openalex/topics_list_response.py similarity index 96% rename from service/src/main/inse/models/topics_list_response.py rename to service/src/main/inse/models/openalex/topics_list_response.py index 5cd3d5bf..7ea968cc 100644 --- a/service/src/main/inse/models/topics_list_response.py +++ b/service/src/main/inse/models/openalex/topics_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.group_by_result import GroupByResult -from inse.models.meta import Meta -from inse.models.topic import Topic +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.meta import Meta +from inse.models.openalex.topic import Topic from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/ude_organization.py b/service/src/main/inse/models/openalex/ude_organization.py similarity index 100% rename from service/src/main/inse/models/ude_organization.py rename to service/src/main/inse/models/openalex/ude_organization.py diff --git a/service/src/main/inse/models/work.py b/service/src/main/inse/models/openalex/work.py similarity index 94% rename from service/src/main/inse/models/work.py rename to service/src/main/inse/models/openalex/work.py index a116b540..4661f664 100644 --- a/service/src/main/inse/models/work.py +++ b/service/src/main/inse/models/openalex/work.py @@ -21,21 +21,21 @@ import json from datetime import date, datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from inse.models.authorship import Authorship -from inse.models.award import Award -from inse.models.dehydrated_funder import DehydratedFunder -from inse.models.location import Location -from inse.models.open_access import OpenAccess -from inse.models.work_biblio import WorkBiblio -from inse.models.work_citation_normalized_percentile import WorkCitationNormalizedPercentile -from inse.models.work_cited_by_percentile_year import WorkCitedByPercentileYear -from inse.models.work_counts_by_year_inner import WorkCountsByYearInner -from inse.models.work_has_content import WorkHasContent -from inse.models.work_ids import WorkIds -from inse.models.work_keyword import WorkKeyword -from inse.models.work_mesh_inner import WorkMeshInner -from inse.models.work_sustainable_development_goals_inner import WorkSustainableDevelopmentGoalsInner -from inse.models.work_topic import WorkTopic +from inse.models.openalex.authorship import Authorship +from inse.models.openalex.award import Award +from inse.models.openalex.dehydrated_funder import DehydratedFunder +from inse.models.openalex.location import Location +from inse.models.openalex.open_access import OpenAccess +from inse.models.openalex.work_biblio import WorkBiblio +from inse.models.openalex.work_citation_normalized_percentile import WorkCitationNormalizedPercentile +from inse.models.openalex.work_cited_by_percentile_year import WorkCitedByPercentileYear +from inse.models.openalex.work_counts_by_year_inner import WorkCountsByYearInner +from inse.models.openalex.work_has_content import WorkHasContent +from inse.models.openalex.work_ids import WorkIds +from inse.models.openalex.work_keyword import WorkKeyword +from inse.models.openalex.work_mesh_inner import WorkMeshInner +from inse.models.openalex.work_sustainable_development_goals_inner import WorkSustainableDevelopmentGoalsInner +from inse.models.openalex.work_topic import WorkTopic from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/work_biblio.py b/service/src/main/inse/models/openalex/work_biblio.py similarity index 100% rename from service/src/main/inse/models/work_biblio.py rename to service/src/main/inse/models/openalex/work_biblio.py diff --git a/service/src/main/inse/models/work_citation_normalized_percentile.py b/service/src/main/inse/models/openalex/work_citation_normalized_percentile.py similarity index 100% rename from service/src/main/inse/models/work_citation_normalized_percentile.py rename to service/src/main/inse/models/openalex/work_citation_normalized_percentile.py diff --git a/service/src/main/inse/models/work_cited_by_percentile_year.py b/service/src/main/inse/models/openalex/work_cited_by_percentile_year.py similarity index 100% rename from service/src/main/inse/models/work_cited_by_percentile_year.py rename to service/src/main/inse/models/openalex/work_cited_by_percentile_year.py diff --git a/service/src/main/inse/models/work_counts_by_year_inner.py b/service/src/main/inse/models/openalex/work_counts_by_year_inner.py similarity index 100% rename from service/src/main/inse/models/work_counts_by_year_inner.py rename to service/src/main/inse/models/openalex/work_counts_by_year_inner.py diff --git a/service/src/main/inse/models/work_has_content.py b/service/src/main/inse/models/openalex/work_has_content.py similarity index 100% rename from service/src/main/inse/models/work_has_content.py rename to service/src/main/inse/models/openalex/work_has_content.py diff --git a/service/src/main/inse/models/work_ids.py b/service/src/main/inse/models/openalex/work_ids.py similarity index 100% rename from service/src/main/inse/models/work_ids.py rename to service/src/main/inse/models/openalex/work_ids.py diff --git a/service/src/main/inse/models/work_keyword.py b/service/src/main/inse/models/openalex/work_keyword.py similarity index 100% rename from service/src/main/inse/models/work_keyword.py rename to service/src/main/inse/models/openalex/work_keyword.py diff --git a/service/src/main/inse/models/work_mesh_inner.py b/service/src/main/inse/models/openalex/work_mesh_inner.py similarity index 100% rename from service/src/main/inse/models/work_mesh_inner.py rename to service/src/main/inse/models/openalex/work_mesh_inner.py diff --git a/service/src/main/inse/models/work_page.py b/service/src/main/inse/models/openalex/work_page.py similarity index 91% rename from service/src/main/inse/models/work_page.py rename to service/src/main/inse/models/openalex/work_page.py index 6cd51282..f9b3b6f7 100644 --- a/service/src/main/inse/models/work_page.py +++ b/service/src/main/inse/models/openalex/work_page.py @@ -2,7 +2,7 @@ from typing import List from pydantic import BaseModel, Field -from inse.models.work import Work +from inse.models.openalex.work import Work class WorkPage(BaseModel): diff --git a/service/src/main/inse/models/work_sustainable_development_goals_inner.py b/service/src/main/inse/models/openalex/work_sustainable_development_goals_inner.py similarity index 100% rename from service/src/main/inse/models/work_sustainable_development_goals_inner.py rename to service/src/main/inse/models/openalex/work_sustainable_development_goals_inner.py diff --git a/service/src/main/inse/models/work_topic.py b/service/src/main/inse/models/openalex/work_topic.py similarity index 95% rename from service/src/main/inse/models/work_topic.py rename to service/src/main/inse/models/openalex/work_topic.py index ac9a6c3d..c4c6fce6 100644 --- a/service/src/main/inse/models/work_topic.py +++ b/service/src/main/inse/models/openalex/work_topic.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union -from inse.models.work_topic_domain import WorkTopicDomain -from inse.models.work_topic_field import WorkTopicField -from inse.models.work_topic_subfield import WorkTopicSubfield +from inse.models.openalex.work_topic_domain import WorkTopicDomain +from inse.models.openalex.work_topic_field import WorkTopicField +from inse.models.openalex.work_topic_subfield import WorkTopicSubfield from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/work_topic_domain.py b/service/src/main/inse/models/openalex/work_topic_domain.py similarity index 100% rename from service/src/main/inse/models/work_topic_domain.py rename to service/src/main/inse/models/openalex/work_topic_domain.py diff --git a/service/src/main/inse/models/work_topic_field.py b/service/src/main/inse/models/openalex/work_topic_field.py similarity index 100% rename from service/src/main/inse/models/work_topic_field.py rename to service/src/main/inse/models/openalex/work_topic_field.py diff --git a/service/src/main/inse/models/work_topic_subfield.py b/service/src/main/inse/models/openalex/work_topic_subfield.py similarity index 100% rename from service/src/main/inse/models/work_topic_subfield.py rename to service/src/main/inse/models/openalex/work_topic_subfield.py diff --git a/service/src/main/inse/models/work_type.py b/service/src/main/inse/models/openalex/work_type.py similarity index 100% rename from service/src/main/inse/models/work_type.py rename to service/src/main/inse/models/openalex/work_type.py diff --git a/service/src/main/inse/models/work_types_list_response.py b/service/src/main/inse/models/openalex/work_types_list_response.py similarity index 97% rename from service/src/main/inse/models/work_types_list_response.py rename to service/src/main/inse/models/openalex/work_types_list_response.py index bdd7e251..5acec728 100644 --- a/service/src/main/inse/models/work_types_list_response.py +++ b/service/src/main/inse/models/openalex/work_types_list_response.py @@ -20,8 +20,8 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.meta import Meta -from inse.models.work_type import WorkType +from inse.models.openalex.meta import Meta +from inse.models.openalex.work_type import WorkType from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/works_list_response.py b/service/src/main/inse/models/openalex/works_list_response.py similarity index 96% rename from service/src/main/inse/models/works_list_response.py rename to service/src/main/inse/models/openalex/works_list_response.py index 3c2af748..c73cb975 100644 --- a/service/src/main/inse/models/works_list_response.py +++ b/service/src/main/inse/models/openalex/works_list_response.py @@ -20,9 +20,9 @@ import json from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from inse.models.group_by_result import GroupByResult -from inse.models.meta import Meta -from inse.models.work import Work +from inse.models.openalex.group_by_result import GroupByResult +from inse.models.openalex.meta import Meta +from inse.models.openalex.work import Work from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/patents_epo/epo_document.py b/service/src/main/inse/models/patents_epo/epo_document.py new file mode 100644 index 00000000..e4f29410 --- /dev/null +++ b/service/src/main/inse/models/patents_epo/epo_document.py @@ -0,0 +1,264 @@ +# coding: utf-8 + +""" + EPO Index Backend Models + + Pydantic models for the Elasticsearch \"epo_index_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.inventor_nested import InventorNested +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class EpoDocument(BaseModel): + """ + Main document model for the epo_index_1.0 index. + """ # noqa: E501 + abstract: Optional[StrictStr] = None + abstract_lang: Optional[StrictStr] = None + action: Optional[StrictStr] = None + applicants: Optional[StrictStr] = None + applicants_adr: Optional[StrictStr] = None + applicants_name: Optional[StrictStr] = None + applicants_name_text: Optional[StrictStr] = None + application_filing_date: Optional[StrictStr] = None + application_number: Optional[StrictStr] = None + claims: Optional[StrictStr] = None + claims_de: Optional[StrictStr] = None + claims_en: Optional[StrictStr] = None + claims_fr: Optional[StrictStr] = None + var_class: Optional[StrictStr] = Field(default=None, alias="class") + classification_value: Optional[StrictStr] = None + country: Optional[StrictStr] = None + cpc: Optional[StrictStr] = None + cpc_text: Optional[StrictStr] = None + data1: Optional[StrictStr] = None + data2: Optional[StrictStr] = None + date_of_despatch_of_1st_exam_report: Optional[StrictStr] = None + date_of_patent_maintained_as_amended: Optional[StrictStr] = None + date_of_request_for_examination: Optional[StrictStr] = None + date_of_resumption_of_proceedings: Optional[StrictStr] = None + date_of_suspension_interruption: Optional[StrictStr] = None + date_publication: Optional[StrictInt] = None + date_publication_year: Optional[StrictInt] = None + description_header: Optional[StrictStr] = None + description_lang: Optional[StrictStr] = None + description_paragraph: Optional[StrictStr] = None + description_text: Optional[StrictStr] = None + doc_number: Optional[StrictStr] = None + extended_states: Optional[StrictStr] = None + extended_states_text: Optional[StrictStr] = None + indicates_the_type_of_suspension_or_interruption: Optional[StrictStr] = None + inventors: Optional[StrictStr] = None + inventors_adr: Optional[StrictStr] = None + inventors_name: Optional[StrictStr] = None + inventors_name_nested: Optional[List[InventorNested]] = None + inventors_name_text: Optional[StrictStr] = None + ipc: Optional[StrictStr] = None + ipc_text: Optional[StrictStr] = None + ipc_text_without: Optional[StrictStr] = None + ipc_without: Optional[StrictStr] = None + keywords_and_descriptors: Optional[StrictStr] = None + kind: Optional[StrictStr] = None + level: Optional[StrictStr] = None + linked_indexing_code: Optional[StrictStr] = None + main_group: Optional[StrictStr] = None + non_obligatory_suppl_class: Optional[StrictStr] = None + office: Optional[StrictStr] = None + position: Optional[StrictStr] = None + representatives: Optional[StrictStr] = None + representatives_adr: Optional[StrictStr] = None + representatives_name: Optional[StrictStr] = None + representatives_name_text: Optional[StrictStr] = None + request_for_conversion_to_natl_appl_country: Optional[StrictStr] = None + request_for_conversion_to_natl_appl_date: Optional[StrictStr] = None + section: Optional[StrictStr] = None + srep_abs_approval: Optional[StrictStr] = None + srep_abstract: Optional[StrictStr] = None + srep_date_produced: Optional[StrictStr] = None + srep_established: Optional[StrictStr] = None + srep_file_reference_id: Optional[StrictStr] = None + srep_invention_title: Optional[StrictStr] = None + srep_invention_title_approval: Optional[StrictStr] = None + srep_lang: Optional[StrictStr] = None + srep_office: Optional[StrictStr] = None + srep_protest_fees: Optional[StrictStr] = None + srep_status: Optional[StrictStr] = None + srep_type: Optional[StrictStr] = None + srep_unity_of_invention: Optional[StrictStr] = None + srep_unity_of_invention_fee_1: Optional[StrictStr] = None + srep_unity_of_invention_fee_2: Optional[StrictStr] = None + srep_unity_of_invention_fee_3: Optional[StrictStr] = None + srep_unity_of_invention_fee_4: Optional[StrictStr] = None + states: Optional[StrictStr] = None + states_text: Optional[StrictStr] = None + sub_group: Optional[StrictStr] = None + subclass: Optional[StrictStr] = None + title_de: Optional[StrictStr] = None + title_en: Optional[StrictStr] = None + title_fr: Optional[StrictStr] = None + unlinked_indexing_code: Optional[StrictStr] = None + version: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["abstract", "abstract_lang", "action", "applicants", "applicants_adr", "applicants_name", "applicants_name_text", "application_filing_date", "application_number", "claims", "claims_de", "claims_en", "claims_fr", "class", "classification_value", "country", "cpc", "cpc_text", "data1", "data2", "date_of_despatch_of_1st_exam_report", "date_of_patent_maintained_as_amended", "date_of_request_for_examination", "date_of_resumption_of_proceedings", "date_of_suspension_interruption", "date_publication", "date_publication_year", "description_header", "description_lang", "description_paragraph", "description_text", "doc_number", "extended_states", "extended_states_text", "indicates_the_type_of_suspension_or_interruption", "inventors", "inventors_adr", "inventors_name", "inventors_name_nested", "inventors_name_text", "ipc", "ipc_text", "ipc_text_without", "ipc_without", "keywords_and_descriptors", "kind", "level", "linked_indexing_code", "main_group", "non_obligatory_suppl_class", "office", "position", "representatives", "representatives_adr", "representatives_name", "representatives_name_text", "request_for_conversion_to_natl_appl_country", "request_for_conversion_to_natl_appl_date", "section", "srep_abs_approval", "srep_abstract", "srep_date_produced", "srep_established", "srep_file_reference_id", "srep_invention_title", "srep_invention_title_approval", "srep_lang", "srep_office", "srep_protest_fees", "srep_status", "srep_type", "srep_unity_of_invention", "srep_unity_of_invention_fee_1", "srep_unity_of_invention_fee_2", "srep_unity_of_invention_fee_3", "srep_unity_of_invention_fee_4", "states", "states_text", "sub_group", "subclass", "title_de", "title_en", "title_fr", "unlinked_indexing_code", "version"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EpoDocument from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in inventors_name_nested (list) + _items = [] + if self.inventors_name_nested: + for _item_inventors_name_nested in self.inventors_name_nested: + if _item_inventors_name_nested: + _items.append(_item_inventors_name_nested.to_dict()) + _dict['inventors_name_nested'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EpoDocument from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "abstract": obj.get("abstract"), + "abstract_lang": obj.get("abstract_lang"), + "action": obj.get("action"), + "applicants": obj.get("applicants"), + "applicants_adr": obj.get("applicants_adr"), + "applicants_name": obj.get("applicants_name"), + "applicants_name_text": obj.get("applicants_name_text"), + "application_filing_date": obj.get("application_filing_date"), + "application_number": obj.get("application_number"), + "claims": obj.get("claims"), + "claims_de": obj.get("claims_de"), + "claims_en": obj.get("claims_en"), + "claims_fr": obj.get("claims_fr"), + "class": obj.get("class"), + "classification_value": obj.get("classification_value"), + "country": obj.get("country"), + "cpc": obj.get("cpc"), + "cpc_text": obj.get("cpc_text"), + "data1": obj.get("data1"), + "data2": obj.get("data2"), + "date_of_despatch_of_1st_exam_report": obj.get("date_of_despatch_of_1st_exam_report"), + "date_of_patent_maintained_as_amended": obj.get("date_of_patent_maintained_as_amended"), + "date_of_request_for_examination": obj.get("date_of_request_for_examination"), + "date_of_resumption_of_proceedings": obj.get("date_of_resumption_of_proceedings"), + "date_of_suspension_interruption": obj.get("date_of_suspension_interruption"), + "date_publication": obj.get("date_publication"), + "date_publication_year": obj.get("date_publication_year"), + "description_header": obj.get("description_header"), + "description_lang": obj.get("description_lang"), + "description_paragraph": obj.get("description_paragraph"), + "description_text": obj.get("description_text"), + "doc_number": obj.get("doc_number"), + "extended_states": obj.get("extended_states"), + "extended_states_text": obj.get("extended_states_text"), + "indicates_the_type_of_suspension_or_interruption": obj.get("indicates_the_type_of_suspension_or_interruption"), + "inventors": obj.get("inventors"), + "inventors_adr": obj.get("inventors_adr"), + "inventors_name": obj.get("inventors_name"), + "inventors_name_nested": [InventorNested.from_dict(_item) for _item in obj["inventors_name_nested"]] if obj.get("inventors_name_nested") is not None else None, + "inventors_name_text": obj.get("inventors_name_text"), + "ipc": obj.get("ipc"), + "ipc_text": obj.get("ipc_text"), + "ipc_text_without": obj.get("ipc_text_without"), + "ipc_without": obj.get("ipc_without"), + "keywords_and_descriptors": obj.get("keywords_and_descriptors"), + "kind": obj.get("kind"), + "level": obj.get("level"), + "linked_indexing_code": obj.get("linked_indexing_code"), + "main_group": obj.get("main_group"), + "non_obligatory_suppl_class": obj.get("non_obligatory_suppl_class"), + "office": obj.get("office"), + "position": obj.get("position"), + "representatives": obj.get("representatives"), + "representatives_adr": obj.get("representatives_adr"), + "representatives_name": obj.get("representatives_name"), + "representatives_name_text": obj.get("representatives_name_text"), + "request_for_conversion_to_natl_appl_country": obj.get("request_for_conversion_to_natl_appl_country"), + "request_for_conversion_to_natl_appl_date": obj.get("request_for_conversion_to_natl_appl_date"), + "section": obj.get("section"), + "srep_abs_approval": obj.get("srep_abs_approval"), + "srep_abstract": obj.get("srep_abstract"), + "srep_date_produced": obj.get("srep_date_produced"), + "srep_established": obj.get("srep_established"), + "srep_file_reference_id": obj.get("srep_file_reference_id"), + "srep_invention_title": obj.get("srep_invention_title"), + "srep_invention_title_approval": obj.get("srep_invention_title_approval"), + "srep_lang": obj.get("srep_lang"), + "srep_office": obj.get("srep_office"), + "srep_protest_fees": obj.get("srep_protest_fees"), + "srep_status": obj.get("srep_status"), + "srep_type": obj.get("srep_type"), + "srep_unity_of_invention": obj.get("srep_unity_of_invention"), + "srep_unity_of_invention_fee_1": obj.get("srep_unity_of_invention_fee_1"), + "srep_unity_of_invention_fee_2": obj.get("srep_unity_of_invention_fee_2"), + "srep_unity_of_invention_fee_3": obj.get("srep_unity_of_invention_fee_3"), + "srep_unity_of_invention_fee_4": obj.get("srep_unity_of_invention_fee_4"), + "states": obj.get("states"), + "states_text": obj.get("states_text"), + "sub_group": obj.get("sub_group"), + "subclass": obj.get("subclass"), + "title_de": obj.get("title_de"), + "title_en": obj.get("title_en"), + "title_fr": obj.get("title_fr"), + "unlinked_indexing_code": obj.get("unlinked_indexing_code"), + "version": obj.get("version") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_epo/inventor_nested.py b/service/src/main/inse/models/patents_epo/inventor_nested.py new file mode 100644 index 00000000..4ff818cb --- /dev/null +++ b/service/src/main/inse/models/patents_epo/inventor_nested.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + EPO Index Backend Models + + Pydantic models for the Elasticsearch \"epo_index_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InventorNested(BaseModel): + """ + Nested inventor name object. + """ # noqa: E501 + inventor: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["inventor"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InventorNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InventorNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inventor": obj.get("inventor") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/agent_nested.py b/service/src/main/inse/models/patents_uspto/agent_nested.py new file mode 100644 index 00000000..d2ed80f9 --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/agent_nested.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AgentNested(BaseModel): + """ + Nested object for patent agents. + """ # noqa: E501 + inventor: Optional[StrictStr] = None + name: Optional[StrictStr] = None + org: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["inventor", "name", "org"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AgentNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AgentNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inventor": obj.get("inventor"), + "name": obj.get("name"), + "org": obj.get("org") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/applicant_nested.py b/service/src/main/inse/models/patents_uspto/applicant_nested.py new file mode 100644 index 00000000..5910b390 --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/applicant_nested.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ApplicantNested(BaseModel): + """ + Nested object for patent applicants. + """ # noqa: E501 + address: Optional[StrictStr] = None + inventor: Optional[StrictStr] = None + name: Optional[StrictStr] = None + org: Optional[StrictStr] = None + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["address", "inventor", "name", "org", "type"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ApplicantNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ApplicantNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "inventor": obj.get("inventor"), + "name": obj.get("name"), + "org": obj.get("org"), + "type": obj.get("type") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/assistant_examiner_nested.py b/service/src/main/inse/models/patents_uspto/assistant_examiner_nested.py new file mode 100644 index 00000000..ffde6099 --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/assistant_examiner_nested.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class AssistantExaminerNested(BaseModel): + """ + Nested object for assistant examiners. + """ # noqa: E501 + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AssistantExaminerNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AssistantExaminerNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/citation_object.py b/service/src/main/inse/models/patents_uspto/citation_object.py new file mode 100644 index 00000000..80d0e75f --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/citation_object.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CitationObject(BaseModel): + """ + Object structure for patent citations. + """ # noqa: E501 + country: Optional[StrictStr] = None + var_date: Optional[StrictStr] = Field(default=None, alias="date") + doc_number: Optional[StrictStr] = None + kind: Optional[StrictStr] = None + main_classification: Optional[StrictStr] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["country", "date", "doc_number", "kind", "main_classification", "name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CitationObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CitationObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "country": obj.get("country"), + "date": obj.get("date"), + "doc_number": obj.get("doc_number"), + "kind": obj.get("kind"), + "main_classification": obj.get("main_classification"), + "name": obj.get("name") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/inventor_nested.py b/service/src/main/inse/models/patents_uspto/inventor_nested.py new file mode 100644 index 00000000..accdeb7b --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/inventor_nested.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class InventorNested(BaseModel): + """ + Nested object for inventors. + """ # noqa: E501 + address: Optional[StrictStr] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["address", "name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of InventorNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of InventorNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "name": obj.get("name") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/primary_examiner_nested.py b/service/src/main/inse/models/patents_uspto/primary_examiner_nested.py new file mode 100644 index 00000000..2361488e --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/primary_examiner_nested.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class PrimaryExaminerNested(BaseModel): + """ + Nested object for primary examiners. + """ # noqa: E501 + department: Optional[StrictStr] = None + inventor: Optional[StrictStr] = None + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["department", "inventor", "name"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PrimaryExaminerNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PrimaryExaminerNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "department": obj.get("department"), + "inventor": obj.get("inventor"), + "name": obj.get("name") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/priority_claim_nested.py b/service/src/main/inse/models/patents_uspto/priority_claim_nested.py new file mode 100644 index 00000000..0685ba08 --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/priority_claim_nested.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class PriorityClaimNested(BaseModel): + """ + Nested object for priority claims. + """ # noqa: E501 + country: Optional[StrictStr] = None + var_date: Optional[StrictStr] = Field(default=None, alias="date") + inventor: Optional[StrictStr] = None + number: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["country", "date", "inventor", "number"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PriorityClaimNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PriorityClaimNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "country": obj.get("country"), + "date": obj.get("date"), + "inventor": obj.get("inventor"), + "number": obj.get("number") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/related_documents_object.py b/service/src/main/inse/models/patents_uspto/related_documents_object.py new file mode 100644 index 00000000..0df5d267 --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/related_documents_object.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class RelatedDocumentsObject(BaseModel): + """ + Object structure for related parent and child documents. + """ # noqa: E501 + child_country: Optional[StrictStr] = None + child_date: Optional[StrictStr] = None + child_doc_number: Optional[StrictStr] = None + parent_country: Optional[StrictStr] = None + parent_date: Optional[StrictStr] = None + parent_doc_number: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["child_country", "child_date", "child_doc_number", "parent_country", "parent_date", "parent_doc_number"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RelatedDocumentsObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RelatedDocumentsObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "child_country": obj.get("child_country"), + "child_date": obj.get("child_date"), + "child_doc_number": obj.get("child_doc_number"), + "parent_country": obj.get("parent_country"), + "parent_date": obj.get("parent_date"), + "parent_doc_number": obj.get("parent_doc_number") + }) + return _obj + + diff --git a/service/src/main/inse/models/patents_uspto/uspto_patent.py b/service/src/main/inse/models/patents_uspto/uspto_patent.py new file mode 100644 index 00000000..cc1c05d0 --- /dev/null +++ b/service/src/main/inse/models/patents_uspto/uspto_patent.py @@ -0,0 +1,358 @@ +# coding: utf-8 + +""" + USPTO Patents Index Backend Models + + Pydantic models for the Elasticsearch \"uspto_patents_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.agent_nested import AgentNested +from db_models.models.applicant_nested import ApplicantNested +from db_models.models.assistant_examiner_nested import AssistantExaminerNested +from db_models.models.citation_object import CitationObject +from db_models.models.inventor_nested import InventorNested +from db_models.models.primary_examiner_nested import PrimaryExaminerNested +from db_models.models.priority_claim_nested import PriorityClaimNested +from db_models.models.related_documents_object import RelatedDocumentsObject +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UsptoPatent(BaseModel): + """ + Main document model for the uspto_patents_1.0 index. + """ # noqa: E501 + abstract: Optional[StrictStr] = None + agents: Optional[List[AgentNested]] = None + agents_names: Optional[StrictStr] = None + agents_names_text: Optional[StrictStr] = None + agents_orgs: Optional[StrictStr] = None + agents_orgs_text: Optional[StrictStr] = None + applicants: Optional[List[ApplicantNested]] = None + applicants_addresses: Optional[StrictStr] = None + applicants_addresses_text: Optional[StrictStr] = None + applicants_names: Optional[StrictStr] = None + applicants_names_text: Optional[StrictStr] = None + applicants_orgs: Optional[StrictStr] = None + applicants_orgs_text: Optional[StrictStr] = None + application_country: Optional[StrictStr] = None + application_date: Optional[StrictInt] = None + application_number: Optional[StrictStr] = None + application_type: Optional[StrictStr] = None + assignees: Optional[StrictStr] = None + assignees_addresses: Optional[StrictStr] = None + assignees_addresses_text: Optional[StrictStr] = None + assignees_orgs: Optional[StrictStr] = None + assignees_orgs_text: Optional[StrictStr] = None + assignees_text: Optional[StrictStr] = None + assistant_examiners: Optional[List[AssistantExaminerNested]] = None + assistant_examiners_departments: Optional[StrictStr] = None + assistant_examiners_departments_text: Optional[StrictStr] = None + assistant_examiners_names: Optional[StrictStr] = None + assistant_examiners_names_text: Optional[StrictStr] = None + citations: Optional[CitationObject] = None + citations_names: Optional[StrictStr] = None + citations_names_text: Optional[StrictStr] = None + claims: Optional[StrictStr] = None + claims_text: Optional[StrictStr] = None + country: Optional[StrictStr] = None + cpc: Optional[StrictStr] = None + cpc_action: Optional[StrictStr] = None + cpc_class: Optional[StrictStr] = None + cpc_classification_value: Optional[StrictStr] = None + cpc_data1: Optional[StrictStr] = None + cpc_data2: Optional[StrictStr] = None + cpc_main_group: Optional[StrictStr] = None + cpc_office: Optional[StrictStr] = None + cpc_position: Optional[StrictStr] = None + cpc_scheme: Optional[StrictStr] = None + cpc_section: Optional[StrictStr] = None + cpc_subclass: Optional[StrictStr] = None + cpc_subgroup: Optional[StrictStr] = None + cpc_text: Optional[StrictStr] = None + cpc_text_without: Optional[StrictStr] = None + cpc_version: Optional[StrictStr] = None + date_produced: Optional[StrictInt] = Field(default=None, alias="date-produced") + date_publ: Optional[StrictInt] = Field(default=None, alias="date-publ") + description_header: Optional[StrictStr] = None + description_paragraph: Optional[StrictStr] = None + description_text: Optional[StrictStr] = None + disclaimer: Optional[StrictStr] = None + dtd_version: Optional[StrictStr] = Field(default=None, alias="dtd-version") + field_of_clasification_cpc: Optional[StrictStr] = None + field_of_clasification_cpc_text: Optional[StrictStr] = None + field_of_clasification_cpc_text_without: Optional[StrictStr] = None + field_of_clasification_uspc: Optional[StrictStr] = None + field_of_clasification_uspc_text: Optional[StrictStr] = None + field_of_clasification_uspc_text_without: Optional[StrictStr] = None + file: Optional[StrictStr] = None + further_classifications: Optional[StrictStr] = None + id: Optional[StrictStr] = None + inventors: Optional[List[InventorNested]] = None + inventors_addresses: Optional[StrictStr] = None + inventors_addresses_text: Optional[StrictStr] = None + inventors_names: Optional[StrictStr] = None + inventors_names_text: Optional[StrictStr] = None + ipcr: Optional[StrictStr] = None + ipcr_action: Optional[StrictStr] = None + ipcr_class: Optional[StrictStr] = None + ipcr_classification_value: Optional[StrictStr] = None + ipcr_data1: Optional[StrictStr] = None + ipcr_data2: Optional[StrictStr] = None + ipcr_level: Optional[StrictStr] = None + ipcr_main_group: Optional[StrictStr] = None + ipcr_office: Optional[StrictStr] = None + ipcr_position: Optional[StrictStr] = None + ipcr_section: Optional[StrictStr] = None + ipcr_subclass: Optional[StrictStr] = None + ipcr_subgroup: Optional[StrictStr] = None + ipcr_text: Optional[StrictStr] = None + ipcr_text_without: Optional[StrictStr] = None + ipcr_version: Optional[StrictStr] = None + lang: Optional[StrictStr] = None + length_of_grant: Optional[StrictInt] = None + loc: Optional[StrictStr] = None + number_of_claims: Optional[StrictInt] = None + primary_examiners: Optional[List[PrimaryExaminerNested]] = None + primary_examiners_departments: Optional[StrictStr] = None + primary_examiners_departments_text: Optional[StrictStr] = None + primary_examiners_names: Optional[StrictStr] = None + primary_examiners_names_text: Optional[StrictStr] = None + priority_claims: Optional[List[PriorityClaimNested]] = None + publication_country: Optional[StrictStr] = None + publication_date: Optional[StrictInt] = None + publication_kind: Optional[StrictStr] = None + publication_number: Optional[StrictStr] = None + publication_year: Optional[StrictInt] = None + related_documents: Optional[RelatedDocumentsObject] = None + series_code: Optional[StrictStr] = None + status: Optional[StrictStr] = None + term_extension: Optional[StrictInt] = None + title: Optional[StrictStr] = None + uspc: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["abstract", "agents", "agents_names", "agents_names_text", "agents_orgs", "agents_orgs_text", "applicants", "applicants_addresses", "applicants_addresses_text", "applicants_names", "applicants_names_text", "applicants_orgs", "applicants_orgs_text", "application_country", "application_date", "application_number", "application_type", "assignees", "assignees_addresses", "assignees_addresses_text", "assignees_orgs", "assignees_orgs_text", "assignees_text", "assistant_examiners", "assistant_examiners_departments", "assistant_examiners_departments_text", "assistant_examiners_names", "assistant_examiners_names_text", "citations", "citations_names", "citations_names_text", "claims", "claims_text", "country", "cpc", "cpc_action", "cpc_class", "cpc_classification_value", "cpc_data1", "cpc_data2", "cpc_main_group", "cpc_office", "cpc_position", "cpc_scheme", "cpc_section", "cpc_subclass", "cpc_subgroup", "cpc_text", "cpc_text_without", "cpc_version", "date-produced", "date-publ", "description_header", "description_paragraph", "description_text", "disclaimer", "dtd-version", "field_of_clasification_cpc", "field_of_clasification_cpc_text", "field_of_clasification_cpc_text_without", "field_of_clasification_uspc", "field_of_clasification_uspc_text", "field_of_clasification_uspc_text_without", "file", "further_classifications", "id", "inventors", "inventors_addresses", "inventors_addresses_text", "inventors_names", "inventors_names_text", "ipcr", "ipcr_action", "ipcr_class", "ipcr_classification_value", "ipcr_data1", "ipcr_data2", "ipcr_level", "ipcr_main_group", "ipcr_office", "ipcr_position", "ipcr_section", "ipcr_subclass", "ipcr_subgroup", "ipcr_text", "ipcr_text_without", "ipcr_version", "lang", "length_of_grant", "loc", "number_of_claims", "primary_examiners", "primary_examiners_departments", "primary_examiners_departments_text", "primary_examiners_names", "primary_examiners_names_text", "priority_claims", "publication_country", "publication_date", "publication_kind", "publication_number", "publication_year", "related_documents", "series_code", "status", "term_extension", "title", "uspc"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UsptoPatent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in agents (list) + _items = [] + if self.agents: + for _item_agents in self.agents: + if _item_agents: + _items.append(_item_agents.to_dict()) + _dict['agents'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in applicants (list) + _items = [] + if self.applicants: + for _item_applicants in self.applicants: + if _item_applicants: + _items.append(_item_applicants.to_dict()) + _dict['applicants'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in assistant_examiners (list) + _items = [] + if self.assistant_examiners: + for _item_assistant_examiners in self.assistant_examiners: + if _item_assistant_examiners: + _items.append(_item_assistant_examiners.to_dict()) + _dict['assistant_examiners'] = _items + # override the default output from pydantic by calling `to_dict()` of citations + if self.citations: + _dict['citations'] = self.citations.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in inventors (list) + _items = [] + if self.inventors: + for _item_inventors in self.inventors: + if _item_inventors: + _items.append(_item_inventors.to_dict()) + _dict['inventors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in primary_examiners (list) + _items = [] + if self.primary_examiners: + for _item_primary_examiners in self.primary_examiners: + if _item_primary_examiners: + _items.append(_item_primary_examiners.to_dict()) + _dict['primary_examiners'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in priority_claims (list) + _items = [] + if self.priority_claims: + for _item_priority_claims in self.priority_claims: + if _item_priority_claims: + _items.append(_item_priority_claims.to_dict()) + _dict['priority_claims'] = _items + # override the default output from pydantic by calling `to_dict()` of related_documents + if self.related_documents: + _dict['related_documents'] = self.related_documents.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UsptoPatent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "abstract": obj.get("abstract"), + "agents": [AgentNested.from_dict(_item) for _item in obj["agents"]] if obj.get("agents") is not None else None, + "agents_names": obj.get("agents_names"), + "agents_names_text": obj.get("agents_names_text"), + "agents_orgs": obj.get("agents_orgs"), + "agents_orgs_text": obj.get("agents_orgs_text"), + "applicants": [ApplicantNested.from_dict(_item) for _item in obj["applicants"]] if obj.get("applicants") is not None else None, + "applicants_addresses": obj.get("applicants_addresses"), + "applicants_addresses_text": obj.get("applicants_addresses_text"), + "applicants_names": obj.get("applicants_names"), + "applicants_names_text": obj.get("applicants_names_text"), + "applicants_orgs": obj.get("applicants_orgs"), + "applicants_orgs_text": obj.get("applicants_orgs_text"), + "application_country": obj.get("application_country"), + "application_date": obj.get("application_date"), + "application_number": obj.get("application_number"), + "application_type": obj.get("application_type"), + "assignees": obj.get("assignees"), + "assignees_addresses": obj.get("assignees_addresses"), + "assignees_addresses_text": obj.get("assignees_addresses_text"), + "assignees_orgs": obj.get("assignees_orgs"), + "assignees_orgs_text": obj.get("assignees_orgs_text"), + "assignees_text": obj.get("assignees_text"), + "assistant_examiners": [AssistantExaminerNested.from_dict(_item) for _item in obj["assistant_examiners"]] if obj.get("assistant_examiners") is not None else None, + "assistant_examiners_departments": obj.get("assistant_examiners_departments"), + "assistant_examiners_departments_text": obj.get("assistant_examiners_departments_text"), + "assistant_examiners_names": obj.get("assistant_examiners_names"), + "assistant_examiners_names_text": obj.get("assistant_examiners_names_text"), + "citations": CitationObject.from_dict(obj["citations"]) if obj.get("citations") is not None else None, + "citations_names": obj.get("citations_names"), + "citations_names_text": obj.get("citations_names_text"), + "claims": obj.get("claims"), + "claims_text": obj.get("claims_text"), + "country": obj.get("country"), + "cpc": obj.get("cpc"), + "cpc_action": obj.get("cpc_action"), + "cpc_class": obj.get("cpc_class"), + "cpc_classification_value": obj.get("cpc_classification_value"), + "cpc_data1": obj.get("cpc_data1"), + "cpc_data2": obj.get("cpc_data2"), + "cpc_main_group": obj.get("cpc_main_group"), + "cpc_office": obj.get("cpc_office"), + "cpc_position": obj.get("cpc_position"), + "cpc_scheme": obj.get("cpc_scheme"), + "cpc_section": obj.get("cpc_section"), + "cpc_subclass": obj.get("cpc_subclass"), + "cpc_subgroup": obj.get("cpc_subgroup"), + "cpc_text": obj.get("cpc_text"), + "cpc_text_without": obj.get("cpc_text_without"), + "cpc_version": obj.get("cpc_version"), + "date-produced": obj.get("date-produced"), + "date-publ": obj.get("date-publ"), + "description_header": obj.get("description_header"), + "description_paragraph": obj.get("description_paragraph"), + "description_text": obj.get("description_text"), + "disclaimer": obj.get("disclaimer"), + "dtd-version": obj.get("dtd-version"), + "field_of_clasification_cpc": obj.get("field_of_clasification_cpc"), + "field_of_clasification_cpc_text": obj.get("field_of_clasification_cpc_text"), + "field_of_clasification_cpc_text_without": obj.get("field_of_clasification_cpc_text_without"), + "field_of_clasification_uspc": obj.get("field_of_clasification_uspc"), + "field_of_clasification_uspc_text": obj.get("field_of_clasification_uspc_text"), + "field_of_clasification_uspc_text_without": obj.get("field_of_clasification_uspc_text_without"), + "file": obj.get("file"), + "further_classifications": obj.get("further_classifications"), + "id": obj.get("id"), + "inventors": [InventorNested.from_dict(_item) for _item in obj["inventors"]] if obj.get("inventors") is not None else None, + "inventors_addresses": obj.get("inventors_addresses"), + "inventors_addresses_text": obj.get("inventors_addresses_text"), + "inventors_names": obj.get("inventors_names"), + "inventors_names_text": obj.get("inventors_names_text"), + "ipcr": obj.get("ipcr"), + "ipcr_action": obj.get("ipcr_action"), + "ipcr_class": obj.get("ipcr_class"), + "ipcr_classification_value": obj.get("ipcr_classification_value"), + "ipcr_data1": obj.get("ipcr_data1"), + "ipcr_data2": obj.get("ipcr_data2"), + "ipcr_level": obj.get("ipcr_level"), + "ipcr_main_group": obj.get("ipcr_main_group"), + "ipcr_office": obj.get("ipcr_office"), + "ipcr_position": obj.get("ipcr_position"), + "ipcr_section": obj.get("ipcr_section"), + "ipcr_subclass": obj.get("ipcr_subclass"), + "ipcr_subgroup": obj.get("ipcr_subgroup"), + "ipcr_text": obj.get("ipcr_text"), + "ipcr_text_without": obj.get("ipcr_text_without"), + "ipcr_version": obj.get("ipcr_version"), + "lang": obj.get("lang"), + "length_of_grant": obj.get("length_of_grant"), + "loc": obj.get("loc"), + "number_of_claims": obj.get("number_of_claims"), + "primary_examiners": [PrimaryExaminerNested.from_dict(_item) for _item in obj["primary_examiners"]] if obj.get("primary_examiners") is not None else None, + "primary_examiners_departments": obj.get("primary_examiners_departments"), + "primary_examiners_departments_text": obj.get("primary_examiners_departments_text"), + "primary_examiners_names": obj.get("primary_examiners_names"), + "primary_examiners_names_text": obj.get("primary_examiners_names_text"), + "priority_claims": [PriorityClaimNested.from_dict(_item) for _item in obj["priority_claims"]] if obj.get("priority_claims") is not None else None, + "publication_country": obj.get("publication_country"), + "publication_date": obj.get("publication_date"), + "publication_kind": obj.get("publication_kind"), + "publication_number": obj.get("publication_number"), + "publication_year": obj.get("publication_year"), + "related_documents": RelatedDocumentsObject.from_dict(obj["related_documents"]) if obj.get("related_documents") is not None else None, + "series_code": obj.get("series_code"), + "status": obj.get("status"), + "term_extension": obj.get("term_extension"), + "title": obj.get("title"), + "uspc": obj.get("uspc") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_bund/arb.py b/service/src/main/inse/models/projects_bund/arb.py new file mode 100644 index 00000000..3535b484 --- /dev/null +++ b/service/src/main/inse/models/projects_bund/arb.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Projects Bund Index Backend Models + + Pydantic models for the Elasticsearch \"projects_bund\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Arb(BaseModel): + """ + Nested Arb object. + """ # noqa: E501 + einh: Optional[StrictStr] = Field(default=None, alias="-Einh") + __properties: ClassVar[List[str]] = ["-Einh"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Arb from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Arb from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "-Einh": obj.get("-Einh") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_bund/project_bund.py b/service/src/main/inse/models/projects_bund/project_bund.py new file mode 100644 index 00000000..94dd44d9 --- /dev/null +++ b/service/src/main/inse/models/projects_bund/project_bund.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + Projects Bund Index Backend Models + + Pydantic models for the Elasticsearch \"projects_bund\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import date +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.arb import Arb +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ProjectBund(BaseModel): + """ + Main document model for the projects_bund index. + """ # noqa: E501 + arb: Optional[Arb] = Field(default=None, alias="Arb") + ausfhrende_stelle: Optional[StrictStr] = Field(default=None, alias="Ausführende Stelle") + bundesland: Optional[StrictStr] = Field(default=None, alias="Bundesland") + frderart: Optional[StrictStr] = Field(default=None, alias="Förderart") + frderkennzeichen: Optional[StrictStr] = Field(default=None, alias="Förderkennzeichen") + frderprofil: Optional[StrictStr] = Field(default=None, alias="Förderprofil") + frdersumme: Optional[StrictStr] = Field(default=None, alias="Fördersumme") + gemeindekennziffer: Optional[StrictStr] = Field(default=None, alias="Gemeindekennziffer") + klartext_leistungsplansystematik: Optional[StrictStr] = Field(default=None, alias="Klartext Leistungsplansystematik") + laufzeit: Optional[StrictStr] = Field(default=None, alias="Laufzeit") + leistungsplansystematik: Optional[StrictStr] = Field(default=None, alias="Leistungsplansystematik") + leistungsplansystematik_fullname: Optional[StrictStr] = Field(default=None, alias="Leistungsplansystematik_fullname") + ort: Optional[StrictStr] = Field(default=None, alias="Ort") + pt_fullname: Optional[StrictStr] = Field(default=None, alias="PT_fullname") + projekttrger: Optional[StrictStr] = Field(default=None, alias="Projektträger") + publikationsdatum: Optional[StrictStr] = Field(default=None, alias="Publikationsdatum") + referat: Optional[StrictStr] = Field(default=None, alias="Referat") + ressort: Optional[StrictStr] = Field(default=None, alias="Ressort") + ressort_fullname: Optional[StrictStr] = Field(default=None, alias="Ressort_fullname") + staat: Optional[StrictStr] = Field(default=None, alias="Staat") + stadt_gemeinde: Optional[StrictStr] = Field(default=None, alias="Stadt/Gemeinde") + thema: Optional[StrictStr] = Field(default=None, alias="Thema") + verbundprojekt: Optional[StrictStr] = Field(default=None, alias="Verbundprojekt") + zuwendungsempfnger: Optional[StrictStr] = Field(default=None, alias="Zuwendungsempfänger") + datum: Optional[StrictStr] = None + funding_end: Optional[date] = Field(default=None, description="Expected format is dd.MM.yyyy based on ES mapping.") + funding_start: Optional[date] = Field(default=None, description="Expected format is dd.MM.yyyy based on ES mapping.") + new: Optional[StrictStr] = None + unix_timestamp: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["Arb", "Ausführende Stelle", "Bundesland", "Förderart", "Förderkennzeichen", "Förderprofil", "Fördersumme", "Gemeindekennziffer", "Klartext Leistungsplansystematik", "Laufzeit", "Leistungsplansystematik", "Leistungsplansystematik_fullname", "Ort", "PT_fullname", "Projektträger", "Publikationsdatum", "Referat", "Ressort", "Ressort_fullname", "Staat", "Stadt/Gemeinde", "Thema", "Verbundprojekt", "Zuwendungsempfänger", "datum", "funding_end", "funding_start", "new", "unix_timestamp"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectBund from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of arb + if self.arb: + _dict['Arb'] = self.arb.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectBund from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "Arb": Arb.from_dict(obj["Arb"]) if obj.get("Arb") is not None else None, + "Ausführende Stelle": obj.get("Ausführende Stelle"), + "Bundesland": obj.get("Bundesland"), + "Förderart": obj.get("Förderart"), + "Förderkennzeichen": obj.get("Förderkennzeichen"), + "Förderprofil": obj.get("Förderprofil"), + "Fördersumme": obj.get("Fördersumme"), + "Gemeindekennziffer": obj.get("Gemeindekennziffer"), + "Klartext Leistungsplansystematik": obj.get("Klartext Leistungsplansystematik"), + "Laufzeit": obj.get("Laufzeit"), + "Leistungsplansystematik": obj.get("Leistungsplansystematik"), + "Leistungsplansystematik_fullname": obj.get("Leistungsplansystematik_fullname"), + "Ort": obj.get("Ort"), + "PT_fullname": obj.get("PT_fullname"), + "Projektträger": obj.get("Projektträger"), + "Publikationsdatum": obj.get("Publikationsdatum"), + "Referat": obj.get("Referat"), + "Ressort": obj.get("Ressort"), + "Ressort_fullname": obj.get("Ressort_fullname"), + "Staat": obj.get("Staat"), + "Stadt/Gemeinde": obj.get("Stadt/Gemeinde"), + "Thema": obj.get("Thema"), + "Verbundprojekt": obj.get("Verbundprojekt"), + "Zuwendungsempfänger": obj.get("Zuwendungsempfänger"), + "datum": obj.get("datum"), + "funding_end": obj.get("funding_end"), + "funding_start": obj.get("funding_start"), + "new": obj.get("new"), + "unix_timestamp": obj.get("unix_timestamp") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_dfg/auslaend.py b/service/src/main/inse/models/projects_dfg/auslaend.py new file mode 100644 index 00000000..85b261b3 --- /dev/null +++ b/service/src/main/inse/models/projects_dfg/auslaend.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Projects DFG All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_dfg_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Auslaend(BaseModel): + """ + Nested object for international co-applicants. + """ # noqa: E501 + mitantragstellerin: Optional[StrictStr] = Field(default=None, alias=" Mitantragstellerin") + mitantragstellerinnen: Optional[StrictStr] = Field(default=None, alias=" Mitantragstellerinnen") + mitantragstellerinnen___auslndische_mitantragsteller: Optional[StrictStr] = Field(default=None, alias=" Mitantragstellerinnen / ausländische Mitantragsteller") + __properties: ClassVar[List[str]] = [" Mitantragstellerin", " Mitantragstellerinnen", " Mitantragstellerinnen / ausländische Mitantragsteller"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Auslaend from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Auslaend from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + " Mitantragstellerin": obj.get(" Mitantragstellerin"), + " Mitantragstellerinnen": obj.get(" Mitantragstellerinnen"), + " Mitantragstellerinnen / ausländische Mitantragsteller": obj.get(" Mitantragstellerinnen / ausländische Mitantragsteller") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_dfg/project_dfg.py b/service/src/main/inse/models/projects_dfg/project_dfg.py new file mode 100644 index 00000000..55279a7c --- /dev/null +++ b/service/src/main/inse/models/projects_dfg/project_dfg.py @@ -0,0 +1,252 @@ +# coding: utf-8 + +""" + Projects DFG All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_dfg_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.auslaend import Auslaend +from db_models.models.stellvertr import Stellvertr +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ProjectDfg(BaseModel): + """ + Main document model for the projects_dfg_all index. + """ # noqa: E501 + antragstellende_institution: Optional[StrictStr] = Field(default=None, alias="Antragstellende Institution") + antragsteller: Optional[StrictStr] = Field(default=None, alias="Antragsteller") + antragstellerin: Optional[StrictStr] = Field(default=None, alias="Antragstellerin") + antragstellerinnen: Optional[StrictStr] = Field(default=None, alias="Antragstellerinnen") + antragstellerinnen___antragsteller: Optional[StrictStr] = Field(default=None, alias="Antragstellerinnen / Antragsteller") + anwendungspartner: Optional[StrictStr] = Field(default=None, alias="Anwendungspartner") + beteiligte_einrichtung: Optional[StrictStr] = Field(default=None, alias="Beteiligte Einrichtung") + beteiligte_hochschule: Optional[StrictStr] = Field(default=None, alias="Beteiligte Hochschule") + beteiligte_institution: Optional[StrictStr] = Field(default=None, alias="Beteiligte Institution") + beteiligte_person: Optional[StrictStr] = Field(default=None, alias="Beteiligte Person") + beteiligte_personen: Optional[StrictStr] = Field(default=None, alias="Beteiligte Personen") + co_sprecher: Optional[StrictStr] = Field(default=None, alias="Co-Sprecher") + co_sprecherinnen___co_sprecher: Optional[StrictStr] = Field(default=None, alias="Co-Sprecherinnen / Co-Sprecher") + dfg_verfahren: Optional[StrictStr] = Field(default=None, alias="DFG-Verfahren") + ehemalige_antragsteller: Optional[StrictStr] = Field(default=None, alias="Ehemalige Antragsteller") + ehemalige_antragstellerin: Optional[StrictStr] = Field(default=None, alias="Ehemalige Antragstellerin") + ehemalige_antragstellerinnen: Optional[StrictStr] = Field(default=None, alias="Ehemalige Antragstellerinnen") + ehemalige_antragstellerinnen___ehemalige_antragsteller: Optional[StrictStr] = Field(default=None, alias="Ehemalige Antragstellerinnen / Ehemalige Antragsteller") + ehemaliger_antragsteller: Optional[StrictStr] = Field(default=None, alias="Ehemaliger Antragsteller") + fachliche_zuordnung: Optional[StrictStr] = Field(default=None, alias="Fachliche Zuordnung") + frderung: Optional[StrictStr] = Field(default=None, alias="Förderung") + gastgeber: Optional[StrictStr] = Field(default=None, alias="Gastgeber") + gastgeberin: Optional[StrictStr] = Field(default=None, alias="Gastgeberin") + gastgeberinnen: Optional[StrictStr] = Field(default=None, alias="Gastgeberinnen") + gastgeberinnen___gastgeber: Optional[StrictStr] = Field(default=None, alias="Gastgeberinnen / Gastgeber") + gertegruppe: Optional[StrictStr] = Field(default=None, alias="Gerätegruppe") + grogerte: Optional[StrictStr] = Field(default=None, alias="Großgeräte") + igk_partnerinstitution: Optional[StrictStr] = Field(default=None, alias="IGK-Partnerinstitution") + internationaler_bezug: Optional[StrictStr] = Field(default=None, alias="Internationaler Bezug") + kooperationspartner: Optional[StrictStr] = Field(default=None, alias="Kooperationspartner") + kooperationspartnerin: Optional[StrictStr] = Field(default=None, alias="Kooperationspartnerin") + kooperationspartnerinnen: Optional[StrictStr] = Field(default=None, alias="Kooperationspartnerinnen") + kooperationspartnerinnen___kooperationspartner: Optional[StrictStr] = Field(default=None, alias="Kooperationspartnerinnen / Kooperationspartner") + leiter: Optional[StrictStr] = Field(default=None, alias="Leiter") + leiterin: Optional[StrictStr] = Field(default=None, alias="Leiterin") + leiterinnen: Optional[StrictStr] = Field(default=None, alias="Leiterinnen") + leiterinnen___leiter: Optional[StrictStr] = Field(default=None, alias="Leiterinnen / Leiter") + mitantragstellende_institution: Optional[StrictStr] = Field(default=None, alias="Mitantragstellende Institution") + mitantragsteller: Optional[StrictStr] = Field(default=None, alias="Mitantragsteller") + mitantragstellerin: Optional[StrictStr] = Field(default=None, alias="Mitantragstellerin") + mitantragstellerinnen: Optional[StrictStr] = Field(default=None, alias="Mitantragstellerinnen") + mitantragstellerinnen___mitantragsteller: Optional[StrictStr] = Field(default=None, alias="Mitantragstellerinnen / Mitantragsteller") + mitverantwortlich: Optional[StrictStr] = Field(default=None, alias="Mitverantwortlich") + mitverantwortlich_e: Optional[StrictStr] = Field(default=None, alias="Mitverantwortlich(e)") + mitverantwortliche: Optional[StrictStr] = Field(default=None, alias="Mitverantwortliche") + partnerorganisation: Optional[StrictStr] = Field(default=None, alias="Partnerorganisation") + projektkennung: Optional[StrictStr] = Field(default=None, alias="Projektkennung") + sprecher: Optional[StrictStr] = Field(default=None, alias="Sprecher") + sprecher__igk_partner: Optional[StrictStr] = Field(default=None, alias="Sprecher (IGK-Partner)") + sprecherin: Optional[StrictStr] = Field(default=None, alias="Sprecherin") + sprecherin__igk_partner: Optional[StrictStr] = Field(default=None, alias="Sprecherin (IGK-Partner)") + sprecherinnen: Optional[StrictStr] = Field(default=None, alias="Sprecherinnen") + sprecherinnen__igk_partner___sprecher__igk_partner: Optional[StrictStr] = Field(default=None, alias="Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)") + sprecherinnen___sprecher: Optional[StrictStr] = Field(default=None, alias="Sprecherinnen / Sprecher") + teilprojekt_zu: Optional[StrictStr] = Field(default=None, alias="Teilprojekt zu") + teilprojektleiter: Optional[StrictStr] = Field(default=None, alias="Teilprojektleiter") + teilprojektleiterin: Optional[StrictStr] = Field(default=None, alias="Teilprojektleiterin") + teilprojektleiterinnen: Optional[StrictStr] = Field(default=None, alias="Teilprojektleiterinnen") + teilprojektleiterinnen___teilprojektleiter: Optional[StrictStr] = Field(default=None, alias="Teilprojektleiterinnen / Teilprojektleiter") + unternehmen: Optional[StrictStr] = Field(default=None, alias="Unternehmen") + webseite: Optional[StrictStr] = Field(default=None, alias="Webseite") + auslnd: Optional[Auslaend] = Field(default=None, alias="ausländ") + auslndische_mitantragsteller: Optional[StrictStr] = Field(default=None, alias="ausländische Mitantragsteller") + auslndischer_mitantragsteller: Optional[StrictStr] = Field(default=None, alias="ausländischer Mitantragsteller") + beteiligte_wissenschaftler: Optional[StrictStr] = Field(default=None, alias="beteiligte Wissenschaftler") + beteiligte_wissenschaftlerin: Optional[StrictStr] = Field(default=None, alias="beteiligte Wissenschaftlerin") + beteiligte_wissenschaftlerinnen: Optional[StrictStr] = Field(default=None, alias="beteiligte Wissenschaftlerinnen") + beteiligte_wissenschaftlerinnen___beteiligte_wissenschaftler: Optional[StrictStr] = Field(default=None, alias="beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler") + beteiligter_wissenschaftler: Optional[StrictStr] = Field(default=None, alias="beteiligter Wissenschaftler") + description: Optional[StrictStr] = None + funding_end: Optional[StrictStr] = None + funding_start: Optional[StrictStr] = None + id: Optional[StrictStr] = None + link: Optional[StrictStr] = None + path: Optional[StrictStr] = None + person_creater_address: Optional[StrictStr] = None + person_creater_name: Optional[StrictStr] = None + stellvertr: Optional[Stellvertr] = None + title: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["Antragstellende Institution", "Antragsteller", "Antragstellerin", "Antragstellerinnen", "Antragstellerinnen / Antragsteller", "Anwendungspartner", "Beteiligte Einrichtung", "Beteiligte Hochschule", "Beteiligte Institution", "Beteiligte Person", "Beteiligte Personen", "Co-Sprecher", "Co-Sprecherinnen / Co-Sprecher", "DFG-Verfahren", "Ehemalige Antragsteller", "Ehemalige Antragstellerin", "Ehemalige Antragstellerinnen", "Ehemalige Antragstellerinnen / Ehemalige Antragsteller", "Ehemaliger Antragsteller", "Fachliche Zuordnung", "Förderung", "Gastgeber", "Gastgeberin", "Gastgeberinnen", "Gastgeberinnen / Gastgeber", "Gerätegruppe", "Großgeräte", "IGK-Partnerinstitution", "Internationaler Bezug", "Kooperationspartner", "Kooperationspartnerin", "Kooperationspartnerinnen", "Kooperationspartnerinnen / Kooperationspartner", "Leiter", "Leiterin", "Leiterinnen", "Leiterinnen / Leiter", "Mitantragstellende Institution", "Mitantragsteller", "Mitantragstellerin", "Mitantragstellerinnen", "Mitantragstellerinnen / Mitantragsteller", "Mitverantwortlich", "Mitverantwortlich(e)", "Mitverantwortliche", "Partnerorganisation", "Projektkennung", "Sprecher", "Sprecher (IGK-Partner)", "Sprecherin", "Sprecherin (IGK-Partner)", "Sprecherinnen", "Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)", "Sprecherinnen / Sprecher", "Teilprojekt zu", "Teilprojektleiter", "Teilprojektleiterin", "Teilprojektleiterinnen", "Teilprojektleiterinnen / Teilprojektleiter", "Unternehmen", "Webseite", "ausländ", "ausländische Mitantragsteller", "ausländischer Mitantragsteller", "beteiligte Wissenschaftler", "beteiligte Wissenschaftlerin", "beteiligte Wissenschaftlerinnen", "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", "beteiligter Wissenschaftler", "description", "funding_end", "funding_start", "id", "link", "path", "person_creater_address", "person_creater_name", "stellvertr", "title"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectDfg from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of auslnd + if self.auslnd: + _dict['ausländ'] = self.auslnd.to_dict() + # override the default output from pydantic by calling `to_dict()` of stellvertr + if self.stellvertr: + _dict['stellvertr'] = self.stellvertr.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectDfg from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "Antragstellende Institution": obj.get("Antragstellende Institution"), + "Antragsteller": obj.get("Antragsteller"), + "Antragstellerin": obj.get("Antragstellerin"), + "Antragstellerinnen": obj.get("Antragstellerinnen"), + "Antragstellerinnen / Antragsteller": obj.get("Antragstellerinnen / Antragsteller"), + "Anwendungspartner": obj.get("Anwendungspartner"), + "Beteiligte Einrichtung": obj.get("Beteiligte Einrichtung"), + "Beteiligte Hochschule": obj.get("Beteiligte Hochschule"), + "Beteiligte Institution": obj.get("Beteiligte Institution"), + "Beteiligte Person": obj.get("Beteiligte Person"), + "Beteiligte Personen": obj.get("Beteiligte Personen"), + "Co-Sprecher": obj.get("Co-Sprecher"), + "Co-Sprecherinnen / Co-Sprecher": obj.get("Co-Sprecherinnen / Co-Sprecher"), + "DFG-Verfahren": obj.get("DFG-Verfahren"), + "Ehemalige Antragsteller": obj.get("Ehemalige Antragsteller"), + "Ehemalige Antragstellerin": obj.get("Ehemalige Antragstellerin"), + "Ehemalige Antragstellerinnen": obj.get("Ehemalige Antragstellerinnen"), + "Ehemalige Antragstellerinnen / Ehemalige Antragsteller": obj.get("Ehemalige Antragstellerinnen / Ehemalige Antragsteller"), + "Ehemaliger Antragsteller": obj.get("Ehemaliger Antragsteller"), + "Fachliche Zuordnung": obj.get("Fachliche Zuordnung"), + "Förderung": obj.get("Förderung"), + "Gastgeber": obj.get("Gastgeber"), + "Gastgeberin": obj.get("Gastgeberin"), + "Gastgeberinnen": obj.get("Gastgeberinnen"), + "Gastgeberinnen / Gastgeber": obj.get("Gastgeberinnen / Gastgeber"), + "Gerätegruppe": obj.get("Gerätegruppe"), + "Großgeräte": obj.get("Großgeräte"), + "IGK-Partnerinstitution": obj.get("IGK-Partnerinstitution"), + "Internationaler Bezug": obj.get("Internationaler Bezug"), + "Kooperationspartner": obj.get("Kooperationspartner"), + "Kooperationspartnerin": obj.get("Kooperationspartnerin"), + "Kooperationspartnerinnen": obj.get("Kooperationspartnerinnen"), + "Kooperationspartnerinnen / Kooperationspartner": obj.get("Kooperationspartnerinnen / Kooperationspartner"), + "Leiter": obj.get("Leiter"), + "Leiterin": obj.get("Leiterin"), + "Leiterinnen": obj.get("Leiterinnen"), + "Leiterinnen / Leiter": obj.get("Leiterinnen / Leiter"), + "Mitantragstellende Institution": obj.get("Mitantragstellende Institution"), + "Mitantragsteller": obj.get("Mitantragsteller"), + "Mitantragstellerin": obj.get("Mitantragstellerin"), + "Mitantragstellerinnen": obj.get("Mitantragstellerinnen"), + "Mitantragstellerinnen / Mitantragsteller": obj.get("Mitantragstellerinnen / Mitantragsteller"), + "Mitverantwortlich": obj.get("Mitverantwortlich"), + "Mitverantwortlich(e)": obj.get("Mitverantwortlich(e)"), + "Mitverantwortliche": obj.get("Mitverantwortliche"), + "Partnerorganisation": obj.get("Partnerorganisation"), + "Projektkennung": obj.get("Projektkennung"), + "Sprecher": obj.get("Sprecher"), + "Sprecher (IGK-Partner)": obj.get("Sprecher (IGK-Partner)"), + "Sprecherin": obj.get("Sprecherin"), + "Sprecherin (IGK-Partner)": obj.get("Sprecherin (IGK-Partner)"), + "Sprecherinnen": obj.get("Sprecherinnen"), + "Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)": obj.get("Sprecherinnen (IGK-Partner) / Sprecher (IGK-Partner)"), + "Sprecherinnen / Sprecher": obj.get("Sprecherinnen / Sprecher"), + "Teilprojekt zu": obj.get("Teilprojekt zu"), + "Teilprojektleiter": obj.get("Teilprojektleiter"), + "Teilprojektleiterin": obj.get("Teilprojektleiterin"), + "Teilprojektleiterinnen": obj.get("Teilprojektleiterinnen"), + "Teilprojektleiterinnen / Teilprojektleiter": obj.get("Teilprojektleiterinnen / Teilprojektleiter"), + "Unternehmen": obj.get("Unternehmen"), + "Webseite": obj.get("Webseite"), + "ausländ": Auslaend.from_dict(obj["ausländ"]) if obj.get("ausländ") is not None else None, + "ausländische Mitantragsteller": obj.get("ausländische Mitantragsteller"), + "ausländischer Mitantragsteller": obj.get("ausländischer Mitantragsteller"), + "beteiligte Wissenschaftler": obj.get("beteiligte Wissenschaftler"), + "beteiligte Wissenschaftlerin": obj.get("beteiligte Wissenschaftlerin"), + "beteiligte Wissenschaftlerinnen": obj.get("beteiligte Wissenschaftlerinnen"), + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler": obj.get("beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler"), + "beteiligter Wissenschaftler": obj.get("beteiligter Wissenschaftler"), + "description": obj.get("description"), + "funding_end": obj.get("funding_end"), + "funding_start": obj.get("funding_start"), + "id": obj.get("id"), + "link": obj.get("link"), + "path": obj.get("path"), + "person_creater_address": obj.get("person_creater_address"), + "person_creater_name": obj.get("person_creater_name"), + "stellvertr": Stellvertr.from_dict(obj["stellvertr"]) if obj.get("stellvertr") is not None else None, + "title": obj.get("title") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_dfg/stellvertr.py b/service/src/main/inse/models/projects_dfg/stellvertr.py new file mode 100644 index 00000000..357e71ea --- /dev/null +++ b/service/src/main/inse/models/projects_dfg/stellvertr.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Projects DFG All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_dfg_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.stellvertr_sprecherinnen import StellvertrSprecherinnen +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class Stellvertr(BaseModel): + """ + Nested object for deputy speakers. + """ # noqa: E501 + sprecher: Optional[StrictStr] = Field(default=None, alias=" Sprecher") + sprecherin: Optional[StrictStr] = Field(default=None, alias=" Sprecherin") + sprecherinnen___stellvertr: Optional[StellvertrSprecherinnen] = Field(default=None, alias=" Sprecherinnen / stellvertr") + __properties: ClassVar[List[str]] = [" Sprecher", " Sprecherin", " Sprecherinnen / stellvertr"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Stellvertr from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of sprecherinnen___stellvertr + if self.sprecherinnen___stellvertr: + _dict[' Sprecherinnen / stellvertr'] = self.sprecherinnen___stellvertr.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Stellvertr from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + " Sprecher": obj.get(" Sprecher"), + " Sprecherin": obj.get(" Sprecherin"), + " Sprecherinnen / stellvertr": StellvertrSprecherinnen.from_dict(obj[" Sprecherinnen / stellvertr"]) if obj.get(" Sprecherinnen / stellvertr") is not None else None + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_dfg/stellvertr_sprecherinnen.py b/service/src/main/inse/models/projects_dfg/stellvertr_sprecherinnen.py new file mode 100644 index 00000000..6e072ff9 --- /dev/null +++ b/service/src/main/inse/models/projects_dfg/stellvertr_sprecherinnen.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Projects DFG All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_dfg_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class StellvertrSprecherinnen(BaseModel): + """ + Deeply nested object within stellvertr. + """ # noqa: E501 + sprecher: Optional[StrictStr] = Field(default=None, alias=" Sprecher") + __properties: ClassVar[List[str]] = [" Sprecher"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StellvertrSprecherinnen from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StellvertrSprecherinnen from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + " Sprecher": obj.get(" Sprecher") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_eu/category_nested.py b/service/src/main/inse/models/projects_eu/category_nested.py new file mode 100644 index 00000000..7d6c6d58 --- /dev/null +++ b/service/src/main/inse/models/projects_eu/category_nested.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Projects EU All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_eu_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.display_code_splitted_nested import DisplayCodeSplittedNested +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class CategoryNested(BaseModel): + """ + First-level nested object for categories. + """ # noqa: E501 + category: Optional[StrictStr] = None + code: Optional[StrictStr] = None + display_code: Optional[StrictStr] = Field(default=None, alias="displayCode") + display_code_splitted: Optional[StrictStr] = Field(default=None, alias="displayCode_splitted") + display_code_splitted_nested: Optional[List[DisplayCodeSplittedNested]] = Field(default=None, alias="displayCode_splitted_nested") + __properties: ClassVar[List[str]] = ["category", "code", "displayCode", "displayCode_splitted", "displayCode_splitted_nested"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CategoryNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in display_code_splitted_nested (list) + _items = [] + if self.display_code_splitted_nested: + for _item_display_code_splitted_nested in self.display_code_splitted_nested: + if _item_display_code_splitted_nested: + _items.append(_item_display_code_splitted_nested.to_dict()) + _dict['displayCode_splitted_nested'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CategoryNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "category": obj.get("category"), + "code": obj.get("code"), + "displayCode": obj.get("displayCode"), + "displayCode_splitted": obj.get("displayCode_splitted"), + "displayCode_splitted_nested": [DisplayCodeSplittedNested.from_dict(_item) for _item in obj["displayCode_splitted_nested"]] if obj.get("displayCode_splitted_nested") is not None else None + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_eu/display_code_splitted_nested.py b/service/src/main/inse/models/projects_eu/display_code_splitted_nested.py new file mode 100644 index 00000000..d5b2c829 --- /dev/null +++ b/service/src/main/inse/models/projects_eu/display_code_splitted_nested.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Projects EU All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_eu_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DisplayCodeSplittedNested(BaseModel): + """ + Second-level nested object inside categories. + """ # noqa: E501 + single_display_code: Optional[StrictStr] = Field(default=None, alias="singleDisplayCode") + __properties: ClassVar[List[str]] = ["singleDisplayCode"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DisplayCodeSplittedNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DisplayCodeSplittedNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "singleDisplayCode": obj.get("singleDisplayCode") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_eu/keyword_nested.py b/service/src/main/inse/models/projects_eu/keyword_nested.py new file mode 100644 index 00000000..9b83f2f6 --- /dev/null +++ b/service/src/main/inse/models/projects_eu/keyword_nested.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Projects EU All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_eu_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class KeywordNested(BaseModel): + """ + Nested object for individual keywords. + """ # noqa: E501 + keyword: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["keyword"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keyword": obj.get("keyword") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_eu/organization_nested.py b/service/src/main/inse/models/projects_eu/organization_nested.py new file mode 100644 index 00000000..3c87569b --- /dev/null +++ b/service/src/main/inse/models/projects_eu/organization_nested.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Projects EU All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_eu_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class OrganizationNested(BaseModel): + """ + Nested object for project organizations. + """ # noqa: E501 + ec_contribution: Optional[StrictStr] = Field(default=None, alias="ecContribution") + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + net_ec_contribution: Optional[StrictStr] = Field(default=None, alias="netEcContribution") + total_cost: Optional[StrictStr] = Field(default=None, alias="totalCost") + type: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["ecContribution", "id", "name", "netEcContribution", "totalCost", "type"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrganizationNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrganizationNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "ecContribution": obj.get("ecContribution"), + "id": obj.get("id"), + "name": obj.get("name"), + "netEcContribution": obj.get("netEcContribution"), + "totalCost": obj.get("totalCost"), + "type": obj.get("type") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_eu/programme_nested.py b/service/src/main/inse/models/projects_eu/programme_nested.py new file mode 100644 index 00000000..07cdd49f --- /dev/null +++ b/service/src/main/inse/models/projects_eu/programme_nested.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Projects EU All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_eu_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ProgrammeNested(BaseModel): + """ + Nested object for related programmes. + """ # noqa: E501 + code: Optional[StrictStr] = None + id: Optional[StrictStr] = None + programme: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["code", "id", "programme"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProgrammeNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProgrammeNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "id": obj.get("id"), + "programme": obj.get("programme") + }) + return _obj + + diff --git a/service/src/main/inse/models/projects_eu/project_eu.py b/service/src/main/inse/models/projects_eu/project_eu.py new file mode 100644 index 00000000..e9b74094 --- /dev/null +++ b/service/src/main/inse/models/projects_eu/project_eu.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + Projects EU All Index Backend Models + + Pydantic models for the Elasticsearch \"projects_eu_all\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.category_nested import CategoryNested +from db_models.models.keyword_nested import KeywordNested +from db_models.models.organization_nested import OrganizationNested +from db_models.models.programme_nested import ProgrammeNested +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ProjectEu(BaseModel): + """ + Main document model for the projects_eu_all index. + """ # noqa: E501 + acronym: Optional[StrictStr] = None + categories_nested: Optional[List[CategoryNested]] = None + doc_number: Optional[StrictStr] = None + doi: Optional[StrictStr] = None + ec_max_contribution: Optional[StrictStr] = Field(default=None, alias="ecMaxContribution") + end_date: Optional[StrictStr] = Field(default=None, alias="endDate") + funding_end: Optional[StrictStr] = None + funding_start: Optional[StrictStr] = None + id: Optional[StrictStr] = None + keywords: Optional[StrictStr] = None + keywords_nested: Optional[List[KeywordNested]] = None + link: Optional[StrictStr] = None + objective: Optional[StrictStr] = None + organization_nested: Optional[List[OrganizationNested]] = None + programme_nested: Optional[List[ProgrammeNested]] = None + source: Optional[StrictStr] = None + start_date: Optional[StrictStr] = Field(default=None, alias="startDate") + status: Optional[StrictStr] = None + teaser: Optional[StrictStr] = None + title: Optional[StrictStr] = None + total_cost: Optional[StrictStr] = Field(default=None, alias="totalCost") + __properties: ClassVar[List[str]] = ["acronym", "categories_nested", "doc_number", "doi", "ecMaxContribution", "endDate", "funding_end", "funding_start", "id", "keywords", "keywords_nested", "link", "objective", "organization_nested", "programme_nested", "source", "startDate", "status", "teaser", "title", "totalCost"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectEu from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in categories_nested (list) + _items = [] + if self.categories_nested: + for _item_categories_nested in self.categories_nested: + if _item_categories_nested: + _items.append(_item_categories_nested.to_dict()) + _dict['categories_nested'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in keywords_nested (list) + _items = [] + if self.keywords_nested: + for _item_keywords_nested in self.keywords_nested: + if _item_keywords_nested: + _items.append(_item_keywords_nested.to_dict()) + _dict['keywords_nested'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in organization_nested (list) + _items = [] + if self.organization_nested: + for _item_organization_nested in self.organization_nested: + if _item_organization_nested: + _items.append(_item_organization_nested.to_dict()) + _dict['organization_nested'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in programme_nested (list) + _items = [] + if self.programme_nested: + for _item_programme_nested in self.programme_nested: + if _item_programme_nested: + _items.append(_item_programme_nested.to_dict()) + _dict['programme_nested'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectEu from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "acronym": obj.get("acronym"), + "categories_nested": [CategoryNested.from_dict(_item) for _item in obj["categories_nested"]] if obj.get("categories_nested") is not None else None, + "doc_number": obj.get("doc_number"), + "doi": obj.get("doi"), + "ecMaxContribution": obj.get("ecMaxContribution"), + "endDate": obj.get("endDate"), + "funding_end": obj.get("funding_end"), + "funding_start": obj.get("funding_start"), + "id": obj.get("id"), + "keywords": obj.get("keywords"), + "keywords_nested": [KeywordNested.from_dict(_item) for _item in obj["keywords_nested"]] if obj.get("keywords_nested") is not None else None, + "link": obj.get("link"), + "objective": obj.get("objective"), + "organization_nested": [OrganizationNested.from_dict(_item) for _item in obj["organization_nested"]] if obj.get("organization_nested") is not None else None, + "programme_nested": [ProgrammeNested.from_dict(_item) for _item in obj["programme_nested"]] if obj.get("programme_nested") is not None else None, + "source": obj.get("source"), + "startDate": obj.get("startDate"), + "status": obj.get("status"), + "teaser": obj.get("teaser"), + "title": obj.get("title"), + "totalCost": obj.get("totalCost") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_organizations/keyword_object.py b/service/src/main/inse/models/ude_organizations/keyword_object.py new file mode 100644 index 00000000..f5584e02 --- /dev/null +++ b/service/src/main/inse/models/ude_organizations/keyword_object.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + UDE Organization Content Index Backend Models + + Pydantic models for the Elasticsearch \"ude_organization_content_august_2025\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class KeywordObject(BaseModel): + """ + Object structure for keywords and their assigned scores. + """ # noqa: E501 + score: Optional[Union[StrictFloat, StrictInt]] = None + value: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["score", "value"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of KeywordObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of KeywordObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "score": obj.get("score"), + "value": obj.get("value") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_organizations/news_object.py b/service/src/main/inse/models/ude_organizations/news_object.py new file mode 100644 index 00000000..4348bf4b --- /dev/null +++ b/service/src/main/inse/models/ude_organizations/news_object.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + UDE Organization Content Index Backend Models + + Pydantic models for the Elasticsearch \"ude_organization_content_august_2025\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class NewsObject(BaseModel): + """ + Object structure for related news content. + """ # noqa: E501 + var_date: Optional[StrictStr] = Field(default=None, alias="date") + keywords: Optional[StrictStr] = None + links: Optional[StrictStr] = None + source: Optional[StrictStr] = None + title: Optional[StrictStr] = None + topic: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["date", "keywords", "links", "source", "title", "topic"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NewsObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NewsObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "date": obj.get("date"), + "keywords": obj.get("keywords"), + "links": obj.get("links"), + "source": obj.get("source"), + "title": obj.get("title"), + "topic": obj.get("topic") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_organizations/project_object.py b/service/src/main/inse/models/ude_organizations/project_object.py new file mode 100644 index 00000000..dc0e9514 --- /dev/null +++ b/service/src/main/inse/models/ude_organizations/project_object.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + UDE Organization Content Index Backend Models + + Pydantic models for the Elasticsearch \"ude_organization_content_august_2025\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ProjectObject(BaseModel): + """ + Object structure for related projects. + """ # noqa: E501 + keywords: Optional[StrictStr] = None + links: Optional[StrictStr] = None + names: Optional[StrictStr] = None + project_type: Optional[StrictStr] = None + title: Optional[StrictStr] = None + topic: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["keywords", "links", "names", "project_type", "title", "topic"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keywords": obj.get("keywords"), + "links": obj.get("links"), + "names": obj.get("names"), + "project_type": obj.get("project_type"), + "title": obj.get("title"), + "topic": obj.get("topic") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_organizations/staff_object.py b/service/src/main/inse/models/ude_organizations/staff_object.py new file mode 100644 index 00000000..b6629a2e --- /dev/null +++ b/service/src/main/inse/models/ude_organizations/staff_object.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + UDE Organization Content Index Backend Models + + Pydantic models for the Elasticsearch \"ude_organization_content_august_2025\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class StaffObject(BaseModel): + """ + Object structure for related staff members. + """ # noqa: E501 + email: Optional[StrictStr] = None + keywords: Optional[StrictStr] = None + links: Optional[StrictStr] = None + name: Optional[StrictStr] = None + research_interests: Optional[StrictStr] = None + source: Optional[StrictStr] = None + telefon: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["email", "keywords", "links", "name", "research_interests", "source", "telefon"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StaffObject from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StaffObject from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "keywords": obj.get("keywords"), + "links": obj.get("links"), + "name": obj.get("name"), + "research_interests": obj.get("research_interests"), + "source": obj.get("source"), + "telefon": obj.get("telefon") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_organizations/ude_organization_content.py b/service/src/main/inse/models/ude_organizations/ude_organization_content.py new file mode 100644 index 00000000..6b10d438 --- /dev/null +++ b/service/src/main/inse/models/ude_organizations/ude_organization_content.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + UDE Organization Content Index Backend Models + + Pydantic models for the Elasticsearch \"ude_organization_content_august_2025\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.keyword_object import KeywordObject +from db_models.models.news_object import NewsObject +from db_models.models.project_object import ProjectObject +from db_models.models.staff_object import StaffObject +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UdeOrganizationContent(BaseModel): + """ + Main document model for the ude_organization_content_august_2025 index. + """ # noqa: E501 + keywords: Optional[KeywordObject] = None + news: Optional[NewsObject] = None + projects: Optional[ProjectObject] = None + staff: Optional[StaffObject] = None + uri: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["keywords", "news", "projects", "staff", "uri"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UdeOrganizationContent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of keywords + if self.keywords: + _dict['keywords'] = self.keywords.to_dict() + # override the default output from pydantic by calling `to_dict()` of news + if self.news: + _dict['news'] = self.news.to_dict() + # override the default output from pydantic by calling `to_dict()` of projects + if self.projects: + _dict['projects'] = self.projects.to_dict() + # override the default output from pydantic by calling `to_dict()` of staff + if self.staff: + _dict['staff'] = self.staff.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UdeOrganizationContent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "keywords": KeywordObject.from_dict(obj["keywords"]) if obj.get("keywords") is not None else None, + "news": NewsObject.from_dict(obj["news"]) if obj.get("news") is not None else None, + "projects": ProjectObject.from_dict(obj["projects"]) if obj.get("projects") is not None else None, + "staff": StaffObject.from_dict(obj["staff"]) if obj.get("staff") is not None else None, + "uri": obj.get("uri") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_persons/function_nested.py b/service/src/main/inse/models/ude_persons/function_nested.py new file mode 100644 index 00000000..97e618be --- /dev/null +++ b/service/src/main/inse/models/ude_persons/function_nested.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + UDE Persons Index Backend Models + + Pydantic models for the Elasticsearch \"ude_persons_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FunctionNested(BaseModel): + """ + Nested object for a person's functions and facilities. + """ # noqa: E501 + facility: Optional[StrictStr] = None + function: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["facility", "function"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FunctionNested from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FunctionNested from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "facility": obj.get("facility"), + "function": obj.get("function") + }) + return _obj + + diff --git a/service/src/main/inse/models/ude_persons/ude_person.py b/service/src/main/inse/models/ude_persons/ude_person.py new file mode 100644 index 00000000..12d90481 --- /dev/null +++ b/service/src/main/inse/models/ude_persons/ude_person.py @@ -0,0 +1,126 @@ +# coding: utf-8 + +""" + UDE Persons Index Backend Models + + Pydantic models for the Elasticsearch \"ude_persons_1.0\" index. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from db_models.models.function_nested import FunctionNested +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class UdePerson(BaseModel): + """ + Main document model for the ude_persons_1.0 index. + """ # noqa: E501 + affiliation_chair: Optional[StrictStr] = None + affiliation_faculty: Optional[StrictStr] = None + affiliation_institute: Optional[StrictStr] = None + affiliation_university: Optional[StrictStr] = None + firstname: Optional[StrictStr] = None + functions: Optional[List[FunctionNested]] = None + location: Optional[StrictStr] = None + lsf_id: Optional[StrictStr] = None + mail: Optional[StrictStr] = None + name: Optional[StrictStr] = None + room: Optional[StrictStr] = None + surname: Optional[StrictStr] = None + telefax: Optional[StrictStr] = None + telefon: Optional[StrictStr] = None + title: Optional[StrictStr] = None + web: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["affiliation_chair", "affiliation_faculty", "affiliation_institute", "affiliation_university", "firstname", "functions", "location", "lsf_id", "mail", "name", "room", "surname", "telefax", "telefon", "title", "web"] + + model_config = ConfigDict( + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UdePerson from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in functions (list) + _items = [] + if self.functions: + for _item_functions in self.functions: + if _item_functions: + _items.append(_item_functions.to_dict()) + _dict['functions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UdePerson from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "affiliation_chair": obj.get("affiliation_chair"), + "affiliation_faculty": obj.get("affiliation_faculty"), + "affiliation_institute": obj.get("affiliation_institute"), + "affiliation_university": obj.get("affiliation_university"), + "firstname": obj.get("firstname"), + "functions": [FunctionNested.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, + "location": obj.get("location"), + "lsf_id": obj.get("lsf_id"), + "mail": obj.get("mail"), + "name": obj.get("name"), + "room": obj.get("room"), + "surname": obj.get("surname"), + "telefax": obj.get("telefax"), + "telefon": obj.get("telefon"), + "title": obj.get("title"), + "web": obj.get("web") + }) + return _obj + + diff --git a/service/src/main/inse/persons/logic.py b/service/src/main/inse/persons/logic.py index a4dc5c0f..ede5e53a 100644 --- a/service/src/main/inse/persons/logic.py +++ b/service/src/main/inse/persons/logic.py @@ -14,11 +14,11 @@ from fastapi import HTTPException from .. import config from .. import util from ..integrations import llm -from inse.models.author import Author -from inse.models.authors_list_response import AuthorsListResponse +from inse.models.openalex.author import Author +from inse.models.openalex.authors_list_response import AuthorsListResponse from inse import util from inse.integrations import elasticsearch -from inse.models.meta import Meta +from inse.models.openalex.meta import Meta from inse.persons.query_builder import build_authors_search from inse.persons.model import CustomAuthor, CustomAuthorsListResponse, PersonSearchRequest logger = logging.getLogger(__name__) diff --git a/service/src/main/inse/persons/model.py b/service/src/main/inse/persons/model.py index 900d91d5..1973c763 100644 --- a/service/src/main/inse/persons/model.py +++ b/service/src/main/inse/persons/model.py @@ -7,11 +7,11 @@ Data models for persons / authors. from pydantic import BaseModel from pydantic import Field from typing import List, Optional -from inse.models.author import Author -from inse.models.meta import Meta -from inse.models.authors_list_response import AuthorsListResponse +from inse.models.openalex.author import Author +from inse.models.openalex.meta import Meta +from inse.models.openalex.authors_list_response import AuthorsListResponse -from inse.models.group_by_result import GroupByResult +from inse.models.openalex.group_by_result import GroupByResult class CustomAuthor(Author): diff --git a/service/src/main/inse/persons/service.py b/service/src/main/inse/persons/service.py index c442b578..a2000ab9 100644 --- a/service/src/main/inse/persons/service.py +++ b/service/src/main/inse/persons/service.py @@ -12,7 +12,7 @@ from fastapi import Query from typing import List from . import logic from . import model -from inse.models.authors_list_response import AuthorsListResponse +from inse.models.openalex.authors_list_response import AuthorsListResponse router = APIRouter( diff --git a/service/src/main/inse/topics/logic.py b/service/src/main/inse/topics/logic.py index 5d4bdef7..30fa51d1 100644 --- a/service/src/main/inse/topics/logic.py +++ b/service/src/main/inse/topics/logic.py @@ -13,12 +13,12 @@ from pydantic import ValidationError from starlette.status import HTTP_400_BAD_REQUEST from starlette.status import HTTP_502_BAD_GATEWAY -from inse.models.autocomplete_response import AutocompleteResponse -from inse.models.autocomplete_response_meta import AutocompleteResponseMeta -from inse.models.autocomplete_response_results_inner import ( +from inse.models.openalex.autocomplete_response import AutocompleteResponse +from inse.models.openalex.autocomplete_response_meta import AutocompleteResponseMeta +from inse.models.openalex.autocomplete_response_results_inner import ( AutocompleteResponseResultsInner, ) -from inse.models.topics_list_response import TopicsListResponse +from inse.models.openalex.topics_list_response import TopicsListResponse from .search_client import OpenAlexTopicsClient logger = logging.getLogger(__name__) diff --git a/service/src/main/inse/topics/service.py b/service/src/main/inse/topics/service.py index 70252254..1551b6d9 100644 --- a/service/src/main/inse/topics/service.py +++ b/service/src/main/inse/topics/service.py @@ -8,8 +8,8 @@ from typing import Annotated from fastapi import APIRouter from fastapi import Query -from inse.models.autocomplete_response import AutocompleteResponse -from inse.models.topics_list_response import TopicsListResponse +from inse.models.openalex.autocomplete_response import AutocompleteResponse +from inse.models.openalex.topics_list_response import TopicsListResponse from inse.tags import Tags from . import logic diff --git a/service/src/main/inse/util.py b/service/src/main/inse/util.py index 645e2235..38ed5e41 100644 --- a/service/src/main/inse/util.py +++ b/service/src/main/inse/util.py @@ -6,7 +6,7 @@ """ from typing import Optional from typing import TypeVar -from inse.models import Author +from inse.models.openalex import Author from . import model from fastapi import HTTPException from starlette.status import HTTP_404_NOT_FOUND diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py index b1ec3310..3b1f61fe 100644 --- a/service/src/main/inse/works/logic.py +++ b/service/src/main/inse/works/logic.py @@ -17,13 +17,13 @@ from starlette.status import HTTP_503_SERVICE_UNAVAILABLE from inse import config from inse.integrations import elasticsearch -from inse.models.work import Work -from inse.models.work_page import WorkPage -from inse.models.works_list_response import WorksListResponse -from inse.models.meta import Meta -from inse.models.topic_count import TopicCount -from inse.models.topics_by_year import TopicsByYear -from inse.models.topics_by_time import TopicsByTime +from inse.models.openalex.work import Work +from inse.models.openalex.work_page import WorkPage +from inse.models.openalex.works_list_response import WorksListResponse +from inse.models.openalex.meta import Meta +from inse.models.openalex.topic_count import TopicCount +from inse.models.openalex.topics_by_year import TopicsByYear +from inse.models.openalex.topics_by_time import TopicsByTime from .search_client import MissingApiKeyError from .search_client import OpenAlexWorksSearchClient diff --git a/service/src/main/inse/works/model.py b/service/src/main/inse/works/model.py index 8c0a8eee..e16d723a 100644 --- a/service/src/main/inse/works/model.py +++ b/service/src/main/inse/works/model.py @@ -10,7 +10,7 @@ from typing import Optional from pydantic import BaseModel from pydantic import Field -from inse.models.work import Work +from inse.models.openalex.work import Work class WorkSummary(BaseModel): diff --git a/service/src/main/inse/works/service.py b/service/src/main/inse/works/service.py index 8f6c20b6..e0d84c57 100644 --- a/service/src/main/inse/works/service.py +++ b/service/src/main/inse/works/service.py @@ -15,11 +15,11 @@ from inse.tags import Tags from .. import security from . import logic -from inse.models.work_page import WorkPage -from inse.models.work import Work -from inse.models.works_list_response import WorksListResponse -from inse.models.topic_count import TopicCount -from inse.models.topics_by_time import TopicsByTime +from inse.models.openalex.work_page import WorkPage +from inse.models.openalex.work import Work +from inse.models.openalex.works_list_response import WorksListResponse +from inse.models.openalex.topic_count import TopicCount +from inse.models.openalex.topics_by_time import TopicsByTime router = APIRouter(prefix="/api/works", tags=[Tags.WORKS]) diff --git a/service/src/main/inse/works/test_service.py b/service/src/main/inse/works/test_service.py index c16b033c..e910b8a9 100644 --- a/service/src/main/inse/works/test_service.py +++ b/service/src/main/inse/works/test_service.py @@ -2,11 +2,11 @@ from fastapi.testclient import TestClient from inse import config from inse.works import logic -from inse.models.work import Work -from inse.models.work_page import WorkPage -from inse.models.works_list_response import WorksListResponse -from inse.models.meta import Meta -from inse.models.work_topic import WorkTopic +from inse.models.openalex.work import Work +from inse.models.openalex.work_page import WorkPage +from inse.models.openalex.works_list_response import WorksListResponse +from inse.models.openalex.meta import Meta +from inse.models.openalex.work_topic import WorkTopic from inse.main import app From b114e337674be587f69e0cdc29fde8192ee04603 Mon Sep 17 00:00:00 2001 From: Kazgatari <56477241+Kazgatari@users.noreply.github.com> Date: Tue, 9 Jun 2026 21:44:17 +0200 Subject: [PATCH 10/97] corrected wrong import statements --- .../src/main/inse/models/news_aktuell/aktuell.py | 4 ++-- .../main/inse/models/patents_epo/epo_document.py | 2 +- .../inse/models/patents_uspto/uspto_patent.py | 16 ++++++++-------- .../inse/models/projects_bund/project_bund.py | 2 +- .../main/inse/models/projects_dfg/project_dfg.py | 4 ++-- .../main/inse/models/projects_dfg/stellvertr.py | 2 +- .../inse/models/projects_eu/category_nested.py | 2 +- .../main/inse/models/projects_eu/project_eu.py | 8 ++++---- .../ude_organization_content.py | 8 ++++---- .../main/inse/models/ude_persons/ude_person.py | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/service/src/main/inse/models/news_aktuell/aktuell.py b/service/src/main/inse/models/news_aktuell/aktuell.py index 9ba7e48c..8076484c 100644 --- a/service/src/main/inse/models/news_aktuell/aktuell.py +++ b/service/src/main/inse/models/news_aktuell/aktuell.py @@ -19,8 +19,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.link_item import LinkItem -from db_models.models.tag_item import TagItem +from inse.models.news_aktuell.link_item import LinkItem +from inse.models.news_aktuell.tag_item import TagItem from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/patents_epo/epo_document.py b/service/src/main/inse/models/patents_epo/epo_document.py index e4f29410..53975fdc 100644 --- a/service/src/main/inse/models/patents_epo/epo_document.py +++ b/service/src/main/inse/models/patents_epo/epo_document.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.inventor_nested import InventorNested +from inse.models.patents_epo.inventor_nested import InventorNested from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/patents_uspto/uspto_patent.py b/service/src/main/inse/models/patents_uspto/uspto_patent.py index cc1c05d0..179d5b55 100644 --- a/service/src/main/inse/models/patents_uspto/uspto_patent.py +++ b/service/src/main/inse/models/patents_uspto/uspto_patent.py @@ -19,14 +19,14 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.agent_nested import AgentNested -from db_models.models.applicant_nested import ApplicantNested -from db_models.models.assistant_examiner_nested import AssistantExaminerNested -from db_models.models.citation_object import CitationObject -from db_models.models.inventor_nested import InventorNested -from db_models.models.primary_examiner_nested import PrimaryExaminerNested -from db_models.models.priority_claim_nested import PriorityClaimNested -from db_models.models.related_documents_object import RelatedDocumentsObject +from inse.models.patents_uspto.agent_nested import AgentNested +from inse.models.patents_uspto.applicant_nested import ApplicantNested +from inse.models.patents_uspto.assistant_examiner_nested import AssistantExaminerNested +from inse.models.patents_uspto.citation_object import CitationObject +from inse.models.patents_uspto.inventor_nested import InventorNested +from inse.models.patents_uspto.primary_examiner_nested import PrimaryExaminerNested +from inse.models.patents_uspto.priority_claim_nested import PriorityClaimNested +from inse.models.patents_uspto.related_documents_object import RelatedDocumentsObject from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/projects_bund/project_bund.py b/service/src/main/inse/models/projects_bund/project_bund.py index 94dd44d9..65ab7ae8 100644 --- a/service/src/main/inse/models/projects_bund/project_bund.py +++ b/service/src/main/inse/models/projects_bund/project_bund.py @@ -20,7 +20,7 @@ import json from datetime import date from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.arb import Arb +from inse.models.projects_bund.arb import Arb from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/projects_dfg/project_dfg.py b/service/src/main/inse/models/projects_dfg/project_dfg.py index 55279a7c..6295f004 100644 --- a/service/src/main/inse/models/projects_dfg/project_dfg.py +++ b/service/src/main/inse/models/projects_dfg/project_dfg.py @@ -19,8 +19,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.auslaend import Auslaend -from db_models.models.stellvertr import Stellvertr +from inse.models.projects_dfg.auslaend import Auslaend +from inse.models.projects_dfg.stellvertr import Stellvertr from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/projects_dfg/stellvertr.py b/service/src/main/inse/models/projects_dfg/stellvertr.py index 357e71ea..641d6c33 100644 --- a/service/src/main/inse/models/projects_dfg/stellvertr.py +++ b/service/src/main/inse/models/projects_dfg/stellvertr.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.stellvertr_sprecherinnen import StellvertrSprecherinnen +from inse.models.projects_dfg.stellvertr_sprecherinnen import StellvertrSprecherinnen from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/projects_eu/category_nested.py b/service/src/main/inse/models/projects_eu/category_nested.py index 7d6c6d58..3bf4c794 100644 --- a/service/src/main/inse/models/projects_eu/category_nested.py +++ b/service/src/main/inse/models/projects_eu/category_nested.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.display_code_splitted_nested import DisplayCodeSplittedNested +from inse.models.projects_eu.display_code_splitted_nested import DisplayCodeSplittedNested from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/projects_eu/project_eu.py b/service/src/main/inse/models/projects_eu/project_eu.py index e9b74094..c332409d 100644 --- a/service/src/main/inse/models/projects_eu/project_eu.py +++ b/service/src/main/inse/models/projects_eu/project_eu.py @@ -19,10 +19,10 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.category_nested import CategoryNested -from db_models.models.keyword_nested import KeywordNested -from db_models.models.organization_nested import OrganizationNested -from db_models.models.programme_nested import ProgrammeNested +from inse.models.projects_eu.category_nested import CategoryNested +from inse.models.projects_eu.keyword_nested import KeywordNested +from inse.models.projects_eu.organization_nested import OrganizationNested +from inse.models.projects_eu.programme_nested import ProgrammeNested from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/ude_organizations/ude_organization_content.py b/service/src/main/inse/models/ude_organizations/ude_organization_content.py index 6b10d438..879ec30f 100644 --- a/service/src/main/inse/models/ude_organizations/ude_organization_content.py +++ b/service/src/main/inse/models/ude_organizations/ude_organization_content.py @@ -19,10 +19,10 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.keyword_object import KeywordObject -from db_models.models.news_object import NewsObject -from db_models.models.project_object import ProjectObject -from db_models.models.staff_object import StaffObject +from inse.models.ude_organizations.keyword_object import KeywordObject +from inse.models.ude_organizations.news_object import NewsObject +from inse.models.ude_organizations.project_object import ProjectObject +from inse.models.ude_organizations.staff_object import StaffObject from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python diff --git a/service/src/main/inse/models/ude_persons/ude_person.py b/service/src/main/inse/models/ude_persons/ude_person.py index 12d90481..80c08da0 100644 --- a/service/src/main/inse/models/ude_persons/ude_person.py +++ b/service/src/main/inse/models/ude_persons/ude_person.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from db_models.models.function_nested import FunctionNested +from inse.models.ude_persons.function_nested import FunctionNested from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python From d4eaf343e785e0723b3892eaee751bb2b069e820 Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Wed, 10 Jun 2026 08:03:30 +0200 Subject: [PATCH 11/97] change system_prompt & temperature/top_p --- service/src/main/inse/persons/logic.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/service/src/main/inse/persons/logic.py b/service/src/main/inse/persons/logic.py index ede5e53a..703c6006 100644 --- a/service/src/main/inse/persons/logic.py +++ b/service/src/main/inse/persons/logic.py @@ -77,20 +77,14 @@ def generate_person_bio(author_id: str, include: Optional[set[str]] = None) -> s person_json = json.dumps(person.model_dump_json()) system_prompt = """\ - Erstelle auf Basis der bereitgestellten OpenAlex-Daten ein kurzes Porträt der Person in 3-5 Sätzen. Die Person selbst ist das Subjekt: Beginne mit ihrem Namen und beschreibe sie als Forschende:n (z. B. „{name} ist ein:e Forscher:in im Bereich …"). Schreibe nicht über „die Forschung" oder „die Arbeit" im Abstrakten, sondern durchgehend über die Person. - - Gehe dabei auf folgende drei Punkte ein: - - 1. Besonderheiten: Was hebt die Person im Vergleich zu anderen Forschenden ähnlicher Karrierephase und ähnlichen Feldes hervor? (z. B. überdurchschnittlicher Impact gemessen an der aktiven Zeit, hoher Erst-/Korrespondenzautor-Anteil, einzelnes Breakout-Paper, frühe Positionierung in einem später gewachsenen Thema) - 2. Wirtschaftliche Relevanz: Arbeitet die Person in einem grundsätzlich anwendungsnahen/kommerziell interessanten Themenfeld oder eher in der Grundlagenforschung? - 3. Dynamik: Entwickelt sich ihr Publikations-/Zitationsverlauf zuletzt steigend, konstant oder abflachend? - - Stütze jede Aussage auf konkrete Werte aus den Daten und formuliere nichts, was sich nicht belegen lässt. Wenn die Daten für einen Punkt keine klare Aussage zulassen, formuliere ihn entsprechend zurückhaltend oder lasse ihn weg, statt zu spekulieren. Gib nur das Porträt zurück, ohne Einleitung oder Schluss.\ + Beschreibe in zwei Sätzen das Hauptforschungsfeld des Autors. Formuliere dabei allgemeinverständlich, sodass auch Personen ohne Fachwissen einen Einblick in die Forschung gewinnen. Nenne keine konkreten Publikationen oder Einzelwerke, sondern konzentriere dich auf die übergeordneten Forschungsinteressen und Themen. Verzichte auf bloße Aufzählungen und verbinde die Informationen zu einem flüssigen Text. + Beschreibe anschließend in ein bis zwei Sätzen die wirtschaftliche Relevanz der Forschung anhand von Anwendungen, Technologien oder Branchen, die davon profitieren könnten. + Verwende insgesamt maximal 100 bis 120 Wörter. Formuliere die Antwort so, dass sie ohne weitere Anpassungen direkt als Kurzbiografie verwendet werden kann. Verwende keine Superlative oder übertriebene Formulierungen, sondern bleibe sachlich und informativ. Gebe den Text als One-Liner zurück, ohne Zeilenumbrüche oder Aufzählungen. Verwende keine Gedankenstriche (– oder —) zur Gliederung von Sätzen. Formuliere stattdessen mit Kommas, Klammern oder zwei getrennten Sätzen. """ user_prompt = f"Daten zur Person:\n{person_json}" - bio = llm.call(system_prompt, user_prompt) + bio = llm.call(system_prompt=system_prompt, user_prompt=user_prompt, temperature=0.8, top_p=0.95) elapsed_time = time.time() - start_time logger.info( From 517b974ef253aa1a11ab413104e0f54839ff1ec7 Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Wed, 10 Jun 2026 09:11:52 +0200 Subject: [PATCH 12/97] add get_data_for_bio to fetch author data for bio generation --- service/src/main/inse/persons/logic.py | 133 +++++++++++++++++++++++-- 1 file changed, 127 insertions(+), 6 deletions(-) diff --git a/service/src/main/inse/persons/logic.py b/service/src/main/inse/persons/logic.py index 703c6006..d7b70048 100644 --- a/service/src/main/inse/persons/logic.py +++ b/service/src/main/inse/persons/logic.py @@ -64,17 +64,138 @@ def search_persons( return AuthorsListResponse(results=authors, meta=Meta(count=len(authors))) +def _fetch_author_display_name(author_id: str) -> Optional[str]: + + query = { + "query_string": { + "default_field": "_id", + "query": author_id, + } + } + + response = elasticsearch.search( + index=INDEX_NAME, + query=query, + source=["display_name"], + ) + + hits = response.get("hits", {}).get("hits", []) + + if not hits: + return None + + return hits[0].get("_source", {}).get("display_name") + + +def _fetch_works_and_topics(author_id: str) -> tuple[list, list]: + + WORK_SOURCE_FIELDS = [ + "title", + "display_name", + "abstract", + "cited_by_count", + "primary_topic", + ] + + author_url = f"https://openalex.org/{author_id.strip()}" + + authorship_query = { + "nested": { + "path": "authorships", + "query": { + "bool": { + "filter": [{"term": {"authorships.author.id": author_url}}], + } + }, + } + } + + body = { + "size": 100, + "sort": [{"cited_by_count": {"order": "desc"}}], + "_source": WORK_SOURCE_FIELDS, + "query": authorship_query, + "aggs": { + "primary_topics": { + "terms": {"field": "primary_topic.id", "size": 5}, + "aggs": { + "topic_name": { + "top_hits": { + "size": 1, + "_source": ["primary_topic.display_name"], + } + } + }, + } + }, + } + + response = elasticsearch.search( + index=config.settings.openalex_works_search_index, + body=body, + ) + + works = [] + for hit in response.get("hits", {}).get("hits", []): + works.append(hit.get("_source", {})) + + topics = [] + buckets = response.get("aggregations", {}).get("primary_topics", {}).get("buckets", []) + for bucket in buckets: + topic_hits = bucket.get("topic_name", {}).get("hits", {}).get("hits", []) + display_name = None + if topic_hits: + primary_topic = topic_hits[0].get("_source", {}).get("primary_topic", {}) + display_name = primary_topic.get("display_name") + topics.append({ + "id": bucket.get("key"), + "display_name": display_name, + "count": bucket.get("doc_count"), + }) + + return works, topics + + +def _build_papers(works: list) -> list: + + papers = [] + for work in works: + name = work.get("title") or work.get("display_name") + abstract = work.get("abstract") + papers.append({ + "name": name, + "abstract": abstract, + "stats": { + "cited_by_count": work.get("cited_by_count"), + }, + }) + return papers + + +def get_data_for_bio(author_id: str) -> Optional[dict]: + + display_name = _fetch_author_display_name(author_id) + if display_name is None: + return None + + works, top_topics = _fetch_works_and_topics(author_id) + papers = _build_papers(works) + + author_data = { + "display_name": display_name, + "topics": top_topics, + "papers": papers, + } + return author_data + def generate_person_bio(author_id: str, include: Optional[set[str]] = None) -> str: start_time = time.time() - search_result = search_persons(author_id=author_id) - if not search_result.results: + author_data = get_data_for_bio(author_id) + if author_data is None: return "No person found." - if len(search_result.results) > 1: - return "Multiple persons found, cannot generate bio." - person = search_result.results[0] - person_json = json.dumps(person.model_dump_json()) + person_json = json.dumps(author_data, ensure_ascii=False) system_prompt = """\ Beschreibe in zwei Sätzen das Hauptforschungsfeld des Autors. Formuliere dabei allgemeinverständlich, sodass auch Personen ohne Fachwissen einen Einblick in die Forschung gewinnen. Nenne keine konkreten Publikationen oder Einzelwerke, sondern konzentriere dich auf die übergeordneten Forschungsinteressen und Themen. Verzichte auf bloße Aufzählungen und verbinde die Informationen zu einem flüssigen Text. From 84f1cdfead7ddd34e8897a19057ed7b1935e02dd Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Wed, 10 Jun 2026 09:35:57 +0200 Subject: [PATCH 13/97] load bio via non-blocking route resolver --- webapp/src/app/app.routes.ts | 5 ++++ .../app/modules/person/person.component.ts | 22 +++++---------- .../src/app/resolvers/person-bio.resolver.ts | 27 +++++++++++++++++++ 3 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 webapp/src/app/resolvers/person-bio.resolver.ts diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 23a85220..b9139a9a 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -2,6 +2,7 @@ import { Routes } from '@angular/router'; import { userGuard } from './shared/guards/user.guard'; import { collaborationNetworkResolver } from './resolvers/collaboration-network.resolver'; import { personListResolver } from './resolvers/person-list.resolver'; +import { personBioResolver } from './resolvers/person-bio.resolver'; export const routes: Routes = [ { @@ -71,6 +72,10 @@ export const routes: Routes = [ import('./modules/person/person.component').then( (mod) => mod.PersonComponent, ), + resolve: { + personBio: personBioResolver, + }, + runGuardsAndResolvers: (from, to) => from.params['id'] !== to.params['id'], children: [ { path: '', diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts index 8c88f580..0d975d90 100644 --- a/webapp/src/app/modules/person/person.component.ts +++ b/webapp/src/app/modules/person/person.component.ts @@ -21,6 +21,7 @@ import { of, switchMap, finalize, map, catchError } from 'rxjs'; import { PersonInterestingComponent } from '../person-interesting/person-interesting.component'; import { PersonsService, WorksService } from '../../api'; import { LoadingComponent } from '../../shared/ui/loading/loading.component'; +import { PersonBioResolved } from '../../resolvers/person-bio.resolver'; const PERSON_INCLUDE_TAGS = 'topics_full,topic_share,summary_stats,ids,last_known_institutions,' + @@ -110,26 +111,17 @@ export class PersonComponent { ), { initialValue: null }, ); - // bio data + readonly personBio = toSignal( - toObservable(this.authorId).pipe( - switchMap((id) => { - if (!id) { + this.activatedRoute.data.pipe( + switchMap((data) => { + const resolved = data['personBio'] as PersonBioResolved | undefined; + if (!resolved) { this.isBioLoading.set(false); return of(null); } this.isBioLoading.set(true); - return this.personsApi.generatePersonBio(id).pipe( - map((result) => { - this.isBioLoading.set(false); - return result.bio ?? null; - }), - catchError((err) => { - console.error('Failed to load bio:', err); - this.isBioLoading.set(false); - return of(null); - }), - ); + return resolved.bio$.pipe(finalize(() => this.isBioLoading.set(false))); }), ), { initialValue: null }, diff --git a/webapp/src/app/resolvers/person-bio.resolver.ts b/webapp/src/app/resolvers/person-bio.resolver.ts new file mode 100644 index 00000000..298fbe9b --- /dev/null +++ b/webapp/src/app/resolvers/person-bio.resolver.ts @@ -0,0 +1,27 @@ +import { ResolveFn } from '@angular/router'; +import { inject } from '@angular/core'; +import { Observable, of, map, catchError } from 'rxjs'; +import { PersonsService } from '../api'; + +export interface PersonBioResolved { + bio$: Observable; +} + +export const personBioResolver: ResolveFn = (route) => { + const authorId = route.paramMap.get('id'); + const personsApi = inject(PersonsService); + + if (!authorId) { + return { bio$: of(null) }; + } + + const bio$ = personsApi.generatePersonBio(authorId).pipe( + map((result) => result.bio ?? null), + catchError((err) => { + console.error('Failed to load bio:', err); + return of(null); + }), + ); + + return { bio$ }; +}; From 0f212d189ea17c734466c0a0c72b9930a0022f2e Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 10 Jun 2026 14:13:28 +0200 Subject: [PATCH 14/97] removed fuzziness from person names matching + added applying rescoring strategy when query is empty --- .../src/main/inse/persons/query_builder.py | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/service/src/main/inse/persons/query_builder.py b/service/src/main/inse/persons/query_builder.py index 01bd9343..a258b99a 100644 --- a/service/src/main/inse/persons/query_builder.py +++ b/service/src/main/inse/persons/query_builder.py @@ -275,14 +275,13 @@ def build_authors_search_rescored( } } }, - # { - # "match": { - # "display_name": { - # "query": query, - # "fuzziness": 1 - # } - # } - # } + { + "match": { + "display_name": { + "query": query + } + } + } ], "minimum_should_match": 1 } @@ -473,7 +472,7 @@ def build_authors_search_rescored( functions.append(works_count_boost_query) # Combine query and filters body = {} - + if functions: inner_query = None if query_clause: @@ -486,6 +485,15 @@ def build_authors_search_rescored( } else: inner_query = query_clause + # if query not null then multiply with name matching + body["query"] = { + "function_score": { + "query": inner_query, + "functions": functions, + "score_mode": "multiply", + "boost_mode": "multiply" + } + } else: if filter_clauses: inner_query = { @@ -495,15 +503,15 @@ def build_authors_search_rescored( } else: inner_query = {"match_all": {}} - - body["query"] = { - "function_score": { - "query": inner_query, - "functions": functions, - "score_mode": "multiply", - "boost_mode": "replace" + # if the query is null, replace the scoring completely + body["query"] = { + "function_score": { + "query": inner_query, + "functions": functions, + "score_mode": "multiply", + "boost_mode": "replace" + } } - } else: if query_clause: if filter_clauses: From abe96098b5161a585cd799cb7c18bda440dd27f3 Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 10 Jun 2026 14:13:58 +0200 Subject: [PATCH 15/97] increased timeout for elastic rqeuests up to 30 seconds --- service/src/main/inse/integrations/elasticsearch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/main/inse/integrations/elasticsearch.py b/service/src/main/inse/integrations/elasticsearch.py index 2bb78629..654cf455 100644 --- a/service/src/main/inse/integrations/elasticsearch.py +++ b/service/src/main/inse/integrations/elasticsearch.py @@ -45,7 +45,7 @@ def search( } } - with httpx.Client() as client: + with httpx.Client(timeout=httpx.Timeout(30.0)) as client: response = client.post( f"{config.settings.elasticsearch_url}/{index}/_search", json=payload, From 6979aaef8d7f15f5f545202362ce02059579044b Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 10 Jun 2026 14:22:03 +0200 Subject: [PATCH 16/97] fixed loading component --- .../app/modules/person/person.component.html | 20 ++++++++----------- .../shared/ui/loading/loading.component.html | 4 +++- .../shared/ui/loading/loading.component.ts | 5 +++-- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/webapp/src/app/modules/person/person.component.html b/webapp/src/app/modules/person/person.component.html index 065b3638..ad1e8518 100644 --- a/webapp/src/app/modules/person/person.component.html +++ b/webapp/src/app/modules/person/person.component.html @@ -50,10 +50,10 @@
@if (isBioLoading()) { + [size]="150" + [diameter]="150"> } @else if (personBio() != null) {

Biografie

{{ personBio() }}

@@ -86,15 +86,11 @@ } @if (isNetworkResolving()) { -
-
- - - graph_3 - -
- Das Netzwerk wird gebaut, kleinen Moment... -
+ } @else { } diff --git a/webapp/src/app/shared/ui/loading/loading.component.html b/webapp/src/app/shared/ui/loading/loading.component.html index c85ce5c1..e8f07ec6 100644 --- a/webapp/src/app/shared/ui/loading/loading.component.html +++ b/webapp/src/app/shared/ui/loading/loading.component.html @@ -1,6 +1,8 @@
- + {{ icon }} diff --git a/webapp/src/app/shared/ui/loading/loading.component.ts b/webapp/src/app/shared/ui/loading/loading.component.ts index 4e658d55..2a317fd4 100644 --- a/webapp/src/app/shared/ui/loading/loading.component.ts +++ b/webapp/src/app/shared/ui/loading/loading.component.ts @@ -1,6 +1,7 @@ import { Component, Input } from '@angular/core'; import { MatProgressSpinner } from '@angular/material/progress-spinner'; import { MatIcon } from '@angular/material/icon'; +import { numberAttribute } from '@angular/core'; @Component({ selector: 'app-loading', imports: [MatProgressSpinner, MatIcon], @@ -10,6 +11,6 @@ import { MatIcon } from '@angular/material/icon'; export class LoadingComponent { @Input() text = 'Laden...'; @Input() icon = 'graph_3'; - @Input() size = '150'; - @Input() diameter = '150'; + @Input({ transform: numberAttribute }) size = 150; + @Input({ transform: numberAttribute }) diameter = 150; } From 8e284916e65b921992228f2b5b47a9a6e08785e4 Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 10 Jun 2026 14:25:20 +0200 Subject: [PATCH 17/97] added resolver for person component --- webapp/src/app/app.routes.ts | 2 ++ .../app/modules/person/person.component.ts | 17 +++----------- webapp/src/app/resolvers/person.resolver.ts | 23 +++++++++++++++++++ .../ui/app-layout/app-layout.component.html | 12 +++++++--- 4 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 webapp/src/app/resolvers/person.resolver.ts diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 07e09215..c19c5b60 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -3,6 +3,7 @@ import { userGuard } from './shared/guards/user.guard'; import { collaborationNetworkResolver } from './resolvers/collaboration-network.resolver'; import { personListResolver } from './resolvers/person-list.resolver'; import { personBioResolver } from './resolvers/person-bio.resolver'; +import { personResolver } from './resolvers/person.resolver'; export const routes: Routes = [ { @@ -75,6 +76,7 @@ export const routes: Routes = [ (mod) => mod.PersonComponent, ), resolve: { + personData: personResolver, personBio: personBioResolver, }, runGuardsAndResolvers: (from, to) => from.params['id'] !== to.params['id'], diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts index 0d975d90..2dd189ec 100644 --- a/webapp/src/app/modules/person/person.component.ts +++ b/webapp/src/app/modules/person/person.component.ts @@ -93,20 +93,9 @@ export class PersonComponent { readonly isBioLoading = signal(false); readonly person = toSignal( - toObservable(this.authorId).pipe( - switchMap((id) => { - if (!id) return of(null); - this.isPersonLoading.set(true); - return this.personsApi - .searchPersons(id, undefined, PERSON_INCLUDE_TAGS) - .pipe( - map((result) => result.results?.[0] ?? null), - catchError((err) => { - console.error('Failed to load person:', err); - return of(null); - }), - finalize(() => this.isPersonLoading.set(false)), - ); + this.activatedRoute.data.pipe( + map(({ personData }) => { + return personData?.results[0] ?? null; }), ), { initialValue: null }, diff --git a/webapp/src/app/resolvers/person.resolver.ts b/webapp/src/app/resolvers/person.resolver.ts new file mode 100644 index 00000000..a20198f2 --- /dev/null +++ b/webapp/src/app/resolvers/person.resolver.ts @@ -0,0 +1,23 @@ +import { ResolveFn } from '@angular/router'; +import { inject } from '@angular/core'; +import { AuthorsListResponse, PersonsService } from '../api'; + +export const personResolver: ResolveFn = ( + route, + state, +) => { + const parseQueryParamArray = (val: any): string[] => { + if (!val) return []; + if (Array.isArray(val)) return val; + return [val]; + }; + const PERSON_INCLUDE_TAGS = + 'topics_full,topic_share,summary_stats,ids,last_known_institutions,' + + 'sources,counts_by_year,works_api_url,dates,cited_by_count_boost'; + const params = route.paramMap; + + const query = params.get('id') || undefined; + const personsService = inject(PersonsService); + + return personsService.searchPersons(query, undefined, PERSON_INCLUDE_TAGS); +}; diff --git a/webapp/src/app/shared/ui/app-layout/app-layout.component.html b/webapp/src/app/shared/ui/app-layout/app-layout.component.html index b0149b11..1c3a8d9b 100644 --- a/webapp/src/app/shared/ui/app-layout/app-layout.component.html +++ b/webapp/src/app/shared/ui/app-layout/app-layout.component.html @@ -39,12 +39,18 @@
- @if (resolverState.isResolvingPersonsFromOutside()) { + @if (resolverState.isResolvingFromOutside('/persons')) { + [size]="200" + [diameter]="200" /> + } @else if (resolverState.isResolvingFromOutside('/person/')) { + } @else { } From 560af6a1eb906d01176a892e146c117acefb005b Mon Sep 17 00:00:00 2001 From: genja Date: Wed, 10 Jun 2026 14:28:37 +0200 Subject: [PATCH 18/97] updated loadingState computing --- .../person-list/person-list.component.ts | 37 ++++--------------- .../shared/services/resolver-state.service.ts | 21 ++++++++--- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/webapp/src/app/modules/person-list/person-list.component.ts b/webapp/src/app/modules/person-list/person-list.component.ts index 24648ef7..12e84ef7 100644 --- a/webapp/src/app/modules/person-list/person-list.component.ts +++ b/webapp/src/app/modules/person-list/person-list.component.ts @@ -1,4 +1,4 @@ -import { Component, inject, signal, DestroyRef, Signal } from '@angular/core'; +import { Component, inject, signal, DestroyRef, computed } from '@angular/core'; import { Router, RouterLink, ActivatedRoute } from '@angular/router'; import { CommonModule } from '@angular/common'; import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @@ -11,10 +11,10 @@ import { MatInputModule } from '@angular/material/input'; import { MatButtonModule } from '@angular/material/button'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatRadioModule } from '@angular/material/radio'; +import { ResolverStateService } from '../../shared/services/resolver-state.service'; import { CustomAuthor, - DehydratedInstitution, PersonsService, InstitutionsService, } from '../../api'; @@ -36,15 +36,7 @@ import { MatAutocompleteModule, MatAutocompleteSelectedEvent, } from '@angular/material/autocomplete'; -import { MatSnackBar } from '@angular/material/snack-bar'; import { SkTextDirective } from '../../custom-directives/sk-text.directive'; -import { - NavigationError, - NavigationEnd, - NavigationStart, - NavigationCancel, -} from '@angular/router'; -import { createLoadError } from '../../shared/utils/errorHandler'; @Component({ selector: 'app-person-list', @@ -77,10 +69,13 @@ export class PersonListComponent { private readonly destroyRef = inject(DestroyRef); public readonly state = inject(SharedStateService); public readonly paginationService = inject(PaginationService); + public readonly resolverStateService = inject(ResolverStateService); private readonly defaultIncludes = 'display_name,works_count,cited_by_count,topics,orcid,relevance_rating,last_known_institutions,affiliations'; - readonly loadingState = signal(false); + readonly loadingState = computed(() => + this.resolverStateService.isResolvingInside('/persons'), + ); persons: CustomAuthor[] = []; total = 0; currentPage = 1; @@ -124,22 +119,6 @@ export class PersonListComponent { // Bookmarking bookmarkedIds = new Set(); constructor() { - this.router.events - .pipe(takeUntilDestroyed(this.destroyRef)) - .subscribe((event) => { - if (event instanceof NavigationStart) { - this.loadingState.set(true); - } - - if ( - event instanceof NavigationEnd || - event instanceof NavigationCancel || - event instanceof NavigationError - ) { - this.loadingState.set(false); - } - }); - if (!this.institutionControl.value) { this.yearFilterEnabledControl.disable(); } @@ -185,7 +164,6 @@ export class PersonListComponent { this.sortOrderControl.setValue(sortOrder, { emitEvent: false }); this.updateSortOrderState(this.sortValueControl.value); } - // Sync search box & institution input if (this.searchValue() !== query) { @@ -220,9 +198,8 @@ export class PersonListComponent { .subscribe(({ persons }) => { this.persons = (persons.results ?? []) as CustomAuthor[]; this.total = persons.meta?.count; - this.loadingState.set(false); }); - + // listen for sorting selectors changes this.sortValueControl.valueChanges .pipe(takeUntilDestroyed(this.destroyRef)) diff --git a/webapp/src/app/shared/services/resolver-state.service.ts b/webapp/src/app/shared/services/resolver-state.service.ts index f3a3b79c..d992ae74 100644 --- a/webapp/src/app/shared/services/resolver-state.service.ts +++ b/webapp/src/app/shared/services/resolver-state.service.ts @@ -15,12 +15,6 @@ export class ResolverStateService { readonly previousUrl = signal(null); readonly isResolving = computed(() => this.resolvingUrl() !== null); - readonly isResolvingPersonsFromOutside = computed(() => { - const from = this.previousUrl(); - const to = this.resolvingUrl(); - if (!to?.startsWith('/persons')) return false; - return !from?.startsWith('/persons'); // came from outside - }); constructor() { this.router.events.subscribe((event) => { @@ -38,4 +32,19 @@ export class ResolverStateService { } }); } + + isResolvingFromOutside(path: string) { + const from = this.previousUrl(); + const to = this.resolvingUrl(); + if (!to?.startsWith(path)) return false; + return !from?.startsWith(path); // came from outside + } + + isResolvingInside(path: string) { + const from = this.previousUrl(); + const to = this.resolvingUrl(); + console.log(from, to, to?.startsWith(path) && from?.startsWith(path)); + if (to?.startsWith(path) && from?.startsWith(path)) return true; + return false; + } } From b0b2ca20859c713315fb6d49ac9636d33fabf834 Mon Sep 17 00:00:00 2001 From: Steven Tischer Date: Wed, 10 Jun 2026 16:30:10 +0200 Subject: [PATCH 19/97] add cluster parameter to elasticsearch integration (nes/inse) --- service/src/main/inse/.env | 3 ++ service/src/main/inse/config.py | 2 ++ .../main/inse/integrations/elasticsearch.py | 30 ++++++++++++++----- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/service/src/main/inse/.env b/service/src/main/inse/.env index f2fc4762..2b84a5ea 100644 --- a/service/src/main/inse/.env +++ b/service/src/main/inse/.env @@ -1,6 +1,9 @@ ELASTICSEARCH_URL=https://project.nes.uni-due.de/elastic/ ELASTICSEARCH_API_KEY=am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ +ELASTICSEARCH_INSE_URL=https://inse.nes.uni-due.de/elastic/ +ELASTICSEARCH_INSE_API_KEY=bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== + LLM_API_URL=https://project.nes.uni-due.de/llm2/v1/ LLM_API_KEY=c2d5e7ccf7a4760dd3d19bed2caed9d85ff7437400e0ea82a6d6f912ebc2f212 LLM_MODEL=gemma4-e4b \ No newline at end of file diff --git a/service/src/main/inse/config.py b/service/src/main/inse/config.py index 4d83fe03..bfa60cfc 100644 --- a/service/src/main/inse/config.py +++ b/service/src/main/inse/config.py @@ -47,6 +47,8 @@ class Settings(BaseSettings): # elasticsearch config elasticsearch_url: Optional[str] = None elasticsearch_api_key: Optional[str] = None + elasticsearch_inse_url: Optional[str] = None + elasticsearch_inse_api_key: Optional[str] = None model_config = SettingsConfigDict(env_file=".env") diff --git a/service/src/main/inse/integrations/elasticsearch.py b/service/src/main/inse/integrations/elasticsearch.py index 654cf455..870d833f 100644 --- a/service/src/main/inse/integrations/elasticsearch.py +++ b/service/src/main/inse/integrations/elasticsearch.py @@ -3,6 +3,16 @@ import httpx from .. import config +def _cluster_credentials(cluster: str) -> tuple[str, str]: + + if cluster == "nes": + return config.settings.elasticsearch_url, config.settings.elasticsearch_api_key + elif cluster == "inse": + return config.settings.elasticsearch_inse_url, config.settings.elasticsearch_inse_api_key + else: + raise ValueError(f"Unbekannter Cluster: {cluster!r} (erlaubt: 'nes', 'inse')") + + def search( index: str, query_field: str = None, @@ -13,11 +23,14 @@ def search( offset:int = None, sort: list = None, body: dict = None, - track_total_hits = False + track_total_hits = False, + cluster: str = "nes", ) -> dict[str, Any]: + elasticsearch_url, api_key = _cluster_credentials(cluster) + headers = { - "Authorization": f"ApiKey {config.settings.elasticsearch_api_key}", + "Authorization": f"ApiKey {api_key}", "Content-Type": "application/json" } @@ -47,20 +60,25 @@ def search( with httpx.Client(timeout=httpx.Timeout(30.0)) as client: response = client.post( - f"{config.settings.elasticsearch_url}/{index}/_search", + f"{elasticsearch_url}/{index}/_search", json=payload, headers=headers ) response.raise_for_status() return response.json() + + def get( index: str, doc_id: str, source: list = None, + cluster: str = "nes", ) -> dict[str, Any]: + elasticsearch_url, api_key = _cluster_credentials(cluster) + headers = { - "Authorization": f"ApiKey {config.settings.elasticsearch_api_key}", + "Authorization": f"ApiKey {api_key}", "Content-Type": "application/json" } @@ -70,11 +88,9 @@ def get( with httpx.Client() as client: response = client.get( - f"{config.settings.elasticsearch_url}/{index}/_doc/{doc_id}", + f"{elasticsearch_url}/{index}/_doc/{doc_id}", params=params, headers=headers ) response.raise_for_status() return response.json() - - From b657508f1a8506b8d06605c52c3de7efa69e41cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20Paul=20Ton=C4=8Dik?= Date: Wed, 10 Jun 2026 21:24:26 +0200 Subject: [PATCH 20/97] Added institution based finding of bund and eu projects --- projects_eu_all_names.txt | 8 + service/src/main/inse/.env | 5 +- service/src/main/inse/config.py | 3 + .../institutions_search_client.py | 132 + service/src/main/inse/institutions/logic.py | 42 +- .../main/inse/institutions/search_client.py | 11 +- service/src/main/inse/institutions/service.py | 58 +- service/src/main/inse/main.py | 3 + service/src/main/inse/models/bund_project.py | 226 ++ service/src/main/inse/models/dfg_project.py | 94 + service/src/main/inse/models/eu_project.py | 192 ++ service/src/main/inse/projects/model.py | 31 + .../inse/projects/projects_search_client.py | 297 ++ service/src/main/inse/projects/router.py | 135 + service/src/main/inse/projects/service.py | 95 + service/src/main/inse/tags.py | 1 + ude_person.http | 255 +- webapp/openapi.json | 182 -- webapp/src/app/api/.openapi-generator/FILES | 171 +- webapp/src/app/api/README.md | 91 +- webapp/src/app/api/api.base.service.ts | 158 +- webapp/src/app/api/api.module.ts | 52 +- webapp/src/app/api/api/api.ts | 35 +- webapp/src/app/api/api/funding.service.ts | 378 +-- .../app/api/api/funding.serviceInterface.ts | 49 - .../app/api/api/iNSEAccountService.service.ts | 482 ++-- webapp/src/app/api/api/iNSEService.service.ts | 1357 +++------ .../api/api/inse-account-service.service.ts | 347 --- .../inse-account-service.serviceInterface.ts | 51 - .../src/app/api/api/inse-service.service.ts | 957 ------ .../api/api/inse-service.serviceInterface.ts | 108 - .../src/app/api/api/institutions.service.ts | 552 ++-- .../api/api/institutions.serviceInterface.ts | 67 - webapp/src/app/api/api/items.service.ts | 912 +++--- .../src/app/api/api/items.serviceInterface.ts | 77 - .../src/app/api/api/person-network.service.ts | 172 -- .../api/person-network.serviceInterface.ts | 36 - .../src/app/api/api/personNetwork.service.ts | 215 +- webapp/src/app/api/api/persons.service.ts | 2554 ++++++----------- .../app/api/api/persons.serviceInterface.ts | 226 -- webapp/src/app/api/api/projects.service.ts | 246 ++ webapp/src/app/api/api/topics.service.ts | 975 +++---- .../app/api/api/topics.serviceInterface.ts | 100 - webapp/src/app/api/api/works.service.ts | 1027 +++---- .../src/app/api/api/works.serviceInterface.ts | 98 - webapp/src/app/api/configuration.ts | 368 ++- webapp/src/app/api/encoder.ts | 24 +- webapp/src/app/api/model/access-grant.ts | 18 - webapp/src/app/api/model/accessGrant.ts | 16 +- webapp/src/app/api/model/auth-scope.ts | 17 - webapp/src/app/api/model/authAccount.ts | 12 +- webapp/src/app/api/model/authScope.ts | 14 +- .../api/model/author-affiliations-inner.ts | 18 - .../api/model/author-counts-by-year-inner.ts | 18 - webapp/src/app/api/model/author-ids.ts | 18 - .../src/app/api/model/author-network-node.ts | 26 - .../api/model/author-parsed-longest-name.ts | 20 - .../app/api/model/author-position-count.ts | 16 - .../src/app/api/model/author-summary-stats.ts | 19 - webapp/src/app/api/model/author.ts | 54 +- .../app/api/model/authorAffiliationsInner.ts | 10 +- .../app/api/model/authorCountsByYearInner.ts | 12 +- webapp/src/app/api/model/authorIds.ts | 12 +- webapp/src/app/api/model/authorNetworkNode.ts | 34 +- .../app/api/model/authorParsedLongestName.ts | 16 +- .../src/app/api/model/authorPositionCount.ts | 14 +- .../src/app/api/model/authorSummaryStats.ts | 12 +- .../api/model/authors-filter-properties.ts | 24 - .../app/api/model/authors-list-response.ts | 21 - .../app/api/model/authorsFilterProperties.ts | 30 +- .../src/app/api/model/authorsListResponse.ts | 12 +- webapp/src/app/api/model/authorship.ts | 24 +- .../api/model/autocomplete-response-meta.ts | 17 - .../autocomplete-response-results-inner.ts | 22 - .../app/api/model/autocomplete-response.ts | 19 - .../src/app/api/model/autocompleteResponse.ts | 10 +- .../app/api/model/autocompleteResponseMeta.ts | 10 +- .../model/autocompleteResponseResultsInner.ts | 20 +- webapp/src/app/api/model/award.ts | 18 +- webapp/src/app/api/model/bundProject.ts | 42 + webapp/src/app/api/model/bundProjectPage.ts | 31 + webapp/src/app/api/model/categoryNested.ts | 26 + .../api/model/collaboration-network-edge.ts | 20 - .../model/collaboration-network-node-type.ts | 17 - .../app/api/model/collaboration-network.ts | 41 - .../src/app/api/model/collaborationNetwork.ts | 54 +- .../app/api/model/collaborationNetworkEdge.ts | 22 +- .../api/model/collaborationNetworkNodeType.ts | 13 +- webapp/src/app/api/model/cost-usd.ts | 14 - webapp/src/app/api/model/costUsd.ts | 7 +- webapp/src/app/api/model/custom-author.ts | 37 - .../api/model/custom-authors-list-response.ts | 20 - webapp/src/app/api/model/customAuthor.ts | 42 +- .../api/model/customAuthorsListResponse.ts | 14 +- webapp/src/app/api/model/dehydrated-author.ts | 18 - webapp/src/app/api/model/dehydrated-funder.ts | 18 - .../app/api/model/dehydrated-institution.ts | 21 - webapp/src/app/api/model/dehydrated-source.ts | 26 - webapp/src/app/api/model/dehydratedAuthor.ts | 12 +- webapp/src/app/api/model/dehydratedFunder.ts | 12 +- .../app/api/model/dehydratedInstitution.ts | 18 +- webapp/src/app/api/model/dehydratedSource.ts | 28 +- ...ccount.ts => displayCodeSplittedNested.ts} | 10 +- webapp/src/app/api/model/euProject.ts | 51 + webapp/src/app/api/model/euProjectPage.ts | 31 + .../src/app/api/model/filter-information.ts | 30 - webapp/src/app/api/model/filter-properties.ts | 20 - webapp/src/app/api/model/filterInformation.ts | 38 +- webapp/src/app/api/model/filterProperties.ts | 18 +- webapp/src/app/api/model/funder-by-author.ts | 21 - webapp/src/app/api/model/funderByAuthor.ts | 22 +- .../api/model/funders-by-author-response.ts | 17 - .../app/api/model/fundersByAuthorResponse.ts | 14 +- webapp/src/app/api/model/fwci.ts | 7 +- webapp/src/app/api/model/group-by-result.ts | 18 - webapp/src/app/api/model/groupByResult.ts | 12 +- .../src/app/api/model/hTTPValidationError.ts | 8 +- .../app/api/model/http-validation-error.ts | 14 - webapp/src/app/api/model/identity-grant.ts | 17 - webapp/src/app/api/model/identityGrant.ts | 14 +- webapp/src/app/api/model/institution-geo.ts | 24 - webapp/src/app/api/model/institution-ids.ts | 21 - .../app/api/model/institution-information.ts | 20 - .../app/api/model/institution-network-node.ts | 26 - webapp/src/app/api/model/institution.ts | 54 +- webapp/src/app/api/model/institutionGeo.ts | 20 +- webapp/src/app/api/model/institutionIds.ts | 18 +- .../app/api/model/institutionInformation.ts | 22 +- .../app/api/model/institutionNetworkNode.ts | 34 +- .../api/model/institutions-list-response.ts | 21 - .../app/api/model/institutionsListResponse.ts | 12 +- webapp/src/app/api/model/item-create.ts | 20 - webapp/src/app/api/model/item-page.ts | 29 - webapp/src/app/api/model/item.ts | 30 +- webapp/src/app/api/model/itemCreate.ts | 22 +- webapp/src/app/api/model/itemPage.ts | 38 +- ...-yr-mean-citedness.ts => keywordNested.ts} | 8 +- webapp/src/app/api/model/latitude.ts | 7 +- webapp/src/app/api/model/location.ts | 26 +- webapp/src/app/api/model/longitude.ts | 7 +- webapp/src/app/api/model/meta.ts | 22 +- .../app/api/model/model2YrMeanCitedness.ts | 7 +- webapp/src/app/api/model/models.ts | 154 +- webapp/src/app/api/model/open-access.ts | 19 - webapp/src/app/api/model/openAccess.ts | 14 +- .../src/app/api/model/organizationNested.ts | 20 + webapp/src/app/api/model/personBio.ts | 14 +- .../{person-bio.ts => programmeNested.ts} | 13 +- .../publication-ids-by-author-position.ts | 16 - .../api/model/publicationDetailByFunder.ts | 45 + .../model/publicationIdsByAuthorPosition.ts | 14 +- .../model/publications-by-author-response.ts | 19 - .../api/model/publicationsByAuthorResponse.ts | 20 +- webapp/src/app/api/model/score.ts | 7 +- webapp/src/app/api/model/topic-count.ts | 22 - webapp/src/app/api/model/topic-domain.ts | 17 - webapp/src/app/api/model/topic-field.ts | 17 - webapp/src/app/api/model/topic-ids.ts | 17 - webapp/src/app/api/model/topic-subfield.ts | 17 - webapp/src/app/api/model/topic.ts | 40 +- webapp/src/app/api/model/topicCount.ts | 26 +- webapp/src/app/api/model/topicDomain.ts | 10 +- webapp/src/app/api/model/topicField.ts | 10 +- webapp/src/app/api/model/topicIds.ts | 10 +- webapp/src/app/api/model/topicSubfield.ts | 10 +- webapp/src/app/api/model/topics-by-time.ts | 33 - webapp/src/app/api/model/topics-by-year.ts | 29 - .../src/app/api/model/topics-list-response.ts | 21 - webapp/src/app/api/model/topicsByTime.ts | 48 +- webapp/src/app/api/model/topicsByYear.ts | 38 +- .../src/app/api/model/topicsListResponse.ts | 12 +- .../api/model/validation-error-loc-inner.ts | 11 - webapp/src/app/api/model/validation-error.ts | 16 - webapp/src/app/api/model/validationError.ts | 12 +- .../app/api/model/validationErrorLocInner.ts | 7 +- webapp/src/app/api/model/value.ts | 7 +- webapp/src/app/api/model/work-biblio.ts | 19 - .../work-citation-normalized-percentile.ts | 19 - .../model/work-cited-by-percentile-year.ts | 17 - .../api/model/work-counts-by-year-inner.ts | 17 - webapp/src/app/api/model/work-has-content.ts | 17 - webapp/src/app/api/model/work-ids.ts | 20 - webapp/src/app/api/model/work-keyword.ts | 19 - webapp/src/app/api/model/work-mesh-inner.ts | 20 - webapp/src/app/api/model/work-network-node.ts | 29 - webapp/src/app/api/model/work-page.ts | 33 - ...ork-sustainable-development-goals-inner.ts | 19 - webapp/src/app/api/model/work-topic-domain.ts | 17 - webapp/src/app/api/model/work-topic-field.ts | 17 - .../app/api/model/work-topic-information.ts | 20 - .../src/app/api/model/work-topic-subfield.ts | 17 - webapp/src/app/api/model/work-topic.ts | 25 - webapp/src/app/api/model/work.ts | 106 +- webapp/src/app/api/model/workBiblio.ts | 14 +- .../model/workCitationNormalizedPercentile.ts | 12 +- .../api/model/workCitedByPercentileYear.ts | 10 +- .../app/api/model/workCountsByYearInner.ts | 10 +- webapp/src/app/api/model/workHasContent.ts | 10 +- webapp/src/app/api/model/workIds.ts | 16 +- webapp/src/app/api/model/workKeyword.ts | 12 +- webapp/src/app/api/model/workMeshInner.ts | 16 +- webapp/src/app/api/model/workNetworkNode.ts | 38 +- webapp/src/app/api/model/workPage.ts | 46 +- .../workSustainableDevelopmentGoalsInner.ts | 12 +- webapp/src/app/api/model/workTopic.ts | 18 +- webapp/src/app/api/model/workTopicDomain.ts | 10 +- webapp/src/app/api/model/workTopicField.ts | 10 +- .../src/app/api/model/workTopicInformation.ts | 22 +- webapp/src/app/api/model/workTopicSubfield.ts | 10 +- .../app/api/model/works-filter-properties.ts | 32 - .../src/app/api/model/works-list-response.ts | 21 - .../app/api/model/worksFilterProperties.ts | 46 +- webapp/src/app/api/model/worksListResponse.ts | 12 +- webapp/src/app/api/param.ts | 37 +- webapp/src/app/api/provide-api.ts | 24 +- webapp/src/app/api/variables.ts | 10 +- webapp/src/app/app.routes.ts | 21 +- .../src/app/directives/debounce.directive.ts | 30 + .../institution-projects-bund.component.html | 41 + .../institution-projects-bund.component.scss | 3 + .../institution-projects-bund.component.ts | 109 + .../institution-projects-eu.component.html | 40 + .../institution-projects-eu.component.scss | 0 .../institution-projects-eu.component.ts | 104 + .../institution/institution.component.html | 36 +- .../institution/institution.component.scss | 3 + .../institution/institution.component.ts | 117 +- .../app/resolvers/bund-projects.resolver.ts | 27 + .../src/app/resolvers/eu-projects.resolver.ts | 23 + .../src/app/resolvers/institution.resolver.ts | 17 + 230 files changed, 7034 insertions(+), 10862 deletions(-) create mode 100644 projects_eu_all_names.txt create mode 100644 service/src/main/inse/institutions/institutions_search_client.py create mode 100644 service/src/main/inse/models/bund_project.py create mode 100644 service/src/main/inse/models/dfg_project.py create mode 100644 service/src/main/inse/models/eu_project.py create mode 100644 service/src/main/inse/projects/model.py create mode 100644 service/src/main/inse/projects/projects_search_client.py create mode 100644 service/src/main/inse/projects/router.py create mode 100644 service/src/main/inse/projects/service.py delete mode 100644 webapp/openapi.json delete mode 100644 webapp/src/app/api/api/funding.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/inse-account-service.service.ts delete mode 100644 webapp/src/app/api/api/inse-account-service.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/inse-service.service.ts delete mode 100644 webapp/src/app/api/api/inse-service.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/institutions.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/items.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/person-network.service.ts delete mode 100644 webapp/src/app/api/api/person-network.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/persons.serviceInterface.ts create mode 100644 webapp/src/app/api/api/projects.service.ts delete mode 100644 webapp/src/app/api/api/topics.serviceInterface.ts delete mode 100644 webapp/src/app/api/api/works.serviceInterface.ts delete mode 100644 webapp/src/app/api/model/access-grant.ts delete mode 100644 webapp/src/app/api/model/auth-scope.ts delete mode 100644 webapp/src/app/api/model/author-affiliations-inner.ts delete mode 100644 webapp/src/app/api/model/author-counts-by-year-inner.ts delete mode 100644 webapp/src/app/api/model/author-ids.ts delete mode 100644 webapp/src/app/api/model/author-network-node.ts delete mode 100644 webapp/src/app/api/model/author-parsed-longest-name.ts delete mode 100644 webapp/src/app/api/model/author-position-count.ts delete mode 100644 webapp/src/app/api/model/author-summary-stats.ts delete mode 100644 webapp/src/app/api/model/authors-filter-properties.ts delete mode 100644 webapp/src/app/api/model/authors-list-response.ts delete mode 100644 webapp/src/app/api/model/autocomplete-response-meta.ts delete mode 100644 webapp/src/app/api/model/autocomplete-response-results-inner.ts delete mode 100644 webapp/src/app/api/model/autocomplete-response.ts create mode 100644 webapp/src/app/api/model/bundProject.ts create mode 100644 webapp/src/app/api/model/bundProjectPage.ts create mode 100644 webapp/src/app/api/model/categoryNested.ts delete mode 100644 webapp/src/app/api/model/collaboration-network-edge.ts delete mode 100644 webapp/src/app/api/model/collaboration-network-node-type.ts delete mode 100644 webapp/src/app/api/model/collaboration-network.ts delete mode 100644 webapp/src/app/api/model/cost-usd.ts delete mode 100644 webapp/src/app/api/model/custom-author.ts delete mode 100644 webapp/src/app/api/model/custom-authors-list-response.ts delete mode 100644 webapp/src/app/api/model/dehydrated-author.ts delete mode 100644 webapp/src/app/api/model/dehydrated-funder.ts delete mode 100644 webapp/src/app/api/model/dehydrated-institution.ts delete mode 100644 webapp/src/app/api/model/dehydrated-source.ts rename webapp/src/app/api/model/{auth-account.ts => displayCodeSplittedNested.ts} (69%) create mode 100644 webapp/src/app/api/model/euProject.ts create mode 100644 webapp/src/app/api/model/euProjectPage.ts delete mode 100644 webapp/src/app/api/model/filter-information.ts delete mode 100644 webapp/src/app/api/model/filter-properties.ts delete mode 100644 webapp/src/app/api/model/funder-by-author.ts delete mode 100644 webapp/src/app/api/model/funders-by-author-response.ts delete mode 100644 webapp/src/app/api/model/group-by-result.ts delete mode 100644 webapp/src/app/api/model/http-validation-error.ts delete mode 100644 webapp/src/app/api/model/identity-grant.ts delete mode 100644 webapp/src/app/api/model/institution-geo.ts delete mode 100644 webapp/src/app/api/model/institution-ids.ts delete mode 100644 webapp/src/app/api/model/institution-information.ts delete mode 100644 webapp/src/app/api/model/institution-network-node.ts delete mode 100644 webapp/src/app/api/model/institutions-list-response.ts delete mode 100644 webapp/src/app/api/model/item-create.ts delete mode 100644 webapp/src/app/api/model/item-page.ts rename webapp/src/app/api/model/{model2-yr-mean-citedness.ts => keywordNested.ts} (74%) delete mode 100644 webapp/src/app/api/model/open-access.ts create mode 100644 webapp/src/app/api/model/organizationNested.ts rename webapp/src/app/api/model/{person-bio.ts => programmeNested.ts} (63%) delete mode 100644 webapp/src/app/api/model/publication-ids-by-author-position.ts create mode 100644 webapp/src/app/api/model/publicationDetailByFunder.ts delete mode 100644 webapp/src/app/api/model/publications-by-author-response.ts delete mode 100644 webapp/src/app/api/model/topic-count.ts delete mode 100644 webapp/src/app/api/model/topic-domain.ts delete mode 100644 webapp/src/app/api/model/topic-field.ts delete mode 100644 webapp/src/app/api/model/topic-ids.ts delete mode 100644 webapp/src/app/api/model/topic-subfield.ts delete mode 100644 webapp/src/app/api/model/topics-by-time.ts delete mode 100644 webapp/src/app/api/model/topics-by-year.ts delete mode 100644 webapp/src/app/api/model/topics-list-response.ts delete mode 100644 webapp/src/app/api/model/validation-error-loc-inner.ts delete mode 100644 webapp/src/app/api/model/validation-error.ts delete mode 100644 webapp/src/app/api/model/work-biblio.ts delete mode 100644 webapp/src/app/api/model/work-citation-normalized-percentile.ts delete mode 100644 webapp/src/app/api/model/work-cited-by-percentile-year.ts delete mode 100644 webapp/src/app/api/model/work-counts-by-year-inner.ts delete mode 100644 webapp/src/app/api/model/work-has-content.ts delete mode 100644 webapp/src/app/api/model/work-ids.ts delete mode 100644 webapp/src/app/api/model/work-keyword.ts delete mode 100644 webapp/src/app/api/model/work-mesh-inner.ts delete mode 100644 webapp/src/app/api/model/work-network-node.ts delete mode 100644 webapp/src/app/api/model/work-page.ts delete mode 100644 webapp/src/app/api/model/work-sustainable-development-goals-inner.ts delete mode 100644 webapp/src/app/api/model/work-topic-domain.ts delete mode 100644 webapp/src/app/api/model/work-topic-field.ts delete mode 100644 webapp/src/app/api/model/work-topic-information.ts delete mode 100644 webapp/src/app/api/model/work-topic-subfield.ts delete mode 100644 webapp/src/app/api/model/work-topic.ts delete mode 100644 webapp/src/app/api/model/works-filter-properties.ts delete mode 100644 webapp/src/app/api/model/works-list-response.ts create mode 100644 webapp/src/app/directives/debounce.directive.ts create mode 100644 webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.html create mode 100644 webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.scss create mode 100644 webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.ts create mode 100644 webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.html create mode 100644 webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.scss create mode 100644 webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.ts create mode 100644 webapp/src/app/resolvers/bund-projects.resolver.ts create mode 100644 webapp/src/app/resolvers/eu-projects.resolver.ts create mode 100644 webapp/src/app/resolvers/institution.resolver.ts diff --git a/projects_eu_all_names.txt b/projects_eu_all_names.txt new file mode 100644 index 00000000..2f5cc250 --- /dev/null +++ b/projects_eu_all_names.txt @@ -0,0 +1,8 @@ +UNIVERSITAET DUISBURG-ESSEN +UNIVERSITAET DUISBURG-ESSEN - STANDORT DUISBURG +UNIVERSITÄT DUISBURG-ESSEN +UNIVERSITAET DUISBURG-ESSEN - STANDORT ESSEN +UNIVERSITAET DUISBURG-ESSEN (UNIVERSITY OF DUISBURG-ESSEN) +UNIVERSITAT DUISBURG-ESSEN +UNIVERSITY OF DUISBURG-ESSEN +UNIVERSITÄT DUISBURG ESSEN \ No newline at end of file diff --git a/service/src/main/inse/.env b/service/src/main/inse/.env index f2fc4762..db52757d 100644 --- a/service/src/main/inse/.env +++ b/service/src/main/inse/.env @@ -3,4 +3,7 @@ ELASTICSEARCH_API_KEY=am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ LLM_API_URL=https://project.nes.uni-due.de/llm2/v1/ LLM_API_KEY=c2d5e7ccf7a4760dd3d19bed2caed9d85ff7437400e0ea82a6d6f912ebc2f212 -LLM_MODEL=gemma4-e4b \ No newline at end of file +LLM_MODEL=gemma4-e4b + +ELASTICSEARCH_INSE_URL=https://inse.nes.uni-due.de/elastic +ELASTICSEARCH_INSE_API_KEY=bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== \ No newline at end of file diff --git a/service/src/main/inse/config.py b/service/src/main/inse/config.py index 4d83fe03..b6d1ef39 100644 --- a/service/src/main/inse/config.py +++ b/service/src/main/inse/config.py @@ -56,6 +56,9 @@ class Settings(BaseSettings): {"url": "http://localhost:8000", "description": "Local development server"}, ] + elasticsearch_inse_url: Optional[str] = None + elasticsearch_inse_api_key: Optional[str] = None + settings = Settings() diff --git a/service/src/main/inse/institutions/institutions_search_client.py b/service/src/main/inse/institutions/institutions_search_client.py new file mode 100644 index 00000000..93f0a7cf --- /dev/null +++ b/service/src/main/inse/institutions/institutions_search_client.py @@ -0,0 +1,132 @@ +import logging +from typing import List, Set + +import httpx + +from inse.models.institution import Institution + +logger = logging.getLogger(__name__) + + +class InstitutionsSearchClient: + def __init__( + self, + base_url: str, + api_key: str, + ): + self.base_url = base_url + self.api_key = api_key + self.headers = { + "Content-Type": "application/json", + "Authorization": f"ApiKey {self.api_key}", + } + + async def get_institution_by_id(self, raw_institution_id: str) -> Institution: + query = { + "query": { + "match": { + "id": f"https://openalex.org/{raw_institution_id.upper()}", + } + }, + "size": 1, + } + async with httpx.AsyncClient() as client: + response = await client.post( + f"{self.base_url}/openalex-institutions/_search", + json=query, + headers=self.headers, + ) + response.raise_for_status() + hits = response.json().get("hits", {}).get("hits", []) + if not hits: + raise ValueError( + f"Institution with ID '{raw_institution_id}' not found." + ) + return Institution.from_dict(hits[0]["_source"]) + + async def get_institution_aliases_by_id(self, raw_institution_id: str) -> List[str]: + """Get a list of institution aliases for a given institution ID, including both display name alternatives and predefined aliases. + + Args: + raw_institution_id (str): The raw institution ID for which to retrieve aliases. + + Returns: + List[str]: A list of aliases for the given institution ID. + """ + institution = await self.get_institution_by_id(raw_institution_id) + aliases = list( + self.augment_aliases(set(institution.display_name_alternatives or [])) + | self.get_predefined_institution_aliases(raw_institution_id) + ) + logger.debug( + "Retrieved aliases for institution_id=%s: %s", raw_institution_id, aliases + ) + return aliases + + def get_predefined_institution_aliases(self, raw_institution_id: str) -> Set[str]: + """Get predefined aliases for a given institution ID. + + Args: + raw_institution_id (str): The raw institution ID for which to retrieve predefined aliases. + + Returns: + Set[str]: A set of predefined aliases for the given institution ID. + """ + raw_institution_id = raw_institution_id.upper() + predefined_aliases = { + "I62318514": [ + "universität duisburg-essen", + "university of duisburg-essen", + "universitaet duisburg-essen", + "universität duisburg-essen", + "universitat duisburg-essen", + ], + } + + return self.augment_aliases(set(predefined_aliases.get(raw_institution_id, []))) + + def augment_aliases(self, aliases: Set[str]) -> Set[str]: + """Augment a set of aliases by applying the augment_alias function to each alias. + + Args: + aliases (Set[str]): A set of aliases to augment. + + Returns: + Set[str]: A set of augmented aliases. + """ + augmented_aliases = set() + for alias in aliases: + augmented_aliases.update(self.augment_alias(alias)) + return augmented_aliases + + def augment_alias(self, alias: str) -> List[str]: + """Augment an alias by replacing German umlauts and ß with their alternative spellings. + + Args: + alias (str): The alias to augment. + + Returns: + List[str]: A list of augmented aliases. + """ + alias = alias.lower() + aliases = [alias] + aliases.append( + alias.replace("ä", "ae") + .replace("ö", "oe") + .replace("ü", "ue") + .replace("ß", "ss") + ) + aliases.append( + alias.replace("ae", "ä") + .replace("oe", "ö") + .replace("ue", "ü") + .replace("ss", "ß") + ) + aliases.append( + alias.replace("ä", "a") + .replace("ö", "o") + .replace("ü", "u") + .replace("ß", "s") + ) + aliases.append(alias.replace("-", " ")) + return aliases diff --git a/service/src/main/inse/institutions/logic.py b/service/src/main/inse/institutions/logic.py index 34504553..5cfa3172 100644 --- a/service/src/main/inse/institutions/logic.py +++ b/service/src/main/inse/institutions/logic.py @@ -3,9 +3,10 @@ """ Business logic for OpenAlex institutions. """ + import logging from copy import deepcopy -from typing import Any +from typing import Any, Optional import httpx from fastapi import HTTPException @@ -15,9 +16,13 @@ from starlette.status import HTTP_502_BAD_GATEWAY from inse.models.autocomplete_response import AutocompleteResponse from inse.models.autocomplete_response_meta import AutocompleteResponseMeta -from inse.models.autocomplete_response_results_inner import AutocompleteResponseResultsInner +from inse.models.autocomplete_response_results_inner import ( + AutocompleteResponseResultsInner, +) from inse.models.institutions_list_response import InstitutionsListResponse +from inse.models.institution import Institution from .search_client import OpenAlexInstitutionsClient +from inse.institutions.institutions_search_client import InstitutionsSearchClient logger = logging.getLogger(__name__) @@ -33,6 +38,12 @@ _VALID_INSTITUTION_TYPES = { } +async def get_institution_by_id( + raw_institution_id: str, client: InstitutionsSearchClient +) -> Institution: + return await client.get_institution_by_id(raw_institution_id) + + async def list_institutions( *, search: str | None = None, @@ -85,7 +96,10 @@ async def list_institutions( try: normalized_data = _normalize_institutions_response(data) - return InstitutionsListResponse.from_dict(normalized_data) or InstitutionsListResponse() + return ( + InstitutionsListResponse.from_dict(normalized_data) + or InstitutionsListResponse() + ) except ValidationError as exc: logger.exception("OpenAlex institutions response could not be parsed.") raise HTTPException( @@ -114,10 +128,7 @@ async def autocomplete_institutions( sort="works_count:desc", per_page=limit, page=1, - select=( - "id,ror,display_name,country_code,type,works_count," - "cited_by_count,geo" - ), + select=("id,ror,display_name,country_code,type,works_count,cited_by_count,geo"), client=client, ) @@ -165,7 +176,13 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]: meta = normalized.get("meta") if isinstance(meta, dict): - for field in ["count", "db_response_time_ms", "page", "per_page", "groups_count"]: + for field in [ + "count", + "db_response_time_ms", + "page", + "per_page", + "groups_count", + ]: meta[field] = _int_or_none(meta.get(field)) meta["next_cursor"] = _str_or_none(meta.get("next_cursor")) meta["cost_usd"] = _number_or_none(meta.get("cost_usd")) @@ -187,7 +204,10 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]: institution[field] = _str_or_none(institution.get(field)) institution_type = institution.get("type") - if institution_type is not None and institution_type not in _VALID_INSTITUTION_TYPES: + if ( + institution_type is not None + and institution_type not in _VALID_INSTITUTION_TYPES + ): institution["type"] = None else: institution["type"] = _str_or_none(institution_type) @@ -202,7 +222,9 @@ def _normalize_institutions_response(data: dict[str, Any]) -> dict[str, Any]: institution["works_count"] = _int_or_none(institution.get("works_count")) institution["cited_by_count"] = _int_or_none(institution.get("cited_by_count")) institution["created_date"] = _date_str_or_none(institution.get("created_date")) - institution["updated_date"] = _datetime_str_or_none(institution.get("updated_date")) + institution["updated_date"] = _datetime_str_or_none( + institution.get("updated_date") + ) summary_stats = institution.get("summary_stats") if isinstance(summary_stats, dict): diff --git a/service/src/main/inse/institutions/search_client.py b/service/src/main/inse/institutions/search_client.py index 3db5e1dd..9839e24c 100644 --- a/service/src/main/inse/institutions/search_client.py +++ b/service/src/main/inse/institutions/search_client.py @@ -3,6 +3,7 @@ """ HTTP client for OpenAlex institutions. """ + from typing import Any import httpx @@ -19,8 +20,14 @@ class OpenAlexInstitutionsClient: transport: httpx.AsyncBaseTransport | None = None, ): self.base_url = (base_url or config.settings.openalex_api_base_url).rstrip("/") - self.api_key = api_key if api_key is not None else config.settings.openalex_api_key - self.timeout = timeout if timeout is not None else config.settings.openalex_api_timeout_seconds + self.api_key = ( + api_key if api_key is not None else config.settings.openalex_api_key + ) + self.timeout = ( + timeout + if timeout is not None + else config.settings.openalex_api_timeout_seconds + ) self.transport = transport def list_institutions_params( diff --git a/service/src/main/inse/institutions/service.py b/service/src/main/inse/institutions/service.py index 69d6911e..3a3b6c2b 100644 --- a/service/src/main/inse/institutions/service.py +++ b/service/src/main/inse/institutions/service.py @@ -3,19 +3,58 @@ """ REST API for OpenAlex institutions. """ + +from functools import lru_cache from typing import Annotated -from fastapi import APIRouter -from fastapi import Query +from fastapi import APIRouter, Depends, status, Query from inse.models.autocomplete_response import AutocompleteResponse from inse.models.institutions_list_response import InstitutionsListResponse from inse.tags import Tags +from inse.models.institution import Institution +from inse.config import get_settings from . import logic +from inse.institutions.institutions_search_client import InstitutionsSearchClient router = APIRouter(prefix="/api/institutions", tags=[Tags.INSTITUTIONS]) +@lru_cache +def get_institutions_search_client() -> InstitutionsSearchClient: + settings = get_settings() + if not settings.elasticsearch_url: + raise ValueError("Elasticsearch URL is missing in settings.") + if not settings.elasticsearch_api_key: + raise ValueError("Elasticsearch API key is missing in settings.") + + return InstitutionsSearchClient( + api_key=settings.elasticsearch_api_key, + base_url=settings.elasticsearch_url, + ) + + +@router.get( + "/{id}", + summary="Returns a single institution by ID.", + description="Returns a single institution by its OpenAlex ID.", + operation_id="getInstitutionById", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": Institution, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, +) +async def get_institution( + id: str, + client: Annotated[ + InstitutionsSearchClient, Depends(get_institutions_search_client) + ], +) -> Institution: + return await logic.get_institution_by_id(raw_institution_id=id, client=client) + @router.get( "/autocomplete", @@ -27,7 +66,10 @@ router = APIRouter(prefix="/api/institutions", tags=[Tags.INSTITUTIONS]) async def autocomplete_institutions( query: Annotated[ str, - Query(description="Institution search text, for example 'Duisburg Essen'.", min_length=1), + Query( + description="Institution search text, for example 'Duisburg Essen'.", + min_length=1, + ), ], country_code: Annotated[ str | None, @@ -64,7 +106,9 @@ async def list_institutions( ] = None, filter: Annotated[ str | None, - Query(description="OpenAlex filter, for example 'country_code:DE,type:education'."), + Query( + description="OpenAlex filter, for example 'country_code:DE,type:education'." + ), ] = None, sort: Annotated[ str | None, @@ -88,7 +132,11 @@ async def list_institutions( ] = None, sample: Annotated[ int | None, - Query(description="Random sample size. Cannot be combined with sort or page.", ge=1, le=10000), + Query( + description="Random sample size. Cannot be combined with sort or page.", + ge=1, + le=10000, + ), ] = None, select: Annotated[ str | None, diff --git a/service/src/main/inse/main.py b/service/src/main/inse/main.py index a1e4614e..ab6d63f1 100644 --- a/service/src/main/inse/main.py +++ b/service/src/main/inse/main.py @@ -16,6 +16,7 @@ from inse.topics.service import router as topics_service_router from inse.works.service import router as works_service_router from inse.persons.service import router as persons_service_router from inse.funders.service import router as funders_service_router +from inse.projects.router import router as projects_router from . import config from .service import router as service_router @@ -43,6 +44,8 @@ app.include_router(funders_service_router) app.include_router(service_router) app.include_router(account_router) +app.include_router(projects_router) + app.add_middleware( CORSMiddleware, allow_origins=settings.allowed_origins, diff --git a/service/src/main/inse/models/bund_project.py b/service/src/main/inse/models/bund_project.py new file mode 100644 index 00000000..6599ed41 --- /dev/null +++ b/service/src/main/inse/models/bund_project.py @@ -0,0 +1,226 @@ +from datetime import datetime, date +from typing import Annotated, Optional + +from pydantic import BaseModel, BeforeValidator, ConfigDict, Field + + +def parse_german_date(value: Optional[str]) -> Optional[date]: + if value is None or isinstance(value, date): + return value + + return datetime.strptime(value, "%d.%m.%Y").date() + + +class BundProject(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + extra="ignore", + ) + + funding_code: Optional[str] = Field( + default=None, + validation_alias="Förderkennzeichen", + description="The funding code of the project", + examples=["19F2266G"], + ) + + department: Optional[str] = Field( + default=None, + validation_alias="Ressort", + description="The department of the project", + examples=["BMDV"], + ) + + department_fullname: Optional[str] = Field( + default=None, + validation_alias="Ressort_fullname", + description="The full name of the department of the project", + examples=["Bundesministerium für Digitales und Verkehr"], + ) + + referat: Optional[str] = Field( + default=None, + validation_alias="Referat", + description="The referat of the project", + examples=["DP20"], + ) + + project_sponsor: Optional[str] = Field( + default=None, + validation_alias="Projektträger", + description="The project sponsor of the project", + examples=["PT-TÜV"], + ) + + project_sponsor_fullname: Optional[str] = Field( + default=None, + validation_alias="Projektträger_fullname", + description="The full name of the project sponsor of the project", + examples=["Projektträger TÜV Rheinland"], + ) + + work_unit: Optional[str] = Field( + default=None, + validation_alias="Arb.-Einh.", + description="The work unit of the project", + examples=["mFUND"], + ) + + recipient: Optional[str] = Field( + default=None, + validation_alias="Zuwendungsempfänger", + description="The recipient of the project", + examples=["Universität Duisburg-Essen"], + ) + + municipal_code: Optional[str] = Field( + default=None, + validation_alias="Gemeindekennziffer", + description="The municipal code of the project", + examples=["05113000"], + ) + + municipality: Optional[str] = Field( + default=None, + validation_alias="Stadt/Gemeinde", + description="The municipality of the project", + examples=["Essen"], + ) + + place: Optional[str] = Field( + default=None, + validation_alias="Ort", + description="The place of the project", + examples=["Essen"], + ) + + state: Optional[str] = Field( + default=None, + validation_alias="Bundesland", + description="The state of the project", + examples=["Nordrhein-Westfalen"], + ) + + country: Optional[str] = Field( + default=None, + validation_alias="Staat", + description="The country of the project", + examples=["Deutschland"], + ) + + implementing_agency: Optional[str] = Field( + default=None, + validation_alias="Ausführende Stelle", + description="The implementing agency of the project", + examples=[ + "Universität Duisburg-Essen - Fachbereich Allgemeine Informatik - Lehrstuhl Networked Embedded Systems (NES)" + ], + ) + + topic: Optional[str] = Field( + default=None, + validation_alias="Thema", + description="The topic of the project", + examples=[ + "Verbundprojekt: Multimodaler Mobilitäts-Index - Moby_Dex -, Teilvorhaben: Universität Duisburg-Essen" + ], + ) + + performance_plan_system: Optional[str] = Field( + default=None, + validation_alias="Leistungsplansystematik", + description="The performance plan system of the project", + examples=["GA6011"], + ) + + performance_plan_system_text: Optional[str] = Field( + default=None, + validation_alias="Klartext Leistungsplansystematik", + description="The performance plan system text of the project", + examples=["Angewandte Forschung und Experimentelle Entwicklung"], + ) + + funding_start: Annotated[ + Optional[date], + Field( + default=None, + validation_alias="Förderbeginn", + description="The funding start date of the project", + examples=["01.09.2023"], + ), + BeforeValidator(parse_german_date), + ] + + funding_end: Annotated[ + Optional[date], + Field( + default=None, + validation_alias="Förderende", + description="The funding end date of the project", + examples=["31.08.2026"], + ), + BeforeValidator(parse_german_date), + ] + + grant_amount: Optional[float] = Field( + default=None, + validation_alias="Fördersumme", + description="The grant amount of the project", + examples=[367651.00], + ) + + funding_profile: Optional[str] = Field( + default=None, + validation_alias="Förderprofil", + description="The funding profile of the project", + examples=["Technologie- und Innovationsförderung"], + ) + + joint_project: Optional[str] = Field( + default=None, + validation_alias="Verbundprojekt", + description="Whether the project is a joint project", + examples=["Moby_Dex"], + ) + + funding_type: Optional[str] = Field( + default=None, + validation_alias="Förderart", + description="The funding type of the project", + examples=["PDIR"], + ) + + publication_date: Optional[str] = Field( + default=None, + validation_alias="Publikationsdatum", + description="The publication date of the project", + examples=["2023"], + ) + + unix_timestamp: Optional[int] = Field( + default=None, + validation_alias="Unix-Timestamp", + description="The unix timestamp of the project", + examples=[1737411518], + ) + + date: Optional[str] = Field( + default=None, + validation_alias="datum", + description="The date of the project", + examples=["20.01.2025"], + ) + + new: Optional[bool] = Field( + default=None, + validation_alias="neu", + description="Whether the project is new", + examples=[False], + ) + + duration: Optional[str] = Field( + default=None, + validation_alias="Laufzeit", + description="The duration of the project", + examples=["von 01.09.2023 bis 31.08.2026"], + ) diff --git a/service/src/main/inse/models/dfg_project.py b/service/src/main/inse/models/dfg_project.py new file mode 100644 index 00000000..409e0fe5 --- /dev/null +++ b/service/src/main/inse/models/dfg_project.py @@ -0,0 +1,94 @@ +from datetime import date +from typing import Optional, Set + +from pydantic import BaseModel, Field + + +class DfgProject(BaseModel): + id: str = Field(description="The ID of the DFG project") + link: str = Field(description="The link to the DFG project") + title: str = Field(description="The title of the DFG project") + description: str = Field(description="The description of the DFG project") + + project_identifier: str = Field( + description="The project identifier of the DFG project" + ) + + funding_start_date: str = Field( + description="The funding start date of the DFG project" + ) + funding_end_date: str = Field(description="The funding end date of the DFG project") + + associated_persons: list[str] = Field( + description="The associated persons of the DFG project" + ) + + institutions: list[str] = Field( + description="The institutions associated with the DFG project" + ) + + @classmethod + def from_elastic_hit(cls, hit: dict): + source = hit["_source"] + + associated_persons: Set[str] = set() + institutions: Set[str] = set() + + # persons + + if "Antragsteller" in source: + associated_persons.update(source["Antragsteller"].split(";")) + + if "Antragstellerin" in source: + associated_persons.add(source["Antragstellerin"]) + + if "Sprecher" in source: + associated_persons.add(source["Sprecher"]) + + if "Sprecherin" in source: + associated_persons.add(source["Sprecherin"]) + + if "Leiter" in source: + associated_persons.add(source["Leiter"]) + + if "Leiterin" in source: + associated_persons.add(source["Leiterin"]) + + if "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler" in source: + associated_persons.update( + source[ + "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler" + ].split(";") + ) + + if "Beteiligte Personen" in source: + associated_persons.update(source["Beteiligte Personen"].split(";")) + + if "Teilprojektleiter" in source: + associated_persons.update(source["Teilprojektleiter"].split(";")) + + # institutions + + if "Antragstellende Institution" in source: + institutions.add(source["Antragstellende Institution"]) + + if "Mitantragstellende Institution" in source: + institutions.add(source["Mitantragstellende Institution"]) + + if "Beteiligte Institution" in source: + institutions.add(source["Beteiligte Institution"]) + + if "Beteiligte Hochschule" in source: + institutions.add(source["Beteiligte Hochschule"]) + + return cls( + id=hit["_id"], + link=source["link"], + title=source["title"], + description=source["description"], + project_identifier=source["Projektkennzeichen"], + funding_start_date=source["funding_start"], + funding_end_date=source["funding_end"], + associated_persons=list(associated_persons), + institutions=list(institutions), + ) diff --git a/service/src/main/inse/models/eu_project.py b/service/src/main/inse/models/eu_project.py new file mode 100644 index 00000000..a499216a --- /dev/null +++ b/service/src/main/inse/models/eu_project.py @@ -0,0 +1,192 @@ +from typing import List, Optional +from pydantic import BaseModel, ConfigDict, Field + + +class DisplayCodeSplittedNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + single_display_code: Optional[str] = Field( + default=None, + validation_alias="singleDisplayCode", + description="A solitary segment or specific component broken out from the main display code.", + ) + + +class CategoryNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + category: Optional[str] = Field( + default=None, + description="The descriptive classification title or taxonomy name for the project.", + ) + code: Optional[str] = Field( + default=None, description="The system code representing the specific category." + ) + display_code: Optional[str] = Field( + default=None, + validation_alias="displayCode", + description="The alphanumeric code formatted for user interface display purposes.", + ) + # REFINED: Mapped to List[str] because the real data provides an array of strings + display_code_splitted: List[str] = Field( + default_factory=list, + validation_alias="displayCode_splitted", + description="A tokenized hierarchy breakdown of the display code represented as an array of strings.", + ) + display_code_splitted_nested: List[DisplayCodeSplittedNested] = Field( + default_factory=list, + validation_alias="displayCode_splitted_nested", + description="Granular, nested breakdowns of the split parts of the display code.", + ) + + +class KeywordNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + keyword: Optional[str] = Field( + default=None, + description="An individual standalone keyword or tag used for granular search index filtering.", + ) + + +class OrganizationNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + ec_contribution: Optional[str] = Field( + default=None, + validation_alias="ecContribution", + description="The gross European Commission financial contribution allocated to this specific participant organization.", + ) + id: Optional[str] = Field( + default=None, + description="The unique identifier or Participant Identification Code (PIC) of the organization.", + ) + name: Optional[str] = Field( + default=None, + description="The full legal name of the participating organization or institution.", + ) + net_ec_contribution: Optional[str] = Field( + default=None, + validation_alias="netEcContribution", + description="The net European Commission financial funding provided to the organization after adjustments.", + ) + total_cost: Optional[str] = Field( + default=None, + validation_alias="totalCost", + description="The overall individual budget or total cost declared by this organization for its share of work.", + ) + organization_type: Optional[str] = Field( + default=None, + validation_alias="type", + description="The legal entity type or role of the organization (e.g., coordinator, participant).", + ) + + +class ProgrammeNested(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + code: Optional[str] = Field( + default=None, + description="The structural code identifying the framework or specific funding sub-programme.", + ) + id: Optional[str] = Field( + default=None, + description="The unique identifier of the funding program within the registry.", + ) + programme: Optional[str] = Field( + default=None, + description="The official title or description of the EU funding program.", + ) + + +class EuProject(BaseModel): + model_config = ConfigDict(populate_by_name=True) + + acronym: Optional[str] = Field( + default=None, + description="The official, short acronym chosen to identify the EU project.", + ) + categories_nested: List[CategoryNested] = Field( + default_factory=list, + description="Structured lists of classification categories and taxonomy mappings assigned to the project.", + ) + doc_number: Optional[str] = Field( + default=None, + description="The internal administrative document control number or record tracking identifier.", + ) + doi: Optional[str] = Field( + default=None, + description="The Digital Object Identifier (DOI) linked to the project's official metadata or primary publication.", + ) + ec_max_contribution: Optional[str] = Field( + default=None, + validation_alias="ecMaxContribution", + description="The maximum authorized limit for the European Commission's financial grant contribution to the project.", + ) + end_date: Optional[str] = Field( + default=None, + validation_alias="endDate", + description="The calendar date marking the official structural conclusion of the project execution timeline.", + ) + funding_end: Optional[str] = Field( + default=None, + description="The exact calendar termination year for the project's financial eligibility period.", + ) + funding_start: Optional[str] = Field( + default=None, + description="The exact calendar activation year from which project expenses can be billed against the grant.", + ) + id: Optional[str] = Field( + default=None, + description="The unique global record ID for the project document (typically the Grant Agreement Number).", + ) + keywords: Optional[str] = Field( + default=None, + description="A general text string or comma-separated list of keywords applied to the project record.", + ) + keywords_nested: List[KeywordNested] = Field( + default_factory=list, + description="Strictly tokenized and isolated keywords nested for targeted search engine aggregations.", + ) + link: Optional[str] = Field( + default=None, + description="The web URL linking directly to the project's public profile page on CORDIS or an equivalent registry.", + ) + objective: Optional[str] = Field( + default=None, + description="The complete, detailed abstract outlining the goals, methodology, and expected impact of the project.", + ) + organization_nested: List[OrganizationNested] = Field( + default_factory=list, + description="The full roster of academic, public, or private organizations participating in the project consortium.", + ) + programme_nested: List[ProgrammeNested] = Field( + default_factory=list, + description="The nested historical line of EU funding frameworks and structural grants supporting this project.", + ) + source: Optional[str] = Field( + default=None, + description="The specific upstream system or database repository from which this document was fetched or synced.", + ) + start_date: Optional[str] = Field( + default=None, + validation_alias="startDate", + description="The official calendar date marking the active kickoff and formal initiation of the project.", + ) + status: Optional[str] = Field( + default=None, + description="The lifecycle phase of the project (e.g., 'CLOSED', 'ONGOING').", + ) + teaser: Optional[str] = Field( + default=None, + description="A brief, high-level summary or editorial sentence written for general public consumption.", + ) + title: Optional[str] = Field( + default=None, + description="The comprehensive, full legal title describing the scope of the project.", + ) + total_cost: Optional[str] = Field( + default=None, + validation_alias="totalCost", + description="The combined sum total budget estimated for the implementation of the entire project.", + ) diff --git a/service/src/main/inse/projects/model.py b/service/src/main/inse/projects/model.py new file mode 100644 index 00000000..2739cc50 --- /dev/null +++ b/service/src/main/inse/projects/model.py @@ -0,0 +1,31 @@ +from typing import List + +from pydantic import BaseModel, Field + +from inse.models.bund_project import BundProject +from inse.models.eu_project import EuProject + + +class BundProjectPage(BaseModel): + elements: List[BundProject] = Field( + default_factory=list, description="The bund projects on this page." + ) + page: int = Field(default=0, description="The current page number.") + size: int = Field(default=20, description="The requested page size.") + total: int = Field(default=0, description="The total number of bund projects.") + + +class BundProjectList(BaseModel): + elements: List[BundProject] = Field( + default_factory=list, description="All bund projects." + ) + total: int = Field(default=0, description="The total number of bund projects.") + + +class EuProjectPage(BaseModel): + elements: List[EuProject] = Field( + default_factory=list, description="The EU projects on this page." + ) + page: int = Field(default=0, description="The current page number.") + size: int = Field(default=20, description="The requested page size.") + total: int = Field(default=0, description="The total number of EU projects.") diff --git a/service/src/main/inse/projects/projects_search_client.py b/service/src/main/inse/projects/projects_search_client.py new file mode 100644 index 00000000..18ffc350 --- /dev/null +++ b/service/src/main/inse/projects/projects_search_client.py @@ -0,0 +1,297 @@ +import json +import logging +from typing import Any, Dict, List, Optional + +import httpx + +from inse.config import get_settings +from inse.models.bund_project import BundProject +from inse.projects.model import BundProjectPage, EuProjectPage +from inse.models.eu_project import EuProject + + +logger = logging.getLogger(__name__) + +settings = get_settings() + + +class ProjectsSearchClient: + def __init__( + self, + base_url: str, + index: str, + api_key: str, + ): + self.base_url = base_url + self.index = index + self.api_key = api_key + self.headers = { + "Content-Type": "application/json", + "Authorization": f"ApiKey {self.api_key}", + } + + async def make_search_request(self, query: dict) -> dict: + async with httpx.AsyncClient() as client: + response = await client.post( + f"{self.base_url}/{self.index}/_search", + json=query, + headers=self.headers, + ) + + try: + response.raise_for_status() + except httpx.HTTPStatusError as e: + logger.exception( + f"HTTP error occurred: {e.response.status_code} - {e.response.text}" + ) + raise + + return response.json() + + +class BundProjectsSearchClient(ProjectsSearchClient): + def __init__(self): + if not settings.elasticsearch_inse_url: + raise ValueError("Elasticsearch INSE URL is missing in settings.") + if not settings.elasticsearch_inse_api_key: + raise ValueError("Elasticsearch INSE API key is missing in settings.") + super().__init__( + base_url=settings.elasticsearch_inse_url, + index="projects_bund", + api_key=settings.elasticsearch_inse_api_key, + ) + + def bund_projects_query( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> dict: + from_ = (page - 1) * size + query = { + "size": size, + "from": from_, + "query": { + "match_all": {}, + }, + } + if id: + query["query"] = {"match": {"id": id}} + + if len(institution_names) > 0: + query["query"] = { + "bool": { + "should": [ + { + "match": { + "Zuwendungsempfänger": { + "query": name, + "operator": "and", + } + } + } + for name in institution_names + ], + "minimum_should_match": 1, + } + } + + sort_by = sort_by.strip() + if sort_by == "topic": + sort_by = "Thema.keyword" + elif sort_by == "department": + sort_by = "Ressort_fullname.keyword" + elif sort_by == "grant_amount": + sort_by = "Fördersumme" + + sort_direction = sort_direction.strip().lower() + if sort_direction not in ["asc", "desc"]: + sort_direction = "asc" + + query["sort"] = [{f"{sort_by}": {"order": sort_direction}}] + + query_str = json.dumps(query, indent=2) + logger.debug(f"Constructed query: {query_str}") + return query + + def response_to_bund_project_page( + self, response: dict, page: int, size: int + ) -> BundProjectPage: + hits_block = response.get("hits", {}) + total_hits = hits_block.get("total", {}).get("value", 0) + elements = [ + BundProject.model_validate(hit["_source"]) + for hit in hits_block.get("hits", []) + ] + return BundProjectPage( + elements=elements, total=total_hits, page=page, size=size + ) + + async def search_bund_projects( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> BundProjectPage: + query = self.bund_projects_query( + page, size, id, institution_names, sort_by, sort_direction + ) + response = await self.make_search_request(query) + return self.response_to_bund_project_page(response, page, size) + + async def get_bund_projects_by_institution_name( + self, + institution_names: List[str], + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> BundProjectPage: + query = self.bund_projects_query( + page, + size, + institution_names=institution_names, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_bund_project_page(response, page, size) + + +class EuProjectsSearchClient(ProjectsSearchClient): + def __init__(self): + if not settings.elasticsearch_inse_url: + raise ValueError("Elasticsearch INSE URL is missing in settings.") + if not settings.elasticsearch_inse_api_key: + raise ValueError("Elasticsearch INSE API key is missing in settings.") + super().__init__( + base_url=settings.elasticsearch_inse_url, + index="projects_eu_all", + api_key=settings.elasticsearch_inse_api_key, + ) + + def eu_projects_query( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> dict: + from_ = (page - 1) * size + query: Dict[str, Any] = {"size": size, "from": from_, "query": {}} + + must_clauses: List[Dict[str, Any]] = [] + if id: + must_clauses.append({"match": {"id": id}}) + + if institution_names: + must_clauses.append( + { + "nested": { + "path": "organization_nested", + "query": { + "bool": { + "should": [ + { + "match": { + "organization_nested.name": { + "query": name, + "operator": "and", + } + } + } + for name in institution_names + ], + "minimum_should_match": 1, + } + }, + } + } + ) + + if must_clauses: + query["query"] = {"bool": {"must": must_clauses}} + else: + query["query"] = {"match_all": {}} + + sort_by = sort_by.strip().lower() + sort_direction = sort_direction.strip().lower() + if sort_direction not in ["asc", "desc"]: + sort_direction = "asc" + + sort_config: Dict[str, Any] = {} + + if sort_by == "topic": + sort_config = {"title.keyword": {"order": sort_direction}} + + elif sort_by == "grant_amount": + sort_config = {"totalCost.keyword": {"order": sort_direction}} + + elif sort_by == "department": + sort_config = { + "programme_nested.programme.keyword": { + "order": sort_direction, + "nested": {"path": "programme_nested"}, + } + } + else: + sort_config = {"id.keyword": {"order": sort_direction}} + + query["sort"] = [sort_config] + + query_str = json.dumps(query, indent=2) + logger.debug(f"Constructed query: {query_str}") + + return query + + def response_to_eu_project_page( + self, response: dict, page: int, size: int + ) -> EuProjectPage: + hits_block = response.get("hits", {}) + total_hits = hits_block.get("total", {}).get("value", 0) + elements = [ + EuProject.model_validate(hit["_source"]) + for hit in hits_block.get("hits", []) + ] + return EuProjectPage(elements=elements, total=total_hits, page=page, size=size) + + async def search_eu_projects( + self, + page: int, + size: int, + id: Optional[str] = None, + institution_names: List[str] = [], + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> EuProjectPage: + query = self.eu_projects_query( + page, size, id, institution_names, sort_by, sort_direction + ) + response = await self.make_search_request(query) + return self.response_to_eu_project_page(response, page, size) + + async def get_eu_projects_by_institution_name( + self, + institution_names: List[str], + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", + ) -> EuProjectPage: + query = self.eu_projects_query( + page, + size, + institution_names=institution_names, + sort_by=sort_by, + sort_direction=sort_direction, + ) + response = await self.make_search_request(query) + return self.response_to_eu_project_page(response, page, size) diff --git a/service/src/main/inse/projects/router.py b/service/src/main/inse/projects/router.py new file mode 100644 index 00000000..21063ffa --- /dev/null +++ b/service/src/main/inse/projects/router.py @@ -0,0 +1,135 @@ +from functools import lru_cache +import logging +from typing import Annotated + +from fastapi import APIRouter, Depends, Path, Query, status + +from inse.models.bund_project import BundProject +from inse.projects.model import BundProjectPage, EuProjectPage +from inse.tags import Tags +from inse.projects import service as projects_service +from inse.projects.projects_search_client import ( + BundProjectsSearchClient, + EuProjectsSearchClient, +) +from inse.institutions.institutions_search_client import ( + InstitutionsSearchClient, +) +from inse.institutions.service import get_institutions_search_client + +logger = logging.getLogger(__name__) + +router = APIRouter(prefix="/api/projects", tags=[Tags.PROJECTS]) + + +@lru_cache +def get_bund_search_client() -> BundProjectsSearchClient: + return BundProjectsSearchClient() + + +@lru_cache +def get_eu_search_client() -> EuProjectsSearchClient: + return EuProjectsSearchClient() + + +@router.get( + "/bund/search", + summary="Get bund projects.", + description="Returns a page of bund projects based on the provided pagination parameters and optional institution filter.", + operation_id="getBundProjects", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": BundProjectPage, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, + response_model_by_alias=False, +) +async def get_bund_projects( + bund_search_client: Annotated[ + BundProjectsSearchClient, Depends(get_bund_search_client) + ], + institutions_search_client: Annotated[ + InstitutionsSearchClient, Depends(get_institutions_search_client) + ], + institution_id: Annotated[ + str, Query(description="The institution ID to filter by.") + ], + page: Annotated[int, Query(description="The page number.", ge=1)] = 1, + size: Annotated[int, Query(description="The page size.", ge=1)] = 20, + sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic", + sort_direction: Annotated[ + str, Query(description="The sort direction (asc or desc).") + ] = "asc", +) -> BundProjectPage: + return await projects_service.get_bund_projects_by_institution_id( + bund_search_client=bund_search_client, + institutions_search_client=institutions_search_client, + institution_id=institution_id, + page=page, + size=size, + sort_by=sort_by, + sort_direction=sort_direction, + ) + + +@router.get( + "/eu/search", + summary="Get EU projects.", + description="Returns a page of EU projects based on the provided pagination parameters and optional institution filter.", + operation_id="getEuProjects", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": EuProjectPage, + }, + status.HTTP_404_NOT_FOUND: {"description": "Institution not found"}, + }, + response_model_by_alias=False, +) +async def get_eu_projects( + eu_search_client: Annotated[EuProjectsSearchClient, Depends(get_eu_search_client)], + institutions_search_client: Annotated[ + InstitutionsSearchClient, Depends(get_institutions_search_client) + ], + institution_id: Annotated[ + str, Query(description="The institution ID to filter by.") + ], + page: Annotated[int, Query(description="The page number.", ge=1)] = 1, + size: Annotated[int, Query(description="The page size.", ge=1)] = 20, + sort_by: Annotated[str, Query(description="The field to sort by.")] = "topic", + sort_direction: Annotated[ + str, Query(description="The sort direction (asc or desc).") + ] = "asc", +) -> EuProjectPage: + return await projects_service.get_eu_projects_by_institution_id( + eu_search_client=eu_search_client, + institutions_search_client=institutions_search_client, + institution_id=institution_id, + page=page, + size=size, + sort_by=sort_by, + sort_direction=sort_direction, + ) + + +@router.get( + "/bund/{bund_project_id}", + summary="Get a bund project by its project ID.", + description="Returns a bund project based on its project ID.", + operation_id="getBundProjectById", + responses={ + status.HTTP_200_OK: { + "description": "Successful Response", + "model": BundProject, + }, + status.HTTP_404_NOT_FOUND: {"description": "Bund project not found"}, + }, +) +async def get_bund_project_by_id( + bund_project_id: Annotated[ + str, Path(description="The ID of the bund project to retrieve.") + ], +): + return {"bund_project_id": bund_project_id} diff --git a/service/src/main/inse/projects/service.py b/service/src/main/inse/projects/service.py new file mode 100644 index 00000000..666a986e --- /dev/null +++ b/service/src/main/inse/projects/service.py @@ -0,0 +1,95 @@ +import logging +from typing import List + +from inse.projects.projects_search_client import ( + BundProjectsSearchClient, + EuProjectsSearchClient, +) +from inse.projects.model import BundProjectPage, EuProjectPage +from inse.institutions.institutions_search_client import ( + InstitutionsSearchClient, +) + +logger = logging.getLogger(__name__) + + +async def get_bund_projects_by_institution_id( + bund_search_client: BundProjectsSearchClient, + institutions_search_client: InstitutionsSearchClient, + institution_id: str, + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", +) -> BundProjectPage: + logger.info( + f"Fetching bund projects for institution_id={institution_id}, page={page}, size={size}" + ) + institution_aliases = ( + await institutions_search_client.get_institution_aliases_by_id(institution_id) + ) + logger.debug( + f"Found institution aliases for institution_id={institution_id}: {institution_aliases}" + ) + response = await bund_search_client.search_bund_projects( + page=page, + size=size, + institution_names=institution_aliases, + sort_by=sort_by, + sort_direction=sort_direction, + ) + logger.debug(f"get_bund_projects_by_institution_id response: {response}") + return response + + +async def get_eu_projects_by_institution_id( + eu_search_client: EuProjectsSearchClient, + institutions_search_client: InstitutionsSearchClient, + institution_id: str, + page: int, + size: int, + sort_by: str = "topic", + sort_direction: str = "asc", +) -> EuProjectPage: + logger.info( + f"Fetching EU projects for institution_id={institution_id}, page={page}, size={size}" + ) + institution_aliases = ( + await institutions_search_client.get_institution_aliases_by_id(institution_id) + ) + logger.debug( + f"Found institution aliases for institution_id={institution_id}: {institution_aliases}" + ) + response = await eu_search_client.search_eu_projects( + page=page, + size=size, + institution_names=institution_aliases, + sort_by=sort_by, + sort_direction=sort_direction, + ) + logger.debug(f"get_eu_projects_by_institution_id response: {response}") + return response + + +async def get_bund_projects_by_institution_name( + bund_search_client: BundProjectsSearchClient, + page: int, + size: int, + institution_names: List[str] = [], + sort_by: str = "topic", + sort_direction: str = "asc", +) -> BundProjectPage: + logger.info( + f"Fetching bund projects for institution_names={institution_names}, page={page}, size={size}" + ) + response = await bund_search_client.search_bund_projects( + page=page, + size=size, + institution_names=institution_names, + sort_by=sort_by, + sort_direction=sort_direction, + ) + + logger.debug(f"get_bund_projects_by_institution_name response: {response}") + + return response diff --git a/service/src/main/inse/tags.py b/service/src/main/inse/tags.py index 21c6b03c..600bcfb0 100644 --- a/service/src/main/inse/tags.py +++ b/service/src/main/inse/tags.py @@ -7,3 +7,4 @@ class Tags(Enum): INSTITUTIONS = "Institutions" TOPICS = "Topics" WORKS = "Works" + PROJECTS = "Projects" diff --git a/ude_person.http b/ude_person.http index 0eef0048..bbe99668 100644 --- a/ude_person.http +++ b/ude_person.http @@ -6,12 +6,236 @@ Content-Type: application/json "query": { "query_string": { "default_field": "name", - "query": "Tobias Janelt" + "query": "Marcus Handte" } } } +### +GET https://inse.nes.uni-due.de/elastic/projects_dfg_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +# { +# "size": 100, +# "query": { +# "multi_match": { +# "query": "Rizk", +# "fields": [ +# "Antragsteller", +# "Antragstellerin", +# "Sprecher", +# "Sprecherin", +# "Leiter", +# "Leiterin", +# "beteiligte Wissenschaftlerinnen / beteiligte Wissenschaftler", +# "Teilprojektleiter" +# ] +# } +# } +# } + +# { +# "size": 100, +# "query": { +# "multi_match": { +# "query": "Duisburg-Essen", +# "fields": [ +# "Antragstellende Institution", +# "Mitantragstellende Institution", +# "Beteiligte Institution" +# ] +# } +# } +# } + +# "aggs": { + +# "antragstellende": { + +# "terms": { + +# "field": "Antragstellende Institution.keyword", + +# "size": 100 + +# } + +# }, + +# "mitantragstellende": { + +# "terms": { + +# "field": "Mitantragstellende Institution.keyword", + +# "size": 100 + +# } + +# }, + +# "beteiligte": { + +# "terms": { + +# "field": "Beteiligte Institution.keyword", + +# "size": 100 + +# } + +# }, + +# "partner": { + +# "terms": { + +# "field": "Partnerorganisation.keyword", + +# "size": 100 + +# } + +# } + +# } + +# } + + +### +GET https://inse.nes.uni-due.de/elastic/projects_bund/_mapping +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +### +GET https://inse.nes.uni-due.de/elastic/projects_bund/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + + "size": 10, + "from": 1000, + "query": { + "match": { + "Zuwendungsempf\u00e4nger": { + "query": "Universit\u00e4t Duisburg-Essen", + "operator": "and" + } + } + }, + "sort": [ + { + "Thema.keyword": { + "order": "asc" + } + } + ] + +} + +#{'size': 10, 'from': 0, 'query': {'match': {'Zuwendungsempfänger': {'query': 'Universität Duisburg-Essen', 'operator': 'and'}}}, 'sort': [{'Thema': {'order': 'asc'}}]} + +# { +# "size": 1000, +# "query": { +# "match": { +# "Zuwendungsempfänger": { +# "query": "Universität Duisburg-Essen", +# "operator": "and" +# } +# } +# } +# } + +### +GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_mapping +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + + +### +GET https://inse.nes.uni-due.de/elastic/projects_eu_all/_search +Authorization: ApiKey bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw== +Content-Type: application/json + +{ + + "size": 0, + + "query": { + + "nested": { + + "path": "organization_nested", + + "query": { + + "match": { + + "organization_nested.name": "Dortmund" + + } + + } + + } + + }, + + "aggs": { + + "organizations": { + + "nested": { + + "path": "organization_nested" + + }, + + "aggs": { + + "matching": { + + "filter": { + + "match": { + + "organization_nested.name": "Dortmund" + + } + + }, + + "aggs": { + + "names": { + + "terms": { + + "field": "organization_nested.name.keyword", + + "size": 100 + + } + + } + + } + + } + + } + + } + + } + +} + ### GET https://inse.nes.uni-due.de/elastic/ude_organization_content_august_2025/_search @@ -36,9 +260,36 @@ Content-Type: application/json # "query": "Tobias Janelt" # } # } - # } +### + +GET https://project.nes.uni-due.de/elastic/openalex-awards/_mapping +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +### + +GET https://project.nes.uni-due.de/elastic/openalex-awards/_search +Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== +Content-Type: application/json + +{ + "size": 1000, + "query": { + "bool": { + "must": [ + { + "prefix": { + "landing_page_url": "https://gepris.dfg.de/gepris/projekt/" + } + } + ] + } + } +} + + ### GET https://project.nes.uni-due.de/elastic/openalex-authors/_search diff --git a/webapp/openapi.json b/webapp/openapi.json deleted file mode 100644 index a0e514dd..00000000 --- a/webapp/openapi.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Innovation Search Engine API", - "description": "API for the Innovation Search Engine (INSE) application.", - "version": "0.1.0" - }, - "servers": [ - { - "url": "http://localhost:8000", - "description": "Local development server" - } - ], - "paths": { - "/api/person/network/{raw_user_id}": { - "get": { - "tags": ["Person Network"], - "summary": "Get a person's collaboration network.", - "description": "Returns a person's collaboration network based on their works and co-authors.", - "operationId": "getCollaborationNetwork", - "parameters": [ - { - "name": "raw_user_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "The raw user ID of the person.", - "title": "Raw User Id" - }, - "description": "The raw user ID of the person." - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CollaborationNetwork" - } - } - } - }, - "404": { "description": "Person not found" }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/HTTPValidationError" } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "CollaborationNetwork": { - "properties": { - "raw_person_id": { - "type": "string", - "title": "Raw Person ID", - "description": "The raw person ID of the person whose collaboration network this is." - }, - "nodes": { - "items": { - "$ref": "#/components/schemas/CollaborationNetworkNode" - }, - "type": "array", - "title": "Collaboration Network Nodes", - "description": "The nodes in the collaboration network." - }, - "edges": { - "items": { - "$ref": "#/components/schemas/CollaborationNetworkEdge" - }, - "type": "array", - "title": "Collaboration Network Edges", - "description": "The edges in the collaboration network." - }, - "works": { - "items": { "$ref": "#/components/schemas/CollaborationWork" }, - "type": "array", - "title": "Collaboration Works", - "description": "The works that represent the collaborations in the collaboration network." - } - }, - "type": "object", - "required": ["raw_person_id", "nodes", "edges", "works"], - "title": "CollaborationNetwork" - }, - "CollaborationNetworkEdge": { - "properties": { - "raw_source_person_id": { - "type": "string", - "title": "Source Raw Person ID", - "description": "The raw person ID of the source person." - }, - "raw_target_person_id": { - "type": "string", - "title": "Target Raw Person ID", - "description": "The raw person ID of the target person." - }, - "raw_work_ids": { - "items": { "type": "string" }, - "type": "array", - "title": "Work IDs", - "description": "The list of work IDs that represent the collaborations between the two persons." - } - }, - "type": "object", - "required": [ - "raw_source_person_id", - "raw_target_person_id", - "raw_work_ids" - ], - "title": "CollaborationNetworkEdge" - }, - "CollaborationNetworkNode": { - "properties": { - "raw_person_id": { - "type": "string", - "title": "Raw Person ID", - "description": "The raw person ID of the person." - }, - "display_name": { - "type": "string", - "title": "Display Name", - "description": "The display name of the person." - } - }, - "type": "object", - "required": ["raw_person_id", "display_name"], - "title": "CollaborationNetworkNode" - }, - "CollaborationWork": { - "properties": { - "raw_work_id": { - "type": "string", - "title": "Raw Work ID", - "description": "The raw work ID of the work." - }, - "display_title": { - "type": "string", - "title": "Display Title", - "description": "The display title of the work." - } - }, - "type": "object", - "required": ["raw_work_id", "display_title"], - "title": "CollaborationWork" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { "$ref": "#/components/schemas/ValidationError" }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, - "type": "array", - "title": "Location" - }, - "msg": { "type": "string", "title": "Message" }, - "type": { "type": "string", "title": "Error Type" } - }, - "type": "object", - "required": ["loc", "msg", "type"], - "title": "ValidationError" - } - } - } -} diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index 9779c964..63db0e7f 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -1,117 +1,120 @@ .gitignore +.openapi-generator-ignore README.md api.base.service.ts api.module.ts api/api.ts api/funding.service.ts -api/funding.serviceInterface.ts -api/inse-account-service.service.ts -api/inse-account-service.serviceInterface.ts -api/inse-service.service.ts -api/inse-service.serviceInterface.ts +api/iNSEAccountService.service.ts +api/iNSEService.service.ts api/institutions.service.ts -api/institutions.serviceInterface.ts api/items.service.ts -api/items.serviceInterface.ts -api/person-network.service.ts -api/person-network.serviceInterface.ts +api/personNetwork.service.ts api/persons.service.ts -api/persons.serviceInterface.ts +api/projects.service.ts api/topics.service.ts -api/topics.serviceInterface.ts api/works.service.ts -api/works.serviceInterface.ts configuration.ts encoder.ts git_push.sh index.ts -model/access-grant.ts -model/auth-account.ts -model/auth-scope.ts -model/author-affiliations-inner.ts -model/author-counts-by-year-inner.ts -model/author-ids.ts -model/author-network-node.ts -model/author-parsed-longest-name.ts -model/author-position-count.ts -model/author-summary-stats.ts +model/accessGrant.ts +model/authAccount.ts +model/authScope.ts model/author.ts -model/authors-filter-properties.ts -model/authors-list-response.ts +model/authorAffiliationsInner.ts +model/authorCountsByYearInner.ts +model/authorIds.ts +model/authorNetworkNode.ts +model/authorParsedLongestName.ts +model/authorPositionCount.ts +model/authorSummaryStats.ts +model/authorsFilterProperties.ts +model/authorsListResponse.ts model/authorship.ts -model/autocomplete-response-meta.ts -model/autocomplete-response-results-inner.ts -model/autocomplete-response.ts +model/autocompleteResponse.ts +model/autocompleteResponseMeta.ts +model/autocompleteResponseResultsInner.ts model/award.ts -model/collaboration-network-edge.ts -model/collaboration-network-node-type.ts -model/collaboration-network.ts -model/cost-usd.ts -model/custom-author.ts -model/custom-authors-list-response.ts -model/dehydrated-author.ts -model/dehydrated-funder.ts -model/dehydrated-institution.ts -model/dehydrated-source.ts -model/filter-information.ts -model/filter-properties.ts -model/funder-by-author.ts -model/funders-by-author-response.ts +model/bundProject.ts +model/bundProjectPage.ts +model/categoryNested.ts +model/collaborationNetwork.ts +model/collaborationNetworkEdge.ts +model/collaborationNetworkNodeType.ts +model/costUsd.ts +model/customAuthor.ts +model/customAuthorsListResponse.ts +model/dehydratedAuthor.ts +model/dehydratedFunder.ts +model/dehydratedInstitution.ts +model/dehydratedSource.ts +model/displayCodeSplittedNested.ts +model/euProject.ts +model/euProjectPage.ts +model/filterInformation.ts +model/filterProperties.ts +model/funderByAuthor.ts +model/fundersByAuthorResponse.ts model/fwci.ts -model/group-by-result.ts -model/http-validation-error.ts -model/identity-grant.ts -model/institution-geo.ts -model/institution-ids.ts -model/institution-information.ts -model/institution-network-node.ts +model/groupByResult.ts +model/hTTPValidationError.ts +model/identityGrant.ts model/institution.ts -model/institutions-list-response.ts -model/item-create.ts -model/item-page.ts +model/institutionGeo.ts +model/institutionIds.ts +model/institutionInformation.ts +model/institutionNetworkNode.ts +model/institutionsListResponse.ts model/item.ts +model/itemCreate.ts +model/itemPage.ts +model/keywordNested.ts model/latitude.ts model/location.ts model/longitude.ts model/meta.ts -model/model2-yr-mean-citedness.ts +model/model2YrMeanCitedness.ts model/models.ts -model/open-access.ts -model/person-bio.ts -model/publication-ids-by-author-position.ts -model/publications-by-author-response.ts +model/openAccess.ts +model/organizationNested.ts +model/personBio.ts +model/programmeNested.ts +model/publicationDetailByFunder.ts +model/publicationIdsByAuthorPosition.ts +model/publicationsByAuthorResponse.ts model/score.ts -model/topic-count.ts -model/topic-domain.ts -model/topic-field.ts -model/topic-ids.ts -model/topic-subfield.ts model/topic.ts -model/topics-by-time.ts -model/topics-by-year.ts -model/topics-list-response.ts -model/validation-error-loc-inner.ts -model/validation-error.ts +model/topicCount.ts +model/topicDomain.ts +model/topicField.ts +model/topicIds.ts +model/topicSubfield.ts +model/topicsByTime.ts +model/topicsByYear.ts +model/topicsListResponse.ts +model/validationError.ts +model/validationErrorLocInner.ts model/value.ts -model/work-biblio.ts -model/work-citation-normalized-percentile.ts -model/work-cited-by-percentile-year.ts -model/work-counts-by-year-inner.ts -model/work-has-content.ts -model/work-ids.ts -model/work-keyword.ts -model/work-mesh-inner.ts -model/work-network-node.ts -model/work-page.ts -model/work-sustainable-development-goals-inner.ts -model/work-topic-domain.ts -model/work-topic-field.ts -model/work-topic-information.ts -model/work-topic-subfield.ts -model/work-topic.ts model/work.ts -model/works-filter-properties.ts -model/works-list-response.ts +model/workBiblio.ts +model/workCitationNormalizedPercentile.ts +model/workCitedByPercentileYear.ts +model/workCountsByYearInner.ts +model/workHasContent.ts +model/workIds.ts +model/workKeyword.ts +model/workMeshInner.ts +model/workNetworkNode.ts +model/workPage.ts +model/workSustainableDevelopmentGoalsInner.ts +model/workTopic.ts +model/workTopicDomain.ts +model/workTopicField.ts +model/workTopicInformation.ts +model/workTopicSubfield.ts +model/worksFilterProperties.ts +model/worksListResponse.ts param.ts provide-api.ts variables.ts diff --git a/webapp/src/app/api/README.md b/webapp/src/app/api/README.md index 2df9da7b..dfa7b6e7 100644 --- a/webapp/src/app/api/README.md +++ b/webapp/src/app/api/README.md @@ -46,10 +46,10 @@ npm link In your project: ```console -npm link +npm link ``` -**Note for Windows users:** The Angular CLI has troubles to use linked npm packages. +__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. Please refer to this issue for a solution / workaround. Published packages are not effected by this issue. @@ -58,22 +58,22 @@ Published packages are not effected by this issue. In your Angular project: ```typescript + import { ApplicationConfig } from '@angular/core'; import { provideHttpClient } from '@angular/common/http'; import { provideApi } from ''; export const appConfig: ApplicationConfig = { - providers: [ - // ... - provideHttpClient(), - provideApi(), - ], + providers: [ + // ... + provideHttpClient(), + provideApi() + ], }; ``` **NOTE** If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module: - ```typescript import { ApiModule } from ''; ``` @@ -86,11 +86,11 @@ import { provideHttpClient } from '@angular/common/http'; import { provideApi } from ''; export const appConfig: ApplicationConfig = { - providers: [ - // ... - provideHttpClient(), - provideApi('http://localhost:9999'), - ], + providers: [ + // ... + provideHttpClient(), + provideApi('http://localhost:9999') + ], }; ``` @@ -101,15 +101,15 @@ import { provideHttpClient } from '@angular/common/http'; import { provideApi } from ''; export const appConfig: ApplicationConfig = { - providers: [ - // ... - provideHttpClient(), - provideApi({ - withCredentials: true, - username: 'user', - password: 'password', - }), - ], + providers: [ + // ... + provideHttpClient(), + provideApi({ + withCredentials: true, + username: 'user', + password: 'password' + }) + ], }; ``` @@ -120,22 +120,21 @@ import { provideHttpClient } from '@angular/common/http'; import { provideApi, Configuration } from ''; export const appConfig: ApplicationConfig = { - providers: [ - // ... - provideHttpClient(), - { - provide: Configuration, - useFactory: (authService: AuthService) => - new Configuration({ - basePath: 'http://localhost:9999', - withCredentials: true, - username: authService.getUsername(), - password: authService.getPassword(), - }), - deps: [AuthService], - multi: false, - }, - ], + providers: [ + // ... + provideHttpClient(), + { + provide: Configuration, + useFactory: (authService: AuthService) => new Configuration({ + basePath: 'http://localhost:9999', + withCredentials: true, + username: authService.getUsername(), + password: authService.getPassword(), + }), + deps: [AuthService], + multi: false + } + ], }; ``` @@ -152,12 +151,12 @@ import { HttpClientModule } from '@angular/common/http'; import { environment } from '../environments/environment'; export const appConfig: ApplicationConfig = { - providers: [ - // ... - provideHttpClient(), - provideUserApi(environment.basePath), - provideAdminApi(environment.basePath), - ], + providers: [ + // ... + provideHttpClient(), + provideUserApi(environment.basePath), + provideAdminApi(environment.basePath), + ], }; ``` @@ -177,8 +176,8 @@ Example value for use in your Configuration-Provider: ```typescript new Configuration({ - encodeParam: (param: Param) => myFancyParamEncoder(param), -}); + encodeParam: (param: Param) => myFancyParamEncoder(param), +}) ``` [parameter-locations-url]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-locations diff --git a/webapp/src/app/api/api.base.service.ts b/webapp/src/app/api/api.base.service.ts index d9ec8f2e..dcf56358 100644 --- a/webapp/src/app/api/api.base.service.ts +++ b/webapp/src/app/api/api.base.service.ts @@ -1,109 +1,83 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { - HttpHeaders, - HttpParams, - HttpParameterCodec, -} from '@angular/common/http'; +import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http'; import { CustomHttpParameterCodec } from './encoder'; import { Configuration } from './configuration'; export class BaseService { - protected basePath = 'http://localhost:8000'; - public defaultHeaders = new HttpHeaders(); - public configuration: Configuration; - public encoder: HttpParameterCodec; + protected basePath = 'http://localhost:8000'; + public defaultHeaders = new HttpHeaders(); + public configuration: Configuration; + public encoder: HttpParameterCodec; - constructor(basePath?: string | string[], configuration?: Configuration) { - this.configuration = configuration || new Configuration(); - if (typeof this.configuration.basePath !== 'string') { - const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined; - if (firstBasePath != undefined) { - basePath = firstBasePath; - } + constructor(basePath?: string|string[], configuration?: Configuration) { + this.configuration = configuration || new Configuration(); + if (typeof this.configuration.basePath !== 'string') { + const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined; + if (firstBasePath != undefined) { + basePath = firstBasePath; + } - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - protected canConsumeForm(consumes: string[]): boolean { - return consumes.indexOf('multipart/form-data') !== -1; - } - - protected addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string, - isDeep: boolean = false, - ): HttpParams { - // If the value is an object (but not a Date), recursively add its keys. - if (typeof value === 'object' && !(value instanceof Date)) { - return this.addToHttpParamsRecursive( - httpParams, - value, - isDeep ? key : undefined, - isDeep, - ); - } - return this.addToHttpParamsRecursive(httpParams, value, key); - } - - protected addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string, - isDeep: boolean = false, - ): HttpParams { - if (value === null || value === undefined) { - return httpParams; - } - if (typeof value === 'object') { - // If JSON format is preferred, key must be provided. - if (key != null) { - return isDeep - ? Object.keys(value as Record).reduce( - (hp, k) => hp.append(`${key}[${k}]`, value[k]), - httpParams, - ) - : httpParams.append(key, JSON.stringify(value)); - } - // Otherwise, if it's an array, add each element. - if (Array.isArray(value)) { - value.forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)), - ); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, value.toISOString()); - } else { - throw Error('key may not be null if value is Date'); + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; } - } else { - Object.keys(value).forEach((k) => { - const paramKey = key ? `${key}.${k}` : k; - httpParams = this.addToHttpParamsRecursive( - httpParams, - value[k], - paramKey, - ); - }); - } - return httpParams; - } else if (key != null) { - return httpParams.append(key, value); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + protected canConsumeForm(consumes: string[]): boolean { + return consumes.indexOf('multipart/form-data') !== -1; + } + + protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams { + // If the value is an object (but not a Date), recursively add its keys. + if (typeof value === 'object' && !(value instanceof Date)) { + return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep); + } + return this.addToHttpParamsRecursive(httpParams, value, key); + } + + protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams { + if (value === null || value === undefined) { + return httpParams; + } + if (typeof value === 'object') { + // If JSON format is preferred, key must be provided. + if (key != null) { + return isDeep + ? Object.keys(value as Record).reduce( + (hp, k) => hp.append(`${key}[${k}]`, value[k]), + httpParams, + ) + : httpParams.append(key, JSON.stringify(value)); + } + // Otherwise, if it's an array, add each element. + if (Array.isArray(value)) { + value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, value.toISOString()); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach(k => { + const paramKey = key ? `${key}.${k}` : k; + httpParams = this.addToHttpParamsRecursive(httpParams, value[k], paramKey); + }); + } + return httpParams; + } else if (key != null) { + return httpParams.append(key, value); + } + throw Error("key may not be null if value is not object or array"); } - throw Error('key may not be null if value is not object or array'); - } } diff --git a/webapp/src/app/api/api.module.ts b/webapp/src/app/api/api.module.ts index e29250f2..58d341fb 100644 --- a/webapp/src/app/api/api.module.ts +++ b/webapp/src/app/api/api.module.ts @@ -1,42 +1,30 @@ -import { - NgModule, - ModuleWithProviders, - SkipSelf, - Optional, -} from '@angular/core'; +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; + @NgModule({ - imports: [], + imports: [], declarations: [], - exports: [], - providers: [], + exports: [], + providers: [] }) export class ApiModule { - public static forRoot( - configurationFactory: () => Configuration, - ): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [{ provide: Configuration, useFactory: configurationFactory }], - }; - } + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; + } - constructor( - @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: HttpClient, - ) { - if (parentModule) { - throw new Error( - 'ApiModule is already loaded. Import in your base AppModule only.', - ); + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } } - if (!http) { - throw new Error( - 'You need to import the HttpClientModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575', - ); - } - } } diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index a51f46b8..5406f421 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -1,38 +1,21 @@ export * from './funding.service'; import { FundingService } from './funding.service'; -export * from './funding.serviceInterface'; -export * from './inse-account-service.service'; -import { INSEAccountServiceService } from './inse-account-service.service'; -export * from './inse-account-service.serviceInterface'; -export * from './inse-service.service'; -import { INSEServiceService } from './inse-service.service'; -export * from './inse-service.serviceInterface'; +export * from './iNSEAccountService.service'; +import { INSEAccountServiceService } from './iNSEAccountService.service'; +export * from './iNSEService.service'; +import { INSEServiceService } from './iNSEService.service'; export * from './institutions.service'; import { InstitutionsService } from './institutions.service'; -export * from './institutions.serviceInterface'; export * from './items.service'; import { ItemsService } from './items.service'; -export * from './items.serviceInterface'; -export * from './person-network.service'; -import { PersonNetworkService } from './person-network.service'; -export * from './person-network.serviceInterface'; +export * from './personNetwork.service'; +import { PersonNetworkService } from './personNetwork.service'; export * from './persons.service'; import { PersonsService } from './persons.service'; -export * from './persons.serviceInterface'; +export * from './projects.service'; +import { ProjectsService } from './projects.service'; export * from './topics.service'; import { TopicsService } from './topics.service'; -export * from './topics.serviceInterface'; export * from './works.service'; import { WorksService } from './works.service'; -export * from './works.serviceInterface'; -export const APIS = [ - FundingService, - INSEAccountServiceService, - INSEServiceService, - InstitutionsService, - ItemsService, - PersonNetworkService, - PersonsService, - TopicsService, - WorksService, -]; +export const APIS = [FundingService, INSEAccountServiceService, INSEServiceService, InstitutionsService, ItemsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, WorksService]; diff --git a/webapp/src/app/api/api/funding.service.ts b/webapp/src/app/api/api/funding.service.ts index 340b881f..46772768 100644 --- a/webapp/src/app/api/api/funding.service.ts +++ b/webapp/src/app/api/api/funding.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,271 +9,153 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore -import { FundersByAuthorResponse } from '../model/funders-by-author-response'; +import { FundersByAuthorResponse } from '../model/fundersByAuthorResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { PublicationsByAuthorResponse } from '../model/publications-by-author-response'; +import { PublicationsByAuthorResponse } from '../model/publicationsByAuthorResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { FundingServiceInterface } from './funding.serviceInterface'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) -export class FundingService - extends BaseService - implements FundingServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } +export class FundingService extends BaseService { - /** - * Get funding organizations by author. - * @endpoint get /api/inse-service/authors/{author_id}/funders - * @param authorId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getFundersByAuthor( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getFundersByAuthor( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getFundersByAuthor( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getFundersByAuthor( - 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 getFundersByAuthor.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Get funding organizations by author. + * @endpoint get /api/inse-service/authors/{author_id}/funders + * @param authorId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getFundersByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getFundersByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFundersByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getFundersByAuthor(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 getFundersByAuthor.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/funders`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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 funded publications by author. + * @endpoint get /api/inse-service/authors/{author_id}/publications + * @param authorId + * @param page + * @param pageSize + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, 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 getPublicationsByAuthor.'); + } - 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'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/publications`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/funders`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get funded publications by author. - * @endpoint get /api/inse-service/authors/{author_id}/publications - * @param authorId - * @param page - * @param pageSize - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPublicationsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPublicationsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPublicationsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPublicationsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - 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 getPublicationsByAuthor.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'page_size', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/publications`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - '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/funding.serviceInterface.ts b/webapp/src/app/api/api/funding.serviceInterface.ts deleted file mode 100644 index 18504afd..00000000 --- a/webapp/src/app/api/api/funding.serviceInterface.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { FundersByAuthorResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { PublicationsByAuthorResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface FundingServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Get funding organizations by author. - * - * @endpoint get /api/inse-service/authors/{author_id}/funders - * @param authorId - */ - getFundersByAuthor( - authorId: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Get funded publications by author. - * - * @endpoint get /api/inse-service/authors/{author_id}/publications - * @param authorId - * @param page - * @param pageSize - */ - getPublicationsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/iNSEAccountService.service.ts b/webapp/src/app/api/api/iNSEAccountService.service.ts index 116f1dd4..7b43eaa5 100644 --- a/webapp/src/app/api/api/iNSEAccountService.service.ts +++ b/webapp/src/app/api/api/iNSEAccountService.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 { AccessGrant } from '../model/accessGrant'; @@ -30,314 +24,190 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { IdentityGrant } from '../model/identityGrant'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class INSEAccountServiceService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Get Access Grant - * @endpoint post /inse-account/auth/access - * @param secret - * @param account - * @param organization - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (secret === null || secret === undefined) { - throw new Error( - 'Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - if (account === null || account === undefined) { - throw new Error( - 'Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - if (organization === null || organization === undefined) { - throw new Error( - 'Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Get Access Grant + * @endpoint post /inse-account/auth/access + * @param secret + * @param account + * @param organization + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (secret === null || secret === undefined) { + throw new Error('Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.'); + } + if (account === null || account === undefined) { + throw new Error('Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.'); + } + if (organization === null || organization === undefined) { + throw new Error('Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/x-www-form-urlencoded' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (secret !== undefined) { + localVarFormParams = localVarFormParams.append('secret', secret) as any || localVarFormParams; + } + if (account !== undefined) { + localVarFormParams = localVarFormParams.append('account', account) as any || localVarFormParams; + } + if (organization !== undefined) { + localVarFormParams = localVarFormParams.append('organization', organization) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/inse-account/auth/access`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Get Identity Grant + * @endpoint post /inse-account/auth/id + * @param username + * @param password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/x-www-form-urlencoded']; + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const canConsumeForm = this.canConsumeForm(consumes); + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let localVarFormParams: { append(param: string, value: any): any }; - let localVarUseForm = false; - let localVarConvertFormParamsToString = false; - if (localVarUseForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new HttpParams({ encoder: this.encoder }); + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/x-www-form-urlencoded' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (username !== undefined) { + localVarFormParams = localVarFormParams.append('username', username) as any || localVarFormParams; + } + if (password !== undefined) { + localVarFormParams = localVarFormParams.append('password', password) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/inse-account/auth/id`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - if (secret !== undefined) { - localVarFormParams = - (localVarFormParams.append('secret', secret) as any) || - localVarFormParams; - } - if (account !== undefined) { - localVarFormParams = - (localVarFormParams.append('account', account) as any) || - localVarFormParams; - } - if (organization !== undefined) { - localVarFormParams = - (localVarFormParams.append('organization', organization) as any) || - localVarFormParams; - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/inse-account/auth/access`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: localVarConvertFormParamsToString - ? localVarFormParams.toString() - : localVarFormParams, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Identity Grant - * @endpoint post /inse-account/auth/id - * @param username - * @param password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (username === null || username === undefined) { - throw new Error( - 'Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.', - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/x-www-form-urlencoded']; - - const canConsumeForm = this.canConsumeForm(consumes); - - let localVarFormParams: { append(param: string, value: any): any }; - let localVarUseForm = false; - let localVarConvertFormParamsToString = false; - if (localVarUseForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new HttpParams({ encoder: this.encoder }); - } - - if (username !== undefined) { - localVarFormParams = - (localVarFormParams.append('username', username) as any) || - localVarFormParams; - } - if (password !== undefined) { - localVarFormParams = - (localVarFormParams.append('password', password) as any) || - localVarFormParams; - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/inse-account/auth/id`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: localVarConvertFormParamsToString - ? localVarFormParams.toString() - : localVarFormParams, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/iNSEService.service.ts b/webapp/src/app/api/api/iNSEService.service.ts index 8788adee..cf95d68e 100644 --- a/webapp/src/app/api/api/iNSEService.service.ts +++ b/webapp/src/app/api/api/iNSEService.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'; @@ -32,922 +26,513 @@ import { ItemCreate } from '../model/itemCreate'; import { ItemPage } from '../model/itemPage'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class INSEServiceService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Adds a new item. - * @endpoint post /api/inse-service/items - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addItem( - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public addItem( - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling addItem.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Adds a new item. + * @endpoint post /api/inse-service/items + * @param itemCreate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addItem(itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public addItem(itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public addItem(itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public addItem(itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (itemCreate === null || itemCreate === undefined) { + throw new Error('Required parameter itemCreate was null or undefined when calling addItem.'); + } - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); - const 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/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - 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); + } - /** - * Builds the topic hierarchy cache. - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: 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, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - saveJson, - 'save_json', - ); + let responseType_: '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/topics/cache`; - 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, - }, - ); - } - - /** - * Counts topic hierarchy occurrences from cache. - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public countTopicHierarchy( - topic: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public countTopicHierarchy( - topic: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - 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 countTopicHierarchy.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', + let localVarPath = `/api/inse-service/items`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: itemCreate, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Builds the topic hierarchy cache. + * @endpoint get /api/inse-service/topics/cache + * @param pageSize Page size for each search page. + * @param saveJson Persist cache JSON to data folder. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public buildTopicCache(pageSize?: number, saveJson?: boolean, 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}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + saveJson, 'save_json'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/topics/cache`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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(); + /** + * Counts topic hierarchy occurrences from cache. + * @endpoint get /api/inse-service/topics/count + * @param topic Topic names (repeat parameter). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public countTopicHierarchy(topic: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public countTopicHierarchy(topic: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public countTopicHierarchy(topic: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public countTopicHierarchy(topic: Array, 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 countTopicHierarchy.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic'); + }) + } - let responseType_: '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/topics/count`; + 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/topics/count`; - 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, - }, - ); - } + /** + * Deletes the item with the id. + * @endpoint delete /api/inse-service/items/{id} + * @param id The item id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteItem(id: number, 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 deleteItem.'); + } - /** - * Deletes the item with the id. - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - 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 deleteItem.', - ); + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns the item with the id. + * @endpoint get /api/inse-service/items/{id} + * @param id The item id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItem(id: number, 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 getItem.'); + } - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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 page of items. + * @endpoint get /api/inse-service/items + * @param pageOffset The page offset. + * @param pageSize The page size. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getItems(pageOffset?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getItems(pageOffset?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItems(pageOffset?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItems(pageOffset?: number, pageSize?: 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, + pageOffset, 'pageOffset'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); - let responseType_: '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 (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). + * @endpoint get /api/inse-service/topics/hierarchy + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicHierarchy(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + 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 { - /** - * Returns the item with the id. - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - 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 getItem.', - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/topics/hierarchy`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Updates the item with the id. + * @endpoint put /api/inse-service/items/{id} + * @param id The item id. + * @param itemCreate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateItem(id: number, itemCreate: ItemCreate, 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 updateItem.'); + } + if (itemCreate === null || itemCreate === undefined) { + throw new Error('Required parameter itemCreate was null or undefined when calling updateItem.'); + } - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: itemCreate, + 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/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns a page of items. - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: 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, - pageOffset, - 'pageOffset', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * @endpoint get /api/inse-service/topics/hierarchy - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicHierarchy( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - 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/inse-service/topics/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, - }, - ); - } - - /** - * Updates the item with the id. - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - 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 updateItem.', - ); - } - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling updateItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('put', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } } diff --git a/webapp/src/app/api/api/inse-account-service.service.ts b/webapp/src/app/api/api/inse-account-service.service.ts deleted file mode 100644 index 4e455475..00000000 --- a/webapp/src/app/api/api/inse-account-service.service.ts +++ /dev/null @@ -1,347 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { AccessGrant } from '../model/access-grant'; -// @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; -// @ts-ignore -import { IdentityGrant } from '../model/identity-grant'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { BaseService } from '../api.base.service'; -import { INSEAccountServiceServiceInterface } from './inse-account-service.serviceInterface'; - -@Injectable({ - providedIn: 'root', -}) -export class INSEAccountServiceService - extends BaseService - implements INSEAccountServiceServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - - /** - * Get Access Grant - * @endpoint post /inse-account/auth/access - * @param secret - * @param account - * @param organization - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (secret === null || secret === undefined) { - throw new Error( - 'Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - if (account === null || account === undefined) { - throw new Error( - 'Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - if (organization === null || organization === undefined) { - throw new Error( - 'Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/x-www-form-urlencoded']; - - const canConsumeForm = this.canConsumeForm(consumes); - - let localVarFormParams: { append(param: string, value: any): any }; - let localVarUseForm = false; - let localVarConvertFormParamsToString = false; - if (localVarUseForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new HttpParams({ encoder: this.encoder }); - } - - if (secret !== undefined) { - localVarFormParams = - (localVarFormParams.append('secret', secret) as any) || - localVarFormParams; - } - if (account !== undefined) { - localVarFormParams = - (localVarFormParams.append('account', account) as any) || - localVarFormParams; - } - if (organization !== undefined) { - localVarFormParams = - (localVarFormParams.append('organization', organization) as any) || - localVarFormParams; - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/inse-account/auth/access`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: localVarConvertFormParamsToString - ? localVarFormParams.toString() - : localVarFormParams, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Identity Grant - * @endpoint post /inse-account/auth/id - * @param username - * @param password - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (username === null || username === undefined) { - throw new Error( - 'Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.', - ); - } - if (password === null || password === undefined) { - throw new Error( - 'Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/x-www-form-urlencoded']; - - const canConsumeForm = this.canConsumeForm(consumes); - - let localVarFormParams: { append(param: string, value: any): any }; - let localVarUseForm = false; - let localVarConvertFormParamsToString = false; - if (localVarUseForm) { - localVarFormParams = new FormData(); - } else { - localVarFormParams = new HttpParams({ encoder: this.encoder }); - } - - if (username !== undefined) { - localVarFormParams = - (localVarFormParams.append('username', username) as any) || - localVarFormParams; - } - if (password !== undefined) { - localVarFormParams = - (localVarFormParams.append('password', password) as any) || - localVarFormParams; - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/inse-account/auth/id`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: localVarConvertFormParamsToString - ? localVarFormParams.toString() - : localVarFormParams, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } -} diff --git a/webapp/src/app/api/api/inse-account-service.serviceInterface.ts b/webapp/src/app/api/api/inse-account-service.serviceInterface.ts deleted file mode 100644 index 4f3d6db7..00000000 --- a/webapp/src/app/api/api/inse-account-service.serviceInterface.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AccessGrant } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { IdentityGrant } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface INSEAccountServiceServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Get Access Grant - * - * @endpoint post /inse-account/auth/access - * @param secret - * @param account - * @param organization - */ - getAccessGrantInseAccountAuthAccessPost( - secret: string, - account: number, - organization: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Get Identity Grant - * - * @endpoint post /inse-account/auth/id - * @param username - * @param password - */ - getIdentityGrantInseAccountAuthIdPost( - username: string, - password: string, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/inse-service.service.ts b/webapp/src/app/api/api/inse-service.service.ts deleted file mode 100644 index 1ce8270c..00000000 --- a/webapp/src/app/api/api/inse-service.service.ts +++ /dev/null @@ -1,957 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; -// @ts-ignore -import { Item } from '../model/item'; -// @ts-ignore -import { ItemCreate } from '../model/item-create'; -// @ts-ignore -import { ItemPage } from '../model/item-page'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { BaseService } from '../api.base.service'; -import { INSEServiceServiceInterface } from './inse-service.serviceInterface'; - -@Injectable({ - providedIn: 'root', -}) -export class INSEServiceService - extends BaseService - implements INSEServiceServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - - /** - * Adds a new item. - * @endpoint post /api/inse-service/items - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addItem( - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public addItem( - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling addItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Builds the topic hierarchy cache. - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: 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, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - saveJson, - 'save_json', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/topics/cache`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Counts topic hierarchy occurrences from cache. - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public countTopicHierarchy( - topic: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public countTopicHierarchy( - topic: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - 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 countTopicHierarchy.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', - ); - }); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/topics/count`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Deletes the item with the id. - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - 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 deleteItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the item with the id. - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - 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 getItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns a page of items. - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: 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, - pageOffset, - 'pageOffset', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * @endpoint get /api/inse-service/topics/hierarchy - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicHierarchy( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - 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/inse-service/topics/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, - }, - ); - } - - /** - * Updates the item with the id. - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - 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 updateItem.', - ); - } - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling updateItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('put', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } -} diff --git a/webapp/src/app/api/api/inse-service.serviceInterface.ts b/webapp/src/app/api/api/inse-service.serviceInterface.ts deleted file mode 100644 index 97898ea0..00000000 --- a/webapp/src/app/api/api/inse-service.serviceInterface.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { HTTPValidationError } from '../model/models'; -import { Item } from '../model/models'; -import { ItemCreate } from '../model/models'; -import { ItemPage } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface INSEServiceServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Adds a new item. - * - * @endpoint post /api/inse-service/items - * @param itemCreate - */ - addItem( - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Builds the topic hierarchy cache. - * - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - */ - buildTopicCache( - pageSize?: number, - saveJson?: boolean, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Counts topic hierarchy occurrences from cache. - * - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - */ - countTopicHierarchy( - topic: Array, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Deletes the item with the id. - * - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - */ - deleteItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns the item with the id. - * - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - */ - getItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns a page of items. - * - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - */ - getItems( - pageOffset?: number, - pageSize?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * - * @endpoint get /api/inse-service/topics/hierarchy - */ - getTopicHierarchy(extraHttpRequestParams?: any): Observable; - - /** - * Updates the item with the id. - * - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - */ - updateItem( - id: number, - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/institutions.service.ts b/webapp/src/app/api/api/institutions.service.ts index 2700f021..7a956eca 100644 --- a/webapp/src/app/api/api/institutions.service.ts +++ b/webapp/src/app/api/api/institutions.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,368 +9,242 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore -import { AutocompleteResponse } from '../model/autocomplete-response'; +import { AutocompleteResponse } from '../model/autocompleteResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { InstitutionsListResponse } from '../model/institutions-list-response'; +import { Institution } from '../model/institution'; +// @ts-ignore +import { InstitutionsListResponse } from '../model/institutionsListResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { InstitutionsServiceInterface } from './institutions.serviceInterface'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) -export class InstitutionsService - extends BaseService - implements InstitutionsServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } +export class InstitutionsService extends BaseService { - /** - * Returns institution options for autocomplete inputs. - * @endpoint get /api/institutions/autocomplete - * @param query Institution search text, for example \'Duisburg Essen\'. - * @param countryCode Optional ISO country code filter. - * @param type Optional institution type filter. - * @param limit Maximum number of autocomplete options. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public autocompleteInstitutions( - query: string, - countryCode?: string, - type?: string, - limit?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public autocompleteInstitutions( - query: string, - countryCode?: string, - type?: string, - limit?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteInstitutions( - query: string, - countryCode?: string, - type?: string, - limit?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteInstitutions( - query: string, - countryCode?: string, - type?: string, - limit?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling autocompleteInstitutions.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - countryCode, - 'countryCode', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - type, - 'type', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); + /** + * Returns institution options for autocomplete inputs. + * @endpoint get /api/institutions/autocomplete + * @param query Institution search text, for example \'Duisburg Essen\'. + * @param countryCode Optional ISO country code filter. + * @param type Optional institution type filter. + * @param limit Maximum number of autocomplete options. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling autocompleteInstitutions.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + countryCode, 'countryCode'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + type, 'type'); + 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/institutions/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 single institution by ID. + * Returns a single institution by its OpenAlex ID. + * @endpoint get /api/institutions/{id} + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionById(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionById(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionById(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 getInstitutionById.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/institutions/autocomplete`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Returns a list of OpenAlex institutions. + * @endpoint get /api/institutions + * @param search Full-text search, for example \'Duisburg Essen\'. + * @param filter OpenAlex filter, for example \'country_code:DE,type:education\'. + * @param sort Sort field, for example \'works_count:desc\'. + * @param groupBy OpenAlex group_by field, for example \'country_code\'. + * @param perPage Results per page. + * @param page Page number. Use cursor for deep pagination. + * @param cursor Cursor pagination token. Use \'*\' to start. + * @param sample Random sample size. Cannot be combined with sort or page. + * @param select Comma-separated fields to return. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Returns a list of OpenAlex institutions. - * @endpoint get /api/institutions - * @param search Full-text search, for example \'Duisburg Essen\'. - * @param filter OpenAlex filter, for example \'country_code:DE,type:education\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'country_code\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listInstitutions( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listInstitutions( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listInstitutions( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listInstitutions( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - 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, + 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 localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/institutions`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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/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, - }, - ); - } } diff --git a/webapp/src/app/api/api/institutions.serviceInterface.ts b/webapp/src/app/api/api/institutions.serviceInterface.ts deleted file mode 100644 index bfb7f511..00000000 --- a/webapp/src/app/api/api/institutions.serviceInterface.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AutocompleteResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { InstitutionsListResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface InstitutionsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Returns institution options for autocomplete inputs. - * - * @endpoint get /api/institutions/autocomplete - * @param query Institution search text, for example \'Duisburg Essen\'. - * @param countryCode Optional ISO country code filter. - * @param type Optional institution type filter. - * @param limit Maximum number of autocomplete options. - */ - autocompleteInstitutions( - query: string, - countryCode?: string, - type?: string, - limit?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns a list of OpenAlex institutions. - * - * @endpoint get /api/institutions - * @param search Full-text search, for example \'Duisburg Essen\'. - * @param filter OpenAlex filter, for example \'country_code:DE,type:education\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'country_code\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - */ - listInstitutions( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/items.service.ts b/webapp/src/app/api/api/items.service.ts index 969303a5..69cd8e54 100644 --- a/webapp/src/app/api/api/items.service.ts +++ b/webapp/src/app/api/api/items.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,627 +9,355 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore import { Item } from '../model/item'; // @ts-ignore -import { ItemCreate } from '../model/item-create'; +import { ItemCreate } from '../model/itemCreate'; // @ts-ignore -import { ItemPage } from '../model/item-page'; +import { ItemPage } from '../model/itemPage'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; -import { ItemsServiceInterface } from './items.serviceInterface'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) -export class ItemsService extends BaseService implements ItemsServiceInterface { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } +export class ItemsService extends BaseService { - /** - * Adds a new item. - * @endpoint post /api/inse-service/items - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public addItem( - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public addItem( - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public addItem( - itemCreate: ItemCreate, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling addItem.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Adds a new item. + * @endpoint post /api/inse-service/items + * @param itemCreate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addItem(itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public addItem(itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public addItem(itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public addItem(itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (itemCreate === null || itemCreate === undefined) { + throw new Error('Required parameter itemCreate was null or undefined when calling addItem.'); + } - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: itemCreate, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Deletes the item with the id. + * @endpoint delete /api/inse-service/items/{id} + * @param id The item id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteItem(id: number, 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 deleteItem.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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'; - } + /** + * Returns the item with the id. + * @endpoint get /api/inse-service/items/{id} + * @param id The item id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItem(id: number, 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 getItem.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } + /** + * Returns a page of items. + * @endpoint get /api/inse-service/items + * @param pageOffset The page offset. + * @param pageSize The page size. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getItems(pageOffset?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getItems(pageOffset?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItems(pageOffset?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItems(pageOffset?: number, pageSize?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Deletes the item with the id. - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteItem( - id: number, - 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 deleteItem.', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageOffset, 'pageOffset'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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; + /** + * Updates the item with the id. + * @endpoint put /api/inse-service/items/{id} + * @param id The item id. + * @param itemCreate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateItem(id: number, itemCreate: ItemCreate, 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 updateItem.'); + } + if (itemCreate === null || itemCreate === undefined) { + throw new Error('Required parameter itemCreate was null or undefined when calling updateItem.'); + } - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: itemCreate, + 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/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns the item with the id. - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItem( - id: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItem( - id: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItem( - id: number, - 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 getItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns a page of items. - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getItems( - pageOffset?: number, - pageSize?: 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, - pageOffset, - 'pageOffset', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Updates the item with the id. - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateItem( - id: number, - itemCreate: ItemCreate, - 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 updateItem.', - ); - } - if (itemCreate === null || itemCreate === undefined) { - throw new Error( - 'Required parameter itemCreate was null or undefined when calling updateItem.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('put', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: itemCreate, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } } diff --git a/webapp/src/app/api/api/items.serviceInterface.ts b/webapp/src/app/api/api/items.serviceInterface.ts deleted file mode 100644 index 89cbb34c..00000000 --- a/webapp/src/app/api/api/items.serviceInterface.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { HTTPValidationError } from '../model/models'; -import { Item } from '../model/models'; -import { ItemCreate } from '../model/models'; -import { ItemPage } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface ItemsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Adds a new item. - * - * @endpoint post /api/inse-service/items - * @param itemCreate - */ - addItem( - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Deletes the item with the id. - * - * @endpoint delete /api/inse-service/items/{id} - * @param id The item id. - */ - deleteItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns the item with the id. - * - * @endpoint get /api/inse-service/items/{id} - * @param id The item id. - */ - getItem(id: number, extraHttpRequestParams?: any): Observable; - - /** - * Returns a page of items. - * - * @endpoint get /api/inse-service/items - * @param pageOffset The page offset. - * @param pageSize The page size. - */ - getItems( - pageOffset?: number, - pageSize?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Updates the item with the id. - * - * @endpoint put /api/inse-service/items/{id} - * @param id The item id. - * @param itemCreate - */ - updateItem( - id: number, - itemCreate: ItemCreate, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/person-network.service.ts b/webapp/src/app/api/api/person-network.service.ts deleted file mode 100644 index 2dc1c55e..00000000 --- a/webapp/src/app/api/api/person-network.service.ts +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { CollaborationNetwork } from '../model/collaboration-network'; -// @ts-ignore -import { FilterProperties } from '../model/filter-properties'; -// @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; -import { BaseService } from '../api.base.service'; -import { PersonNetworkServiceInterface } from './person-network.serviceInterface'; - -@Injectable({ - providedIn: 'root', -}) -export class PersonNetworkService - extends BaseService - implements PersonNetworkServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - - /** - * Get a person\'s collaboration network. - * Returns a person\'s collaboration network based on their works and co-authors. - * @endpoint post /api/person/network/{raw_user_id} - * @param rawUserId The raw user ID of the person. - * @param filterProperties - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawUserId === null || rawUserId === undefined) { - throw new Error( - 'Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/person/network/${this.configuration.encodeParam({ name: 'rawUserId', value: rawUserId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: filterProperties, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } -} diff --git a/webapp/src/app/api/api/person-network.serviceInterface.ts b/webapp/src/app/api/api/person-network.serviceInterface.ts deleted file mode 100644 index 1a3b6479..00000000 --- a/webapp/src/app/api/api/person-network.serviceInterface.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { CollaborationNetwork } from '../model/models'; -import { FilterProperties } from '../model/models'; -import { HTTPValidationError } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface PersonNetworkServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Get a person\'s collaboration network. - * Returns a person\'s collaboration network based on their works and co-authors. - * @endpoint post /api/person/network/{raw_user_id} - * @param rawUserId The raw user ID of the person. - * @param filterProperties - */ - getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/personNetwork.service.ts b/webapp/src/app/api/api/personNetwork.service.ts index 5b468938..b1183ff6 100644 --- a/webapp/src/app/api/api/personNetwork.service.ts +++ b/webapp/src/app/api/api/personNetwork.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 { CollaborationNetwork } from '../model/collaborationNetwork'; @@ -30,139 +24,86 @@ import { FilterProperties } from '../model/filterProperties'; import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class PersonNetworkService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Get a person\'s collaboration network. - * Returns a person\'s collaboration network based on their works and co-authors. - * @endpoint post /api/person/network/{raw_user_id} - * @param rawUserId The raw user ID of the person. - * @param filterProperties - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCollaborationNetwork( - rawUserId: string, - filterProperties?: FilterProperties, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawUserId === null || rawUserId === undefined) { - throw new Error( - 'Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Get a person\'s collaboration network. + * Returns a person\'s collaboration network based on their works and co-authors. + * @endpoint post /api/person/network/{raw_user_id} + * @param rawUserId The raw user ID of the person. + * @param filterProperties + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawUserId === null || rawUserId === undefined) { + throw new Error('Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/person/network/${this.configuration.encodeParam({name: "rawUserId", value: rawUserId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: filterProperties, + 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/person/network/${this.configuration.encodeParam({ name: 'rawUserId', value: rawUserId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: filterProperties, - 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 da1cde14..a45848ef 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,1736 +9,880 @@ */ /* 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/authors-list-response'; +import { AuthorsListResponse } from '../model/authorsListResponse'; // @ts-ignore -import { CustomAuthorsListResponse } from '../model/custom-authors-list-response'; +import { CustomAuthorsListResponse } from '../model/customAuthorsListResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { PersonBio } from '../model/person-bio'; +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'; -import { PersonsServiceInterface } from './persons.serviceInterface'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) -export class PersonsService - extends BaseService - implements PersonsServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } +export class PersonsService extends BaseService { - /** - * Generates a bio for a person by author ID. - * @endpoint get /api/inse-service/persons/bio - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param include Comma-separated list to include tags - * @param observe set whether or not to return 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, - include?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public generatePersonBio( - authorId: string, - include?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public generatePersonBio( - authorId: string, - include?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public generatePersonBio( - authorId: string, - include?: 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', - ); - 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/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.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling getPersonByID.', - ); - } - - 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.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include 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 include Comma-separated include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, sources, counts_by_year, works_api_url, dates, cited_by_count_boost - * @param observe set whether or not to return 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, - include?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersons( - authorId?: string, - query?: string, - include?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersons( - authorId?: string, - query?: string, - include?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersons( - authorId?: string, - query?: string, - include?: 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', - ); - 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/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 persons by institution name. - * @endpoint get /api/inse-service/persons/searchByInstitution - * @param institutionName Institution name (e.g., MIT, Oxford University) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchPersonsByInstitution( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsByInstitution( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByInstitution( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByInstitution( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (institutionName === null || institutionName === undefined) { - throw new Error( - 'Required parameter institutionName was null or undefined when calling searchPersonsByInstitution.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsByInstitution.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - institutionName, - 'institution_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/searchByInstitution`; - 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 institution name. - * @endpoint get /api/inse-service/persons/searchByInstitution - * @param institutionName Institution name (e.g., MIT, Oxford University) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchPersonsByInstitution_3( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsByInstitution_3( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByInstitution_3( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByInstitution_3( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (institutionName === null || institutionName === undefined) { - throw new Error( - 'Required parameter institutionName was null or undefined when calling searchPersonsByInstitution_3.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsByInstitution_3.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - institutionName, - 'institution_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/searchByInstitution`; - 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_4( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsByName_4( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByName_4( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsByName_4( - 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_4.', - ); - } - if (include === null || include === undefined) { - throw new Error( - 'Required parameter include was null or undefined when calling searchPersonsByName_4.', - ); - } - - 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 institutionName Filter by institution name - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param strict Strict institution search by target year - * @param filterMode Filter mode: \'in\' or \'from\' - * @param filterYear Filter year - * @param observe set whether or not to return 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, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsList( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: 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, - institutionName, - 'institutionName', - ); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', + /** + * Generates a bio for a person by author ID. + * @endpoint get /api/inse-service/persons/bio + * @param authorId OpenAlex author ID (e.g., A5093075883) + * @param include Comma-separated list to include tags + * @param observe set whether or not to return 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, include?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public generatePersonBio(authorId: string, include?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public generatePersonBio(authorId: string, include?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public generatePersonBio(authorId: string, include?: 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 localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); + 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/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, - strict, - 'strict', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterMode, - 'filterMode', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterYear, - 'filterYear', - ); - - 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.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include 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 institutionName Filter by institution name - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param strict Strict institution search by target year - * @param filterMode Filter mode: \'in\' or \'from\' - * @param filterYear Filter year - * @param observe set whether or not to return 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_5( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchPersonsList_5( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList_5( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchPersonsList_5( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: 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, - institutionName, - 'institutionName', - ); - 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, - strict, - 'strict', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterMode, - 'filterMode', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filterYear, - 'filterYear', - ); - - 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.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include 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 include Comma-separated include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, sources, counts_by_year, works_api_url, dates, cited_by_count_boost + * @param observe set whether or not to return 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, include?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersons(authorId?: string, query?: string, include?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersons(authorId?: string, query?: string, include?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersons(authorId?: string, query?: string, include?: 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'); + 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/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 persons by institution name. + * @endpoint get /api/inse-service/persons/searchByInstitution + * @param institutionName Institution name (e.g., MIT, Oxford University) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchPersonsByInstitution(institutionName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsByInstitution(institutionName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByInstitution(institutionName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByInstitution(institutionName: string, include: string, limit?: number, pageOffset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (institutionName === null || institutionName === undefined) { + throw new Error('Required parameter institutionName was null or undefined when calling searchPersonsByInstitution.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsByInstitution.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionName, 'institution_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/searchByInstitution`; + 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 institution name. + * @endpoint get /api/inse-service/persons/searchByInstitution + * @param institutionName Institution name (e.g., MIT, Oxford University) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchPersonsByInstitution_3(institutionName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsByInstitution_3(institutionName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByInstitution_3(institutionName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByInstitution_3(institutionName: string, include: string, limit?: number, pageOffset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (institutionName === null || institutionName === undefined) { + throw new Error('Required parameter institutionName was null or undefined when calling searchPersonsByInstitution_3.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsByInstitution_3.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionName, 'institution_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/searchByInstitution`; + 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_4(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsByName_4(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByName_4(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsByName_4(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_4.'); + } + if (include === null || include === undefined) { + throw new Error('Required parameter include was null or undefined when calling searchPersonsByName_4.'); + } + + 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 institutionName Filter by institution name + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param strict Strict institution search by target year + * @param filterMode Filter mode: \'in\' or \'from\' + * @param filterYear Filter year + * @param observe set whether or not to return 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, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: 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, + institutionName, 'institutionName'); + 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, + strict, 'strict'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterMode, 'filterMode'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterYear, 'filterYear'); + + 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 institutionName Filter by institution name + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param strict Strict institution search by target year + * @param filterMode Filter mode: \'in\' or \'from\' + * @param filterYear Filter year + * @param observe set whether or not to return 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_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: 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, + institutionName, 'institutionName'); + 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, + strict, 'strict'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterMode, 'filterMode'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + filterYear, 'filterYear'); + + 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/persons.serviceInterface.ts b/webapp/src/app/api/api/persons.serviceInterface.ts deleted file mode 100644 index d6b3e740..00000000 --- a/webapp/src/app/api/api/persons.serviceInterface.ts +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AuthorsListResponse } from '../model/models'; -import { CustomAuthorsListResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { PersonBio } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface PersonsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Generates a bio for a person by author ID. - * - * @endpoint get /api/inse-service/persons/bio - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param include Comma-separated list to include tags - */ - generatePersonBio( - authorId: string, - include?: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by ID. - * - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - getPersonByID( - id: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by ID. - * - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - getPersonByID_1( - id: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons by ID or name. - * - * @endpoint get /api/inse-service/persons/search - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param query Search query (e.g., Arman AND Arzani) - * @param include Comma-separated include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, sources, counts_by_year, works_api_url, dates, cited_by_count_boost - */ - searchPersons( - authorId?: string, - query?: string, - include?: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/autocomplete - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - searchPersonsAutocomplete( - authorName: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/autocomplete - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - */ - searchPersonsAutocomplete_2( - authorName: string, - include: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons by institution name. - * - * @endpoint get /api/inse-service/persons/searchByInstitution - * @param institutionName Institution name (e.g., MIT, Oxford University) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByInstitution( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons by institution name. - * - * @endpoint get /api/inse-service/persons/searchByInstitution - * @param institutionName Institution name (e.g., MIT, Oxford University) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByInstitution_3( - institutionName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByName( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for person by name. - * - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - */ - searchPersonsByName_4( - authorName: string, - include: string, - limit?: number, - pageOffset?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionName Filter by institution name - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param strict Strict institution search by target year - * @param filterMode Filter mode: \'in\' or \'from\' - * @param filterYear Filter year - */ - searchPersonsList( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionName Filter by institution name - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param strict Strict institution search by target year - * @param filterMode Filter mode: \'in\' or \'from\' - * @param filterYear Filter year - */ - searchPersonsList_5( - query?: string, - institutionName?: string, - topic?: Array, - page?: number, - pageSize?: number, - include?: string, - strict?: boolean, - filterMode?: string, - filterYear?: number, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/projects.service.ts b/webapp/src/app/api/api/projects.service.ts new file mode 100644 index 00000000..cbc915e7 --- /dev/null +++ b/webapp/src/app/api/api/projects.service.ts @@ -0,0 +1,246 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { BundProject } from '../model/bundProject'; +// @ts-ignore +import { BundProjectPage } from '../model/bundProjectPage'; +// @ts-ignore +import { EuProjectPage } from '../model/euProjectPage'; +// @ts-ignore +import { HTTPValidationError } from '../model/hTTPValidationError'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; + + + +@Injectable({ + providedIn: 'root' +}) +export class ProjectsService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get a bund project by its project ID. + * Returns a bund project based on its project ID. + * @endpoint get /api/projects/bund/{bund_project_id} + * @param bundProjectId The ID of the bund project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundProjectById(bundProjectId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBundProjectById(bundProjectId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundProjectById(bundProjectId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundProjectById(bundProjectId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bundProjectId === null || bundProjectId === undefined) { + throw new Error('Required parameter bundProjectId was null or undefined when calling getBundProjectById.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({name: "bundProjectId", value: bundProjectId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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 get /api/projects/bund/search + * @param institutionId The institution ID to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getBundProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (institutionId === null || institutionId === undefined) { + throw new Error('Required parameter institutionId was null or undefined when calling getBundProjects.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, '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'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get EU projects. + * Returns a page of EU projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/eu/search + * @param institutionId The institution ID to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuProjects(institutionId: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (institutionId === null || institutionId === undefined) { + throw new Error('Required parameter institutionId was null or undefined when calling getEuProjects.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + institutionId, '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'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/eu/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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/topics.service.ts b/webapp/src/app/api/api/topics.service.ts index 9eb7c66d..2667546d 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,697 +9,362 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore -import { AutocompleteResponse } from '../model/autocomplete-response'; +import { AutocompleteResponse } from '../model/autocompleteResponse'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { TopicsListResponse } from '../model/topics-list-response'; +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'; -import { TopicsServiceInterface } from './topics.serviceInterface'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) -export class TopicsService - extends BaseService - implements TopicsServiceInterface -{ - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } +export class TopicsService extends BaseService { - /** - * 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 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/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, - }, - ); - } - /** - * Builds the topic hierarchy cache. - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public buildTopicCache( - pageSize?: number, - saveJson?: 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, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - saveJson, - 'save_json', - ); + let responseType_: '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/topics/cache`; - 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, - }, - ); - } - - /** - * Counts topic hierarchy occurrences from cache. - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public countTopicHierarchy( - topic: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public countTopicHierarchy( - topic: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public countTopicHierarchy( - topic: Array, - 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 countTopicHierarchy.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', + 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 + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * Builds the topic hierarchy cache. + * @endpoint get /api/inse-service/topics/cache + * @param pageSize Page size for each search page. + * @param saveJson Persist cache JSON to data folder. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public buildTopicCache(pageSize?: number, saveJson?: boolean, 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}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + saveJson, 'save_json'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/topics/cache`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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(); + /** + * Counts topic hierarchy occurrences from cache. + * @endpoint get /api/inse-service/topics/count + * @param topic Topic names (repeat parameter). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public countTopicHierarchy(topic: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public countTopicHierarchy(topic: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public countTopicHierarchy(topic: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public countTopicHierarchy(topic: Array, 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 countTopicHierarchy.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic'); + }) + } - let responseType_: '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/topics/count`; + 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/topics/count`; - 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 nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). + * @endpoint get /api/inse-service/topics/hierarchy + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicHierarchy(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + 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 { - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * @endpoint get /api/inse-service/topics/hierarchy - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicHierarchy( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - 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; + 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/topics/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 + } + ); } - 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/inse-service/topics/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 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 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, - }, - ); - } } diff --git a/webapp/src/app/api/api/topics.serviceInterface.ts b/webapp/src/app/api/api/topics.serviceInterface.ts deleted file mode 100644 index 43bdd05d..00000000 --- a/webapp/src/app/api/api/topics.serviceInterface.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { AutocompleteResponse } from '../model/models'; -import { HTTPValidationError } from '../model/models'; -import { TopicsListResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface TopicsServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Returns topic options for autocomplete inputs. - * - * @endpoint get /api/topics/autocomplete - * @param query Topic search text, for example \'machine learning\'. - * @param domainId Optional OpenAlex domain id filter. - * @param fieldId Optional OpenAlex field id filter. - * @param subfieldId Optional OpenAlex subfield id filter. - * @param limit Maximum number of autocomplete options. - */ - autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Builds the topic hierarchy cache. - * - * @endpoint get /api/inse-service/topics/cache - * @param pageSize Page size for each search page. - * @param saveJson Persist cache JSON to data folder. - */ - buildTopicCache( - pageSize?: number, - saveJson?: boolean, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Counts topic hierarchy occurrences from cache. - * - * @endpoint get /api/inse-service/topics/count - * @param topic Topic names (repeat parameter). - */ - countTopicHierarchy( - topic: Array, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). - * - * @endpoint get /api/inse-service/topics/hierarchy - */ - getTopicHierarchy(extraHttpRequestParams?: any): Observable; - - /** - * Returns a list of OpenAlex topics. - * - * @endpoint get /api/topics - * @param search Full-text search, for example \'machine learning\'. - * @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'domain.id\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - */ - listTopics( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - extraHttpRequestParams?: any, - ): Observable; -} diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index 3806a5e6..9d95c5d8 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,719 +9,386 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore -import { HTTPValidationError } from '../model/http-validation-error'; +import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { TopicCount } from '../model/topic-count'; +import { TopicCount } from '../model/topicCount'; // @ts-ignore -import { TopicsByTime } from '../model/topics-by-time'; +import { TopicsByTime } from '../model/topicsByTime'; // @ts-ignore import { Work } from '../model/work'; // @ts-ignore -import { WorkPage } from '../model/work-page'; +import { WorkPage } from '../model/workPage'; // @ts-ignore -import { WorksListResponse } from '../model/works-list-response'; +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'; -import { WorksServiceInterface } from './works.serviceInterface'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) -export class WorksService extends BaseService implements WorksServiceInterface { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } +export class WorksService extends BaseService { - /** - * 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.'); + } - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); - const 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 observe set whether or not to return 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, - 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, - 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, - 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, - 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 observe set whether or not to return 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, 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, 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, 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, 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'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/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; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/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; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/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. + * @endpoint get /api/works/detail/{work_id} + * @param workId The OpenAlex work id, for example W2741809807. + * @param observe set whether or not to return 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(workId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWork(workId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWork(workId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWork(workId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (workId === null || workId === undefined) { + throw new Error('Required parameter workId was null or undefined when calling getWork.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/detail/${this.configuration.encodeParam({name: "workId", value: workId, 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; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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. - * @endpoint get /api/works/detail/{work_id} - * @param workId The OpenAlex work id, for example W2741809807. - * @param observe set whether or not to return 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( - workId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWork( - workId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWork( - workId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWork( - workId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (workId === null || workId === undefined) { - throw new Error( - 'Required parameter workId was null or undefined when calling getWork.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (bearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'bearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/detail/${this.configuration.encodeParam({ name: 'workId', value: workId, 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, - }); - } } diff --git a/webapp/src/app/api/api/works.serviceInterface.ts b/webapp/src/app/api/api/works.serviceInterface.ts deleted file mode 100644 index 718c6192..00000000 --- a/webapp/src/app/api/api/works.serviceInterface.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { HttpHeaders } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { HTTPValidationError } from '../model/models'; -import { TopicCount } from '../model/models'; -import { TopicsByTime } from '../model/models'; -import { Work } from '../model/models'; -import { WorkPage } from '../model/models'; -import { WorksListResponse } from '../model/models'; - -import { Configuration } from '../configuration'; - -export interface WorksServiceInterface { - defaultHeaders: HttpHeaders; - configuration: Configuration; - - /** - * Returns all works for an author. - * - * @endpoint get /api/works/{author_id}/all - * @param authorId The author id, for example A5023888391. - */ - getAllAuthorWorks( - authorId: string, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns a page of works for an author. - * - * @endpoint get /api/works/{author_id} - * @param authorId The author id, for example A5023888391. - * @param page The page number. - * @param size The page size. - * @param publicationYear Filter by publication year. Can be repeated. - * @param type Filter by publication type. Can be repeated. - * @param language Filter by language code. Can be repeated. - * @param institutionId Filter by OpenAlex institution id. Can be repeated. - * @param topicId Filter by OpenAlex topic id. Can be repeated. - */ - getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns work counts per primary topic for an author. - * - * @endpoint get /api/works/{author_id}/primary-topic-counts - * @param authorId The author id, for example A5023888391. - */ - getPrimaryTopicCountsByAuthor( - authorId: string, - extraHttpRequestParams?: any, - ): Observable>; - - /** - * Returns topics grouped by publication year for an author. - * - * @endpoint get /api/works/{author_id}/topics-by-time - * @param authorId The author id, for example A5023888391. - * @param maxTopicsPerYear The maximum number of topics per year. - * @param targetPublications Target number of publications used for the timeline. Complete years are always included. - * @param includeAll If true, all publications are used for the timeline. - */ - getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - extraHttpRequestParams?: any, - ): Observable; - - /** - * Returns one publication. - * - * @endpoint get /api/works/detail/{work_id} - * @param workId The OpenAlex work id, for example W2741809807. - */ - getWork(workId: string, extraHttpRequestParams?: any): Observable; -} diff --git a/webapp/src/app/api/configuration.ts b/webapp/src/app/api/configuration.ts index 664630b3..c39ce2d6 100644 --- a/webapp/src/app/api/configuration.ts +++ b/webapp/src/app/api/configuration.ts @@ -1,219 +1,193 @@ -import { - HttpHeaders, - HttpParams, - HttpParameterCodec, -} from '@angular/common/http'; +import { HttpHeaders, HttpParams, HttpParameterCodec } from '@angular/common/http'; import { Param } from './param'; export interface ConfigurationParameters { - /** - * @deprecated Since 5.0. Use credentials instead - */ - apiKeys?: { [key: string]: string }; - username?: string; - password?: string; - /** - * @deprecated Since 5.0. Use credentials instead - */ - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - /** - * Takes care of encoding query- and form-parameters. - */ - encoder?: HttpParameterCodec; - /** - * Override the default method for encoding path parameters in various - * styles. - *

- * See {@link README.md} for more details - *

- */ - encodeParam?: (param: Param) => string; - /** - * The keys are the names in the securitySchemes section of the OpenAPI - * document. They should map to the value used for authentication - * minus any standard prefixes such as 'Basic' or 'Bearer'. - */ - credentials?: { [key: string]: string | (() => string | undefined) }; + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Override the default method for encoding path parameters in various + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam?: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials?: {[ key: string ]: string | (() => string | undefined)}; } export class Configuration { - /** - * @deprecated Since 5.0. Use credentials instead - */ - apiKeys?: { [key: string]: string }; - username?: string; - password?: string; - /** - * @deprecated Since 5.0. Use credentials instead - */ - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - /** - * Takes care of encoding query- and form-parameters. - */ - encoder?: HttpParameterCodec; - /** - * Encoding of various path parameter - * styles. - *

- * See {@link README.md} for more details - *

- */ - encodeParam: (param: Param) => string; - /** - * The keys are the names in the securitySchemes section of the OpenAPI - * document. They should map to the value used for authentication - * minus any standard prefixes such as 'Basic' or 'Bearer'. - */ - credentials: { [key: string]: string | (() => string | undefined) }; + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Encoding of various path parameter + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials: {[ key: string ]: string | (() => string | undefined)}; - constructor({ - accessToken, - apiKeys, - basePath, - credentials, - encodeParam, - encoder, - password, - username, - withCredentials, - }: ConfigurationParameters = {}) { - if (apiKeys) { - this.apiKeys = apiKeys; - } - if (username !== undefined) { - this.username = username; - } - if (password !== undefined) { - this.password = password; - } - if (accessToken !== undefined) { - this.accessToken = accessToken; - } - if (basePath !== undefined) { - this.basePath = basePath; - } - if (withCredentials !== undefined) { - this.withCredentials = withCredentials; - } - if (encoder) { - this.encoder = encoder; - } - this.encodeParam = - encodeParam ?? ((param) => this.defaultEncodeParam(param)); - this.credentials = credentials ?? {}; +constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials }: ConfigurationParameters = {}) { + if (apiKeys) { + this.apiKeys = apiKeys; + } + if (username !== undefined) { + this.username = username; + } + if (password !== undefined) { + this.password = password; + } + if (accessToken !== undefined) { + this.accessToken = accessToken; + } + if (basePath !== undefined) { + this.basePath = basePath; + } + if (withCredentials !== undefined) { + this.withCredentials = withCredentials; + } + if (encoder) { + this.encoder = encoder; + } + this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param)); + this.credentials = credentials ?? {}; - // init default bearer credential - if (!this.credentials['bearer']) { - this.credentials['bearer'] = () => { - return typeof this.accessToken === 'function' - ? this.accessToken() - : this.accessToken; - }; - } - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType(contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; + // init default bearer credential + if (!this.credentials['bearer']) { + this.credentials['bearer'] = () => { + return typeof this.accessToken === 'function' + ? this.accessToken() + : this.accessToken; + }; + } } - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; + } - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; } - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; + } + + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; } - return type; - } - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - '^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', - 'i', - ); - return ( - mime !== null && - (jsonMime.test(mime) || - mime.toLowerCase() === 'application/json-patch+json') - ); - } + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } - public lookupCredential(key: string): string | undefined { - const value = this.credentials[key]; - return typeof value === 'function' ? value() : value; - } + public lookupCredential(key: string): string | undefined { + const value = this.credentials[key]; + return typeof value === 'function' + ? value() + : value; + } - public addCredentialToHeaders( - credentialKey: string, - headerName: string, - headers: HttpHeaders, - prefix?: string, - ): HttpHeaders { - const value = this.lookupCredential(credentialKey); - return value ? headers.set(headerName, (prefix ?? '') + value) : headers; - } + public addCredentialToHeaders(credentialKey: string, headerName: string, headers: HttpHeaders, prefix?: string): HttpHeaders { + const value = this.lookupCredential(credentialKey); + return value + ? headers.set(headerName, (prefix ?? '') + value) + : headers; + } - public addCredentialToQuery( - credentialKey: string, - paramName: string, - query: HttpParams, - ): HttpParams { - const value = this.lookupCredential(credentialKey); - return value ? query.set(paramName, value) : query; - } + public addCredentialToQuery(credentialKey: string, paramName: string, query: HttpParams): HttpParams { + const value = this.lookupCredential(credentialKey); + return value + ? query.set(paramName, value) + : query; + } - private defaultEncodeParam(param: Param): string { - // This implementation exists as fallback for missing configuration - // and for backwards compatibility to older typescript-angular generator versions. - // It only works for the 'simple' parameter style. - // Date-handling only works for the 'date-time' format. - // All other styles and Date-formats are probably handled incorrectly. - // - // But: if that's all you need (i.e.: the most common use-case): no need for customization! + private defaultEncodeParam(param: Param): string { + // This implementation exists as fallback for missing configuration + // and for backwards compatibility to older typescript-angular generator versions. + // It only works for the 'simple' parameter style. + // Date-handling only works for the 'date-time' format. + // All other styles and Date-formats are probably handled incorrectly. + // + // But: if that's all you need (i.e.: the most common use-case): no need for customization! - const value = - param.dataFormat === 'date-time' && param.value instanceof Date - ? (param.value as Date).toISOString() - : param.value; + const value = param.dataFormat === 'date-time' && param.value instanceof Date + ? (param.value as Date).toISOString() + : param.value; - return encodeURIComponent(String(value)); - } + return encodeURIComponent(String(value)); + } } diff --git a/webapp/src/app/api/encoder.ts b/webapp/src/app/api/encoder.ts index 889ef00d..138c4d5c 100644 --- a/webapp/src/app/api/encoder.ts +++ b/webapp/src/app/api/encoder.ts @@ -5,16 +5,16 @@ import { HttpParameterCodec } from '@angular/common/http'; * Workaround for https://github.com/angular/angular/issues/18261 */ export class CustomHttpParameterCodec implements HttpParameterCodec { - encodeKey(k: string): string { - return encodeURIComponent(k); - } - encodeValue(v: string): string { - return encodeURIComponent(v); - } - decodeKey(k: string): string { - return decodeURIComponent(k); - } - decodeValue(v: string): string { - return decodeURIComponent(v); - } + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } } diff --git a/webapp/src/app/api/model/access-grant.ts b/webapp/src/app/api/model/access-grant.ts deleted file mode 100644 index a7a6381c..00000000 --- a/webapp/src/app/api/model/access-grant.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthScope } from './auth-scope'; - -export interface AccessGrant { - token_type: string; - access_token: string; - expires_in: number; - scope: AuthScope; - refresh_token: string; -} diff --git a/webapp/src/app/api/model/accessGrant.ts b/webapp/src/app/api/model/accessGrant.ts index 0aa29f6f..ad1f537a 100644 --- a/webapp/src/app/api/model/accessGrant.ts +++ b/webapp/src/app/api/model/accessGrant.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 { AuthScope } from './authScope'; -export interface AccessGrant { - token_type: string; - access_token: string; - expires_in: number; - scope: AuthScope; - refresh_token: string; + +export interface AccessGrant { + token_type: string; + access_token: string; + expires_in: number; + scope: AuthScope; + refresh_token: string; } + diff --git a/webapp/src/app/api/model/auth-scope.ts b/webapp/src/app/api/model/auth-scope.ts deleted file mode 100644 index ed52c93d..00000000 --- a/webapp/src/app/api/model/auth-scope.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthAccount } from './auth-account'; - -export interface AuthScope { - t: string; - a: AuthAccount; - d?: number | null; - r?: Array; -} diff --git a/webapp/src/app/api/model/authAccount.ts b/webapp/src/app/api/model/authAccount.ts index 179a3e67..0c76d8dc 100644 --- a/webapp/src/app/api/model/authAccount.ts +++ b/webapp/src/app/api/model/authAccount.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 AuthAccount { - i: number; - l: string; - o: number; + +export interface AuthAccount { + i: number; + l: string; + o: number; } + diff --git a/webapp/src/app/api/model/authScope.ts b/webapp/src/app/api/model/authScope.ts index 3ccd752e..65ffa9b5 100644 --- a/webapp/src/app/api/model/authScope.ts +++ b/webapp/src/app/api/model/authScope.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 { AuthAccount } from './authAccount'; -export interface AuthScope { - t: string; - a: AuthAccount; - d?: number | null; - r?: Array; + +export interface AuthScope { + t: string; + a: AuthAccount; + d?: number | null; + r?: Array; } + diff --git a/webapp/src/app/api/model/author-affiliations-inner.ts b/webapp/src/app/api/model/author-affiliations-inner.ts deleted file mode 100644 index d13f78c9..00000000 --- a/webapp/src/app/api/model/author-affiliations-inner.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { DehydratedInstitution } from './dehydrated-institution'; - -/** - * AuthorAffiliationsInner - */ -export interface AuthorAffiliationsInner { - institution?: DehydratedInstitution | null; - years?: Array | null; -} diff --git a/webapp/src/app/api/model/author-counts-by-year-inner.ts b/webapp/src/app/api/model/author-counts-by-year-inner.ts deleted file mode 100644 index 1fac5b45..00000000 --- a/webapp/src/app/api/model/author-counts-by-year-inner.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * AuthorCountsByYearInner - */ -export interface AuthorCountsByYearInner { - year?: number | null; - works_count?: number | null; - cited_by_count?: number | null; -} diff --git a/webapp/src/app/api/model/author-ids.ts b/webapp/src/app/api/model/author-ids.ts deleted file mode 100644 index 0b079d33..00000000 --- a/webapp/src/app/api/model/author-ids.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: - */ -export interface AuthorIds { - openalex?: string | null; - orcid?: string | null; - scopus?: string | null; -} diff --git a/webapp/src/app/api/model/author-network-node.ts b/webapp/src/app/api/model/author-network-node.ts deleted file mode 100644 index 2e684c1c..00000000 --- a/webapp/src/app/api/model/author-network-node.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; - -export interface AuthorNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; -} -export namespace AuthorNetworkNode {} diff --git a/webapp/src/app/api/model/author-parsed-longest-name.ts b/webapp/src/app/api/model/author-parsed-longest-name.ts deleted file mode 100644 index f08df27d..00000000 --- a/webapp/src/app/api/model/author-parsed-longest-name.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The longest name parsed into its component parts. - */ -export interface AuthorParsedLongestName { - first?: string | null; - middle?: string | null; - last?: string | null; - suffix?: string | null; - nickname?: string | null; -} diff --git a/webapp/src/app/api/model/author-position-count.ts b/webapp/src/app/api/model/author-position-count.ts deleted file mode 100644 index 989d2c18..00000000 --- a/webapp/src/app/api/model/author-position-count.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface AuthorPositionCount { - first?: number; - middle?: number; - last?: number; - unknown?: number; -} diff --git a/webapp/src/app/api/model/author-summary-stats.ts b/webapp/src/app/api/model/author-summary-stats.ts deleted file mode 100644 index ede015ad..00000000 --- a/webapp/src/app/api/model/author-summary-stats.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Model2YrMeanCitedness } from './model2-yr-mean-citedness'; - -/** - * Citation metrics: - */ -export interface AuthorSummaryStats { - '2yr_mean_citedness'?: Model2YrMeanCitedness | null; - h_index?: number | null; - i10_index?: number | null; -} diff --git a/webapp/src/app/api/model/author.ts b/webapp/src/app/api/model/author.ts index a9199cd9..9ba12273 100644 --- a/webapp/src/app/api/model/author.ts +++ b/webapp/src/app/api/model/author.ts @@ -1,39 +1,41 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { AuthorAffiliationsInner } from './author-affiliations-inner'; -import { AuthorParsedLongestName } from './author-parsed-longest-name'; -import { DehydratedInstitution } from './dehydrated-institution'; -import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; -import { AuthorIds } from './author-ids'; -import { AuthorSummaryStats } from './author-summary-stats'; -import { WorkTopic } from './work-topic'; +import { AuthorAffiliationsInner } from './authorAffiliationsInner'; +import { AuthorParsedLongestName } from './authorParsedLongestName'; +import { DehydratedInstitution } from './dehydratedInstitution'; +import { AuthorCountsByYearInner } from './authorCountsByYearInner'; +import { AuthorIds } from './authorIds'; +import { AuthorSummaryStats } from './authorSummaryStats'; +import { WorkTopic } from './workTopic'; + /** * A person who creates scholarly works */ -export interface Author { - id?: string | null; - orcid?: string | null; - display_name?: string | null; - display_name_alternatives?: Array | null; - longest_name?: string | null; - parsed_longest_name?: AuthorParsedLongestName | null; - works_count?: number | null; - cited_by_count?: number | null; - summary_stats?: AuthorSummaryStats | null; - affiliations?: Array | null; - last_known_institutions?: Array | null; - topics?: Array | null; - counts_by_year?: Array | null; - ids?: AuthorIds | null; - works_api_url?: string | null; - created_date?: string | null; - updated_date?: string | null; +export interface Author { + id?: string | null; + orcid?: string | null; + display_name?: string | null; + display_name_alternatives?: Array | null; + longest_name?: string | null; + parsed_longest_name?: AuthorParsedLongestName | null; + works_count?: number | null; + cited_by_count?: number | null; + summary_stats?: AuthorSummaryStats | null; + affiliations?: Array | null; + last_known_institutions?: Array | null; + topics?: Array | null; + counts_by_year?: Array | null; + ids?: AuthorIds | null; + works_api_url?: string | null; + created_date?: string | null; + updated_date?: string | null; } + diff --git a/webapp/src/app/api/model/authorAffiliationsInner.ts b/webapp/src/app/api/model/authorAffiliationsInner.ts index d1e8f764..270443ff 100644 --- a/webapp/src/app/api/model/authorAffiliationsInner.ts +++ b/webapp/src/app/api/model/authorAffiliationsInner.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 { DehydratedInstitution } from './dehydratedInstitution'; + /** * AuthorAffiliationsInner */ -export interface AuthorAffiliationsInner { - institution?: DehydratedInstitution | null; - years?: Array | null; +export interface AuthorAffiliationsInner { + institution?: DehydratedInstitution | null; + years?: Array | null; } + diff --git a/webapp/src/app/api/model/authorCountsByYearInner.ts b/webapp/src/app/api/model/authorCountsByYearInner.ts index 1fac5b45..d16c7c21 100644 --- a/webapp/src/app/api/model/authorCountsByYearInner.ts +++ b/webapp/src/app/api/model/authorCountsByYearInner.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. */ + /** * AuthorCountsByYearInner */ -export interface AuthorCountsByYearInner { - year?: number | null; - works_count?: number | null; - cited_by_count?: number | null; +export interface AuthorCountsByYearInner { + year?: number | null; + works_count?: number | null; + cited_by_count?: number | null; } + diff --git a/webapp/src/app/api/model/authorIds.ts b/webapp/src/app/api/model/authorIds.ts index 0b079d33..9235a207 100644 --- a/webapp/src/app/api/model/authorIds.ts +++ b/webapp/src/app/api/model/authorIds.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 AuthorIds { - openalex?: string | null; - orcid?: string | null; - scopus?: string | null; +export interface AuthorIds { + openalex?: string | null; + orcid?: string | null; + scopus?: string | null; } + diff --git a/webapp/src/app/api/model/authorNetworkNode.ts b/webapp/src/app/api/model/authorNetworkNode.ts index f67c7148..aee98d47 100644 --- a/webapp/src/app/api/model/authorNetworkNode.ts +++ b/webapp/src/app/api/model/authorNetworkNode.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 { CollaborationNetworkNodeType } from './collaborationNetworkNodeType'; -export interface AuthorNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; + +export interface AuthorNetworkNode { + /** + * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. + */ + raw_id: string; + /** + * The display name of the node. + */ + display_name: string; + /** + * The category of the node, either \'author\', \'institution\', or \'work\'. + */ + category: CollaborationNetworkNodeType; } -export namespace AuthorNetworkNode {} +export namespace AuthorNetworkNode { +} + + diff --git a/webapp/src/app/api/model/authorParsedLongestName.ts b/webapp/src/app/api/model/authorParsedLongestName.ts index f08df27d..f49e04be 100644 --- a/webapp/src/app/api/model/authorParsedLongestName.ts +++ b/webapp/src/app/api/model/authorParsedLongestName.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. */ + /** * The longest name parsed into its component parts. */ -export interface AuthorParsedLongestName { - first?: string | null; - middle?: string | null; - last?: string | null; - suffix?: string | null; - nickname?: string | null; +export interface AuthorParsedLongestName { + first?: string | null; + middle?: string | null; + last?: string | null; + suffix?: string | null; + nickname?: string | null; } + diff --git a/webapp/src/app/api/model/authorPositionCount.ts b/webapp/src/app/api/model/authorPositionCount.ts index 989d2c18..a02e3749 100644 --- a/webapp/src/app/api/model/authorPositionCount.ts +++ b/webapp/src/app/api/model/authorPositionCount.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 AuthorPositionCount { - first?: number; - middle?: number; - last?: number; - unknown?: number; + +export interface AuthorPositionCount { + first?: number; + middle?: number; + last?: number; + unknown?: number; } + diff --git a/webapp/src/app/api/model/authorSummaryStats.ts b/webapp/src/app/api/model/authorSummaryStats.ts index 63c35c31..1cfc0bdb 100644 --- a/webapp/src/app/api/model/authorSummaryStats.ts +++ b/webapp/src/app/api/model/authorSummaryStats.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 { Model2YrMeanCitedness } from './model2YrMeanCitedness'; + /** * Citation metrics: */ -export interface AuthorSummaryStats { - '2yr_mean_citedness'?: Model2YrMeanCitedness | null; - h_index?: number | null; - i10_index?: number | null; +export interface AuthorSummaryStats { + '2yr_mean_citedness'?: Model2YrMeanCitedness | null; + h_index?: number | null; + i10_index?: number | null; } + diff --git a/webapp/src/app/api/model/authors-filter-properties.ts b/webapp/src/app/api/model/authors-filter-properties.ts deleted file mode 100644 index 50795f2a..00000000 --- a/webapp/src/app/api/model/authors-filter-properties.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface AuthorsFilterProperties { - /** - * The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included. - */ - allowed_institutions?: Array; - /** - * The minimum number of collaborations required for an author to be included in the collaboration network. - */ - min_collaborations?: number; - /** - * The maximum number of collaborations allowed for an author to be included in the collaboration network. - */ - max_collaborations?: number; -} diff --git a/webapp/src/app/api/model/authors-list-response.ts b/webapp/src/app/api/model/authors-list-response.ts deleted file mode 100644 index 228618c7..00000000 --- a/webapp/src/app/api/model/authors-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { Author } from './author'; -import { GroupByResult } from './group-by-result'; - -/** - * AuthorsListResponse - */ -export interface AuthorsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/authorsFilterProperties.ts b/webapp/src/app/api/model/authorsFilterProperties.ts index 50795f2a..7312558f 100644 --- a/webapp/src/app/api/model/authorsFilterProperties.ts +++ b/webapp/src/app/api/model/authorsFilterProperties.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 AuthorsFilterProperties { - /** - * The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included. - */ - allowed_institutions?: Array; - /** - * The minimum number of collaborations required for an author to be included in the collaboration network. - */ - min_collaborations?: number; - /** - * The maximum number of collaborations allowed for an author to be included in the collaboration network. - */ - max_collaborations?: number; + +export interface AuthorsFilterProperties { + /** + * The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included. + */ + allowed_institutions?: Array; + /** + * The minimum number of collaborations required for an author to be included in the collaboration network. + */ + min_collaborations?: number; + /** + * The maximum number of collaborations allowed for an author to be included in the collaboration network. + */ + max_collaborations?: number; } + diff --git a/webapp/src/app/api/model/authorsListResponse.ts b/webapp/src/app/api/model/authorsListResponse.ts index bb1a602c..d309ae43 100644 --- a/webapp/src/app/api/model/authorsListResponse.ts +++ b/webapp/src/app/api/model/authorsListResponse.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,11 +11,13 @@ import { Meta } from './meta'; import { Author } from './author'; import { GroupByResult } from './groupByResult'; + /** * AuthorsListResponse */ -export interface AuthorsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; +export interface AuthorsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; } + diff --git a/webapp/src/app/api/model/authorship.ts b/webapp/src/app/api/model/authorship.ts index 224c6007..db3a0bf0 100644 --- a/webapp/src/app/api/model/authorship.ts +++ b/webapp/src/app/api/model/authorship.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. */ -import { DehydratedInstitution } from './dehydrated-institution'; -import { DehydratedAuthor } from './dehydrated-author'; +import { DehydratedInstitution } from './dehydratedInstitution'; +import { DehydratedAuthor } from './dehydratedAuthor'; + /** * Author and their affiliation for a work */ -export interface Authorship { - author_position?: string | null; - author?: DehydratedAuthor | null; - institutions?: Array | null; - countries?: Array | null; - is_corresponding?: boolean | null; - raw_author_name?: string | null; - raw_affiliation_strings?: Array | null; +export interface Authorship { + author_position?: string | null; + author?: DehydratedAuthor | null; + institutions?: Array | null; + countries?: Array | null; + is_corresponding?: boolean | null; + raw_author_name?: string | null; + raw_affiliation_strings?: Array | null; } + diff --git a/webapp/src/app/api/model/autocomplete-response-meta.ts b/webapp/src/app/api/model/autocomplete-response-meta.ts deleted file mode 100644 index 5bf94a57..00000000 --- a/webapp/src/app/api/model/autocomplete-response-meta.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * AutocompleteResponseMeta - */ -export interface AutocompleteResponseMeta { - count?: number | null; - db_response_time_ms?: number | null; -} diff --git a/webapp/src/app/api/model/autocomplete-response-results-inner.ts b/webapp/src/app/api/model/autocomplete-response-results-inner.ts deleted file mode 100644 index 0fa956b7..00000000 --- a/webapp/src/app/api/model/autocomplete-response-results-inner.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * AutocompleteResponseResultsInner - */ -export interface AutocompleteResponseResultsInner { - id?: string | null; - display_name?: string | null; - hint?: string | null; - cited_by_count?: number | null; - works_count?: number | null; - entity_type?: string | null; - external_id?: string | null; -} diff --git a/webapp/src/app/api/model/autocomplete-response.ts b/webapp/src/app/api/model/autocomplete-response.ts deleted file mode 100644 index b4e91a1d..00000000 --- a/webapp/src/app/api/model/autocomplete-response.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AutocompleteResponseMeta } from './autocomplete-response-meta'; -import { AutocompleteResponseResultsInner } from './autocomplete-response-results-inner'; - -/** - * AutocompleteResponse - */ -export interface AutocompleteResponse { - meta?: AutocompleteResponseMeta | null; - results?: Array | null; -} diff --git a/webapp/src/app/api/model/autocompleteResponse.ts b/webapp/src/app/api/model/autocompleteResponse.ts index 8b52b300..e220f57b 100644 --- a/webapp/src/app/api/model/autocompleteResponse.ts +++ b/webapp/src/app/api/model/autocompleteResponse.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 { AutocompleteResponseMeta } from './autocompleteResponseMeta'; import { AutocompleteResponseResultsInner } from './autocompleteResponseResultsInner'; + /** * AutocompleteResponse */ -export interface AutocompleteResponse { - meta?: AutocompleteResponseMeta | null; - results?: Array | null; +export interface AutocompleteResponse { + meta?: AutocompleteResponseMeta | null; + results?: Array | null; } + diff --git a/webapp/src/app/api/model/autocompleteResponseMeta.ts b/webapp/src/app/api/model/autocompleteResponseMeta.ts index 5bf94a57..2e080d39 100644 --- a/webapp/src/app/api/model/autocompleteResponseMeta.ts +++ b/webapp/src/app/api/model/autocompleteResponseMeta.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. */ + /** * AutocompleteResponseMeta */ -export interface AutocompleteResponseMeta { - count?: number | null; - db_response_time_ms?: number | null; +export interface AutocompleteResponseMeta { + count?: number | null; + db_response_time_ms?: number | null; } + diff --git a/webapp/src/app/api/model/autocompleteResponseResultsInner.ts b/webapp/src/app/api/model/autocompleteResponseResultsInner.ts index 0fa956b7..99ba71fe 100644 --- a/webapp/src/app/api/model/autocompleteResponseResultsInner.ts +++ b/webapp/src/app/api/model/autocompleteResponseResultsInner.ts @@ -1,22 +1,24 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * AutocompleteResponseResultsInner */ -export interface AutocompleteResponseResultsInner { - id?: string | null; - display_name?: string | null; - hint?: string | null; - cited_by_count?: number | null; - works_count?: number | null; - entity_type?: string | null; - external_id?: string | null; +export interface AutocompleteResponseResultsInner { + id?: string | null; + display_name?: string | null; + hint?: string | null; + cited_by_count?: number | null; + works_count?: number | null; + entity_type?: string | null; + external_id?: string | null; } + diff --git a/webapp/src/app/api/model/award.ts b/webapp/src/app/api/model/award.ts index a461c971..4e3b5cc9 100644 --- a/webapp/src/app/api/model/award.ts +++ b/webapp/src/app/api/model/award.ts @@ -1,21 +1,23 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Award */ -export interface Award { - id?: string | null; - display_name?: string | null; - funder_award_id?: string | null; - funder_id?: string | null; - funder_display_name?: string | null; - doi?: string | null; +export interface Award { + id?: string | null; + display_name?: string | null; + funder_award_id?: string | null; + funder_id?: string | null; + funder_display_name?: string | null; + doi?: string | null; } + diff --git a/webapp/src/app/api/model/bundProject.ts b/webapp/src/app/api/model/bundProject.ts new file mode 100644 index 00000000..3463aa78 --- /dev/null +++ b/webapp/src/app/api/model/bundProject.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. + */ + + +export interface BundProject { + funding_code?: string | null; + department?: string | null; + department_fullname?: string | null; + referat?: string | null; + project_sponsor?: string | null; + project_sponsor_fullname?: string | null; + work_unit?: string | null; + recipient?: string | null; + municipal_code?: string | null; + municipality?: string | null; + place?: string | null; + state?: string | null; + country?: string | null; + implementing_agency?: string | null; + topic?: string | null; + performance_plan_system?: string | null; + performance_plan_system_text?: string | null; + funding_start?: string | null; + funding_end?: string | null; + grant_amount?: number | null; + funding_profile?: string | null; + joint_project?: string | null; + funding_type?: string | null; + publication_date?: string | null; + unix_timestamp?: number | null; + date?: string | null; + 'new'?: boolean | null; + duration?: string | null; +} + diff --git a/webapp/src/app/api/model/bundProjectPage.ts b/webapp/src/app/api/model/bundProjectPage.ts new file mode 100644 index 00000000..fc378141 --- /dev/null +++ b/webapp/src/app/api/model/bundProjectPage.ts @@ -0,0 +1,31 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { BundProject } from './bundProject'; + + +export interface BundProjectPage { + /** + * The bund projects on this page. + */ + elements?: Array; + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of bund projects. + */ + total?: number; +} + diff --git a/webapp/src/app/api/model/categoryNested.ts b/webapp/src/app/api/model/categoryNested.ts new file mode 100644 index 00000000..8815022d --- /dev/null +++ b/webapp/src/app/api/model/categoryNested.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 { DisplayCodeSplittedNested } from './displayCodeSplittedNested'; + + +export interface CategoryNested { + category?: string | null; + code?: string | null; + display_code?: string | null; + /** + * A tokenized hierarchy breakdown of the display code represented as an array of strings. + */ + display_code_splitted?: Array; + /** + * Granular, nested breakdowns of the split parts of the display code. + */ + display_code_splitted_nested?: Array; +} + diff --git a/webapp/src/app/api/model/collaboration-network-edge.ts b/webapp/src/app/api/model/collaboration-network-edge.ts deleted file mode 100644 index baffb178..00000000 --- a/webapp/src/app/api/model/collaboration-network-edge.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface CollaborationNetworkEdge { - /** - * The raw ID of the source node. - */ - raw_source_id: string; - /** - * The raw ID of the target node. - */ - raw_target_id: string; -} diff --git a/webapp/src/app/api/model/collaboration-network-node-type.ts b/webapp/src/app/api/model/collaboration-network-node-type.ts deleted file mode 100644 index 20d462bd..00000000 --- a/webapp/src/app/api/model/collaboration-network-node-type.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export const CollaborationNetworkNodeType = { - author: 'author', - institution: 'institution', - work: 'work', -} as const; -export type CollaborationNetworkNodeType = - (typeof CollaborationNetworkNodeType)[keyof typeof CollaborationNetworkNodeType]; diff --git a/webapp/src/app/api/model/collaboration-network.ts b/webapp/src/app/api/model/collaboration-network.ts deleted file mode 100644 index c923277d..00000000 --- a/webapp/src/app/api/model/collaboration-network.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { FilterInformation } from './filter-information'; -import { WorkNetworkNode } from './work-network-node'; -import { CollaborationNetworkEdge } from './collaboration-network-edge'; -import { InstitutionNetworkNode } from './institution-network-node'; -import { AuthorNetworkNode } from './author-network-node'; - -export interface CollaborationNetwork { - /** - * The raw person ID of the person whose collaboration network this is. - */ - raw_person_id: string; - /** - * The work nodes in the collaboration network. - */ - work_nodes: Array; - /** - * The author nodes in the collaboration network. - */ - author_nodes: Array; - /** - * The institution nodes in the collaboration network. - */ - institution_nodes: Array; - /** - * The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I - */ - collaboration_edges: Array; - /** - * The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network. - */ - filter_information: FilterInformation; -} diff --git a/webapp/src/app/api/model/collaborationNetwork.ts b/webapp/src/app/api/model/collaborationNetwork.ts index a2fbdc5b..e439c061 100644 --- a/webapp/src/app/api/model/collaborationNetwork.ts +++ b/webapp/src/app/api/model/collaborationNetwork.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 @@ -13,29 +13,31 @@ import { CollaborationNetworkEdge } from './collaborationNetworkEdge'; import { InstitutionNetworkNode } from './institutionNetworkNode'; import { AuthorNetworkNode } from './authorNetworkNode'; -export interface CollaborationNetwork { - /** - * The raw person ID of the person whose collaboration network this is. - */ - raw_person_id: string; - /** - * The work nodes in the collaboration network. - */ - work_nodes: Array; - /** - * The author nodes in the collaboration network. - */ - author_nodes: Array; - /** - * The institution nodes in the collaboration network. - */ - institution_nodes: Array; - /** - * The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I - */ - collaboration_edges: Array; - /** - * The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network. - */ - filter_information: FilterInformation; + +export interface CollaborationNetwork { + /** + * The raw person ID of the person whose collaboration network this is. + */ + raw_person_id: string; + /** + * The work nodes in the collaboration network. + */ + work_nodes: Array; + /** + * The author nodes in the collaboration network. + */ + author_nodes: Array; + /** + * The institution nodes in the collaboration network. + */ + institution_nodes: Array; + /** + * The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I + */ + collaboration_edges: Array; + /** + * The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network. + */ + filter_information: FilterInformation; } + diff --git a/webapp/src/app/api/model/collaborationNetworkEdge.ts b/webapp/src/app/api/model/collaborationNetworkEdge.ts index baffb178..16fb5fc6 100644 --- a/webapp/src/app/api/model/collaborationNetworkEdge.ts +++ b/webapp/src/app/api/model/collaborationNetworkEdge.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 CollaborationNetworkEdge { - /** - * The raw ID of the source node. - */ - raw_source_id: string; - /** - * The raw ID of the target node. - */ - raw_target_id: string; + +export interface CollaborationNetworkEdge { + /** + * The raw ID of the source node. + */ + raw_source_id: string; + /** + * The raw ID of the target node. + */ + raw_target_id: string; } + diff --git a/webapp/src/app/api/model/collaborationNetworkNodeType.ts b/webapp/src/app/api/model/collaborationNetworkNodeType.ts index 3e673f35..752e35b0 100644 --- a/webapp/src/app/api/model/collaborationNetworkNodeType.ts +++ b/webapp/src/app/api/model/collaborationNetworkNodeType.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 CollaborationNetworkNodeType = { - Author: 'author', - Institution: 'institution', - Work: 'work', + Author: 'author', + Institution: 'institution', + Work: 'work' } as const; -export type CollaborationNetworkNodeType = - (typeof CollaborationNetworkNodeType)[keyof typeof CollaborationNetworkNodeType]; +export type CollaborationNetworkNodeType = typeof CollaborationNetworkNodeType[keyof typeof CollaborationNetworkNodeType]; + diff --git a/webapp/src/app/api/model/cost-usd.ts b/webapp/src/app/api/model/cost-usd.ts deleted file mode 100644 index 494cb094..00000000 --- a/webapp/src/app/api/model/cost-usd.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Cost of this request in USD - */ -export interface CostUsd {} diff --git a/webapp/src/app/api/model/costUsd.ts b/webapp/src/app/api/model/costUsd.ts index 494cb094..c7bcbee8 100644 --- a/webapp/src/app/api/model/costUsd.ts +++ b/webapp/src/app/api/model/costUsd.ts @@ -1,14 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Cost of this request in USD */ -export interface CostUsd {} +export interface CostUsd { +} + diff --git a/webapp/src/app/api/model/custom-author.ts b/webapp/src/app/api/model/custom-author.ts deleted file mode 100644 index d4a837ad..00000000 --- a/webapp/src/app/api/model/custom-author.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthorAffiliationsInner } from './author-affiliations-inner'; -import { AuthorParsedLongestName } from './author-parsed-longest-name'; -import { DehydratedInstitution } from './dehydrated-institution'; -import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; -import { AuthorIds } from './author-ids'; -import { AuthorSummaryStats } from './author-summary-stats'; -import { WorkTopic } from './work-topic'; - -export interface CustomAuthor { - id?: string | null; - orcid?: string | null; - display_name?: string | null; - display_name_alternatives?: Array | null; - longest_name?: string | null; - parsed_longest_name?: AuthorParsedLongestName | null; - works_count?: number | null; - cited_by_count?: number | null; - summary_stats?: AuthorSummaryStats | null; - affiliations?: Array | null; - last_known_institutions?: Array | null; - topics?: Array | null; - counts_by_year?: Array | null; - ids?: AuthorIds | null; - works_api_url?: string | null; - created_date?: string | null; - updated_date?: string | null; - relevance_rating?: string | null; -} diff --git a/webapp/src/app/api/model/custom-authors-list-response.ts b/webapp/src/app/api/model/custom-authors-list-response.ts deleted file mode 100644 index 72cb2f9d..00000000 --- a/webapp/src/app/api/model/custom-authors-list-response.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { CustomAuthor } from './custom-author'; -import { Author } from './author'; -import { GroupByResult } from './group-by-result'; - -export interface CustomAuthorsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; - placeholder?: CustomAuthor | null; -} diff --git a/webapp/src/app/api/model/customAuthor.ts b/webapp/src/app/api/model/customAuthor.ts index 58943756..1117cd53 100644 --- a/webapp/src/app/api/model/customAuthor.ts +++ b/webapp/src/app/api/model/customAuthor.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 @@ -15,23 +15,25 @@ import { AuthorIds } from './authorIds'; import { AuthorSummaryStats } from './authorSummaryStats'; import { WorkTopic } from './workTopic'; -export interface CustomAuthor { - id?: string | null; - orcid?: string | null; - display_name?: string | null; - display_name_alternatives?: Array | null; - longest_name?: string | null; - parsed_longest_name?: AuthorParsedLongestName | null; - works_count?: number | null; - cited_by_count?: number | null; - summary_stats?: AuthorSummaryStats | null; - affiliations?: Array | null; - last_known_institutions?: Array | null; - topics?: Array | null; - counts_by_year?: Array | null; - ids?: AuthorIds | null; - works_api_url?: string | null; - created_date?: string | null; - updated_date?: string | null; - relevance_rating?: string | null; + +export interface CustomAuthor { + id?: string | null; + orcid?: string | null; + display_name?: string | null; + display_name_alternatives?: Array | null; + longest_name?: string | null; + parsed_longest_name?: AuthorParsedLongestName | null; + works_count?: number | null; + cited_by_count?: number | null; + summary_stats?: AuthorSummaryStats | null; + affiliations?: Array | null; + last_known_institutions?: Array | null; + topics?: Array | null; + counts_by_year?: Array | null; + ids?: AuthorIds | null; + works_api_url?: string | null; + created_date?: string | null; + updated_date?: string | null; + relevance_rating?: string | null; } + diff --git a/webapp/src/app/api/model/customAuthorsListResponse.ts b/webapp/src/app/api/model/customAuthorsListResponse.ts index d1017811..f6eac14b 100644 --- a/webapp/src/app/api/model/customAuthorsListResponse.ts +++ b/webapp/src/app/api/model/customAuthorsListResponse.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,9 +12,11 @@ import { CustomAuthor } from './customAuthor'; import { Author } from './author'; import { GroupByResult } from './groupByResult'; -export interface CustomAuthorsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; - placeholder?: CustomAuthor | null; + +export interface CustomAuthorsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; + placeholder?: CustomAuthor | null; } + diff --git a/webapp/src/app/api/model/dehydrated-author.ts b/webapp/src/app/api/model/dehydrated-author.ts deleted file mode 100644 index 350718ef..00000000 --- a/webapp/src/app/api/model/dehydrated-author.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts - */ -export interface DehydratedAuthor { - id?: string | null; - display_name?: string | null; - orcid?: string | null; -} diff --git a/webapp/src/app/api/model/dehydrated-funder.ts b/webapp/src/app/api/model/dehydrated-funder.ts deleted file mode 100644 index c4231c13..00000000 --- a/webapp/src/app/api/model/dehydrated-funder.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts - */ -export interface DehydratedFunder { - id?: string | null; - display_name?: string | null; - ror?: string | null; -} diff --git a/webapp/src/app/api/model/dehydrated-institution.ts b/webapp/src/app/api/model/dehydrated-institution.ts deleted file mode 100644 index 956fc03e..00000000 --- a/webapp/src/app/api/model/dehydrated-institution.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Institution](/api-reference/institutions#the-dehydratedinstitution-object) — reduced-field version used in nested contexts - */ -export interface DehydratedInstitution { - id?: string | null; - display_name?: string | null; - ror?: string | null; - country_code?: string | null; - type?: string | null; - lineage?: Array | null; -} diff --git a/webapp/src/app/api/model/dehydrated-source.ts b/webapp/src/app/api/model/dehydrated-source.ts deleted file mode 100644 index b672b5dd..00000000 --- a/webapp/src/app/api/model/dehydrated-source.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * [Dehydrated Source](/api-reference/sources#the-dehydratedsource-object) — reduced-field version used in nested contexts - */ -export interface DehydratedSource { - id?: string | null; - display_name?: string | null; - issn_l?: string | null; - issn?: Array | null; - is_oa?: boolean | null; - is_in_doaj?: boolean | null; - is_core?: boolean | null; - host_organization?: string | null; - host_organization_name?: string | null; - host_organization_lineage?: Array | null; - type?: string | null; -} diff --git a/webapp/src/app/api/model/dehydratedAuthor.ts b/webapp/src/app/api/model/dehydratedAuthor.ts index 350718ef..4d3817f1 100644 --- a/webapp/src/app/api/model/dehydratedAuthor.ts +++ b/webapp/src/app/api/model/dehydratedAuthor.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. */ + /** * [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts */ -export interface DehydratedAuthor { - id?: string | null; - display_name?: string | null; - orcid?: string | null; +export interface DehydratedAuthor { + id?: string | null; + display_name?: string | null; + orcid?: string | null; } + diff --git a/webapp/src/app/api/model/dehydratedFunder.ts b/webapp/src/app/api/model/dehydratedFunder.ts index c4231c13..b134bbb1 100644 --- a/webapp/src/app/api/model/dehydratedFunder.ts +++ b/webapp/src/app/api/model/dehydratedFunder.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. */ + /** * [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts */ -export interface DehydratedFunder { - id?: string | null; - display_name?: string | null; - ror?: string | null; +export interface DehydratedFunder { + id?: string | null; + display_name?: string | null; + ror?: string | null; } + diff --git a/webapp/src/app/api/model/dehydratedInstitution.ts b/webapp/src/app/api/model/dehydratedInstitution.ts index 956fc03e..7b6c9824 100644 --- a/webapp/src/app/api/model/dehydratedInstitution.ts +++ b/webapp/src/app/api/model/dehydratedInstitution.ts @@ -1,21 +1,23 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * [Dehydrated Institution](/api-reference/institutions#the-dehydratedinstitution-object) — reduced-field version used in nested contexts */ -export interface DehydratedInstitution { - id?: string | null; - display_name?: string | null; - ror?: string | null; - country_code?: string | null; - type?: string | null; - lineage?: Array | null; +export interface DehydratedInstitution { + id?: string | null; + display_name?: string | null; + ror?: string | null; + country_code?: string | null; + type?: string | null; + lineage?: Array | null; } + diff --git a/webapp/src/app/api/model/dehydratedSource.ts b/webapp/src/app/api/model/dehydratedSource.ts index b672b5dd..ae714846 100644 --- a/webapp/src/app/api/model/dehydratedSource.ts +++ b/webapp/src/app/api/model/dehydratedSource.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. */ + /** * [Dehydrated Source](/api-reference/sources#the-dehydratedsource-object) — reduced-field version used in nested contexts */ -export interface DehydratedSource { - id?: string | null; - display_name?: string | null; - issn_l?: string | null; - issn?: Array | null; - is_oa?: boolean | null; - is_in_doaj?: boolean | null; - is_core?: boolean | null; - host_organization?: string | null; - host_organization_name?: string | null; - host_organization_lineage?: Array | null; - type?: string | null; +export interface DehydratedSource { + id?: string | null; + display_name?: string | null; + issn_l?: string | null; + issn?: Array | null; + is_oa?: boolean | null; + is_in_doaj?: boolean | null; + is_core?: boolean | null; + host_organization?: string | null; + host_organization_name?: string | null; + host_organization_lineage?: Array | null; + type?: string | null; } + diff --git a/webapp/src/app/api/model/auth-account.ts b/webapp/src/app/api/model/displayCodeSplittedNested.ts similarity index 69% rename from webapp/src/app/api/model/auth-account.ts rename to webapp/src/app/api/model/displayCodeSplittedNested.ts index 179a3e67..ea2743bf 100644 --- a/webapp/src/app/api/model/auth-account.ts +++ b/webapp/src/app/api/model/displayCodeSplittedNested.ts @@ -1,15 +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 AuthAccount { - i: number; - l: string; - o: number; + +export interface DisplayCodeSplittedNested { + single_display_code?: string | null; } + diff --git a/webapp/src/app/api/model/euProject.ts b/webapp/src/app/api/model/euProject.ts new file mode 100644 index 00000000..9303df6c --- /dev/null +++ b/webapp/src/app/api/model/euProject.ts @@ -0,0 +1,51 @@ +/** + * 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 { ProgrammeNested } from './programmeNested'; +import { KeywordNested } from './keywordNested'; +import { OrganizationNested } from './organizationNested'; +import { CategoryNested } from './categoryNested'; + + +export interface EuProject { + acronym?: string | null; + /** + * Structured lists of classification categories and taxonomy mappings assigned to the project. + */ + categories_nested?: Array; + doc_number?: string | null; + doi?: string | null; + ec_max_contribution?: string | null; + end_date?: string | null; + funding_end?: string | null; + funding_start?: string | null; + id?: string | null; + keywords?: string | null; + /** + * Strictly tokenized and isolated keywords nested for targeted search engine aggregations. + */ + keywords_nested?: Array; + link?: string | null; + objective?: string | null; + /** + * The full roster of academic, public, or private organizations participating in the project consortium. + */ + organization_nested?: Array; + /** + * The nested historical line of EU funding frameworks and structural grants supporting this project. + */ + programme_nested?: Array; + source?: string | null; + start_date?: string | null; + status?: string | null; + teaser?: string | null; + title?: string | null; + total_cost?: string | null; +} + diff --git a/webapp/src/app/api/model/euProjectPage.ts b/webapp/src/app/api/model/euProjectPage.ts new file mode 100644 index 00000000..81440c37 --- /dev/null +++ b/webapp/src/app/api/model/euProjectPage.ts @@ -0,0 +1,31 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { EuProject } from './euProject'; + + +export interface EuProjectPage { + /** + * The EU projects on this page. + */ + elements?: Array; + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of EU projects. + */ + total?: number; +} + diff --git a/webapp/src/app/api/model/filter-information.ts b/webapp/src/app/api/model/filter-information.ts deleted file mode 100644 index 47c0ca27..00000000 --- a/webapp/src/app/api/model/filter-information.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { InstitutionInformation } from './institution-information'; -import { WorkTopicInformation } from './work-topic-information'; - -export interface FilterInformation { - /** - * The minimum publication year of the works in the collaboration network. - */ - min_possible_year: number; - /** - * The maximum publication year of the works in the collaboration network. - */ - max_possible_year: number; - /** - * The list of institutions associated with the works in the collaboration network. - */ - institutions: Array; - /** - * The list of topics associated with the works in the collaboration network. - */ - topics: Array; -} diff --git a/webapp/src/app/api/model/filter-properties.ts b/webapp/src/app/api/model/filter-properties.ts deleted file mode 100644 index 6b901b2e..00000000 --- a/webapp/src/app/api/model/filter-properties.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { WorksFilterProperties } from './works-filter-properties'; -import { AuthorsFilterProperties } from './authors-filter-properties'; - -export interface FilterProperties { - /** - * The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used. - */ - filter_by?: string; - works_filter_properties: WorksFilterProperties | null; - authors_filter_properties: AuthorsFilterProperties | null; -} diff --git a/webapp/src/app/api/model/filterInformation.ts b/webapp/src/app/api/model/filterInformation.ts index 1c4af66d..b2078376 100644 --- a/webapp/src/app/api/model/filterInformation.ts +++ b/webapp/src/app/api/model/filterInformation.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,21 +10,23 @@ import { InstitutionInformation } from './institutionInformation'; import { WorkTopicInformation } from './workTopicInformation'; -export interface FilterInformation { - /** - * The minimum publication year of the works in the collaboration network. - */ - min_possible_year: number; - /** - * The maximum publication year of the works in the collaboration network. - */ - max_possible_year: number; - /** - * The list of institutions associated with the works in the collaboration network. - */ - institutions: Array; - /** - * The list of topics associated with the works in the collaboration network. - */ - topics: Array; + +export interface FilterInformation { + /** + * The minimum publication year of the works in the collaboration network. + */ + min_possible_year: number; + /** + * The maximum publication year of the works in the collaboration network. + */ + max_possible_year: number; + /** + * The list of institutions associated with the works in the collaboration network. + */ + institutions: Array; + /** + * The list of topics associated with the works in the collaboration network. + */ + topics: Array; } + diff --git a/webapp/src/app/api/model/filterProperties.ts b/webapp/src/app/api/model/filterProperties.ts index 7caac0b6..608acab4 100644 --- a/webapp/src/app/api/model/filterProperties.ts +++ b/webapp/src/app/api/model/filterProperties.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,11 +10,13 @@ import { WorksFilterProperties } from './worksFilterProperties'; import { AuthorsFilterProperties } from './authorsFilterProperties'; -export interface FilterProperties { - /** - * The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used. - */ - filter_by?: string; - works_filter_properties: WorksFilterProperties | null; - authors_filter_properties: AuthorsFilterProperties | null; + +export interface FilterProperties { + /** + * The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used. + */ + filter_by?: string; + works_filter_properties: WorksFilterProperties | null; + authors_filter_properties: AuthorsFilterProperties | null; } + diff --git a/webapp/src/app/api/model/funder-by-author.ts b/webapp/src/app/api/model/funder-by-author.ts deleted file mode 100644 index 50dc9bb9..00000000 --- a/webapp/src/app/api/model/funder-by-author.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { PublicationIdsByAuthorPosition } from './publication-ids-by-author-position'; -import { AuthorPositionCount } from './author-position-count'; - -export interface FunderByAuthor { - funder_id?: string | null; - funder_name?: string | null; - publication_count: number; - author_position_count: AuthorPositionCount; - publication_ids: PublicationIdsByAuthorPosition; - publication_urls?: { [key: string]: string }; - publication_titles?: { [key: string]: string }; -} diff --git a/webapp/src/app/api/model/funderByAuthor.ts b/webapp/src/app/api/model/funderByAuthor.ts index 4fde5d86..247e5629 100644 --- a/webapp/src/app/api/model/funderByAuthor.ts +++ b/webapp/src/app/api/model/funderByAuthor.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,17 @@ */ import { PublicationIdsByAuthorPosition } from './publicationIdsByAuthorPosition'; import { AuthorPositionCount } from './authorPositionCount'; +import { PublicationDetailByFunder } from './publicationDetailByFunder'; -export interface FunderByAuthor { - funder_id?: string | null; - funder_name?: string | null; - publication_count: number; - author_position_count: AuthorPositionCount; - publication_ids: PublicationIdsByAuthorPosition; - publication_urls?: { [key: string]: string }; - publication_titles?: { [key: string]: string }; + +export interface FunderByAuthor { + funder_id?: string | null; + funder_name?: string | null; + publication_count: number; + author_position_count: AuthorPositionCount; + publication_ids: PublicationIdsByAuthorPosition; + publication_urls?: { [key: string]: string; }; + publication_titles?: { [key: string]: string; }; + publication_details?: { [key: string]: PublicationDetailByFunder; }; } + diff --git a/webapp/src/app/api/model/funders-by-author-response.ts b/webapp/src/app/api/model/funders-by-author-response.ts deleted file mode 100644 index 44d0ffbc..00000000 --- a/webapp/src/app/api/model/funders-by-author-response.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { FunderByAuthor } from './funder-by-author'; - -export interface FundersByAuthorResponse { - author_id: string; - author_name?: string | null; - funder_count: number; - funders: Array; -} diff --git a/webapp/src/app/api/model/fundersByAuthorResponse.ts b/webapp/src/app/api/model/fundersByAuthorResponse.ts index d6e0e02f..1286429e 100644 --- a/webapp/src/app/api/model/fundersByAuthorResponse.ts +++ b/webapp/src/app/api/model/fundersByAuthorResponse.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 { FunderByAuthor } from './funderByAuthor'; -export interface FundersByAuthorResponse { - author_id: string; - author_name?: string | null; - funder_count: number; - funders: Array; + +export interface FundersByAuthorResponse { + author_id: string; + author_name?: string | null; + funder_count: number; + funders: Array; } + diff --git a/webapp/src/app/api/model/fwci.ts b/webapp/src/app/api/model/fwci.ts index bd7eea69..0c0cf8de 100644 --- a/webapp/src/app/api/model/fwci.ts +++ b/webapp/src/app/api/model/fwci.ts @@ -1,14 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Field-weighted Citation Impact, calculated as citations received / citations expected. */ -export interface Fwci {} +export interface Fwci { +} + diff --git a/webapp/src/app/api/model/group-by-result.ts b/webapp/src/app/api/model/group-by-result.ts deleted file mode 100644 index 98580663..00000000 --- a/webapp/src/app/api/model/group-by-result.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * GroupByResult - */ -export interface GroupByResult { - key?: string | null; - key_display_name?: string | null; - count?: number | null; -} diff --git a/webapp/src/app/api/model/groupByResult.ts b/webapp/src/app/api/model/groupByResult.ts index 98580663..68c51855 100644 --- a/webapp/src/app/api/model/groupByResult.ts +++ b/webapp/src/app/api/model/groupByResult.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. */ + /** * GroupByResult */ -export interface GroupByResult { - key?: string | null; - key_display_name?: string | null; - count?: number | null; +export interface GroupByResult { + key?: string | null; + key_display_name?: string | null; + count?: number | null; } + diff --git a/webapp/src/app/api/model/hTTPValidationError.ts b/webapp/src/app/api/model/hTTPValidationError.ts index c8e65c3e..f624be37 100644 --- a/webapp/src/app/api/model/hTTPValidationError.ts +++ b/webapp/src/app/api/model/hTTPValidationError.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 { ValidationError } from './validationError'; -export interface HTTPValidationError { - detail?: Array; + +export interface HTTPValidationError { + detail?: Array; } + diff --git a/webapp/src/app/api/model/http-validation-error.ts b/webapp/src/app/api/model/http-validation-error.ts deleted file mode 100644 index c7691bc7..00000000 --- a/webapp/src/app/api/model/http-validation-error.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { ValidationError } from './validation-error'; - -export interface HTTPValidationError { - detail?: Array; -} diff --git a/webapp/src/app/api/model/identity-grant.ts b/webapp/src/app/api/model/identity-grant.ts deleted file mode 100644 index 264feeb0..00000000 --- a/webapp/src/app/api/model/identity-grant.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { AuthScope } from './auth-scope'; - -export interface IdentityGrant { - token_type: string; - access_token: string; - expires_in: number; - scope: AuthScope; -} diff --git a/webapp/src/app/api/model/identityGrant.ts b/webapp/src/app/api/model/identityGrant.ts index 4bf172b8..9ec3fe50 100644 --- a/webapp/src/app/api/model/identityGrant.ts +++ b/webapp/src/app/api/model/identityGrant.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 { AuthScope } from './authScope'; -export interface IdentityGrant { - token_type: string; - access_token: string; - expires_in: number; - scope: AuthScope; + +export interface IdentityGrant { + token_type: string; + access_token: string; + expires_in: number; + scope: AuthScope; } + diff --git a/webapp/src/app/api/model/institution-geo.ts b/webapp/src/app/api/model/institution-geo.ts deleted file mode 100644 index b438d37c..00000000 --- a/webapp/src/app/api/model/institution-geo.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Latitude } from './latitude'; -import { Longitude } from './longitude'; - -/** - * Location information: - */ -export interface InstitutionGeo { - city?: string | null; - geonames_city_id?: string | null; - region?: string | null; - country_code?: string | null; - country?: string | null; - latitude?: Latitude | null; - longitude?: Longitude | null; -} diff --git a/webapp/src/app/api/model/institution-ids.ts b/webapp/src/app/api/model/institution-ids.ts deleted file mode 100644 index fd952098..00000000 --- a/webapp/src/app/api/model/institution-ids.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: - */ -export interface InstitutionIds { - openalex?: string | null; - ror?: string | null; - mag?: number | null; - grid?: string | null; - wikipedia?: string | null; - wikidata?: string | null; -} diff --git a/webapp/src/app/api/model/institution-information.ts b/webapp/src/app/api/model/institution-information.ts deleted file mode 100644 index 9e12986d..00000000 --- a/webapp/src/app/api/model/institution-information.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface InstitutionInformation { - /** - * The raw institution ID of the institution. - */ - raw_id: string; - /** - * The display name of the institution. - */ - display_name: string; -} diff --git a/webapp/src/app/api/model/institution-network-node.ts b/webapp/src/app/api/model/institution-network-node.ts deleted file mode 100644 index 981be8cf..00000000 --- a/webapp/src/app/api/model/institution-network-node.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; - -export interface InstitutionNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; -} -export namespace InstitutionNetworkNode {} diff --git a/webapp/src/app/api/model/institution.ts b/webapp/src/app/api/model/institution.ts index 8a86878a..6b1a5778 100644 --- a/webapp/src/app/api/model/institution.ts +++ b/webapp/src/app/api/model/institution.ts @@ -1,39 +1,41 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -import { InstitutionIds } from './institution-ids'; -import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; -import { AuthorSummaryStats } from './author-summary-stats'; -import { InstitutionGeo } from './institution-geo'; +import { InstitutionIds } from './institutionIds'; +import { AuthorCountsByYearInner } from './authorCountsByYearInner'; +import { AuthorSummaryStats } from './authorSummaryStats'; +import { InstitutionGeo } from './institutionGeo'; + /** * 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; - 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; + created_date?: string | null; + updated_date?: string | null; } + diff --git a/webapp/src/app/api/model/institutionGeo.ts b/webapp/src/app/api/model/institutionGeo.ts index b438d37c..949b73f4 100644 --- a/webapp/src/app/api/model/institutionGeo.ts +++ b/webapp/src/app/api/model/institutionGeo.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,15 +10,17 @@ import { Latitude } from './latitude'; import { Longitude } from './longitude'; + /** * Location information: */ -export interface InstitutionGeo { - city?: string | null; - geonames_city_id?: string | null; - region?: string | null; - country_code?: string | null; - country?: string | null; - latitude?: Latitude | null; - longitude?: Longitude | null; +export interface InstitutionGeo { + city?: string | null; + geonames_city_id?: string | null; + region?: string | null; + country_code?: string | null; + country?: string | null; + latitude?: Latitude | null; + longitude?: Longitude | null; } + diff --git a/webapp/src/app/api/model/institutionIds.ts b/webapp/src/app/api/model/institutionIds.ts index fd952098..93d801e1 100644 --- a/webapp/src/app/api/model/institutionIds.ts +++ b/webapp/src/app/api/model/institutionIds.ts @@ -1,21 +1,23 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * External identifiers: */ -export interface InstitutionIds { - openalex?: string | null; - ror?: string | null; - mag?: number | null; - grid?: string | null; - wikipedia?: string | null; - wikidata?: string | null; +export interface InstitutionIds { + openalex?: string | null; + ror?: string | null; + mag?: number | null; + grid?: string | null; + wikipedia?: string | null; + wikidata?: string | null; } + diff --git a/webapp/src/app/api/model/institutionInformation.ts b/webapp/src/app/api/model/institutionInformation.ts index 9e12986d..e287b0fa 100644 --- a/webapp/src/app/api/model/institutionInformation.ts +++ b/webapp/src/app/api/model/institutionInformation.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 InstitutionInformation { - /** - * The raw institution ID of the institution. - */ - raw_id: string; - /** - * The display name of the institution. - */ - display_name: string; + +export interface InstitutionInformation { + /** + * The raw institution ID of the institution. + */ + raw_id: string; + /** + * The display name of the institution. + */ + display_name: string; } + diff --git a/webapp/src/app/api/model/institutionNetworkNode.ts b/webapp/src/app/api/model/institutionNetworkNode.ts index 791645b7..a558a8cf 100644 --- a/webapp/src/app/api/model/institutionNetworkNode.ts +++ b/webapp/src/app/api/model/institutionNetworkNode.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 { CollaborationNetworkNodeType } from './collaborationNetworkNodeType'; -export interface InstitutionNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; + +export interface InstitutionNetworkNode { + /** + * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. + */ + raw_id: string; + /** + * The display name of the node. + */ + display_name: string; + /** + * The category of the node, either \'author\', \'institution\', or \'work\'. + */ + category: CollaborationNetworkNodeType; } -export namespace InstitutionNetworkNode {} +export namespace InstitutionNetworkNode { +} + + diff --git a/webapp/src/app/api/model/institutions-list-response.ts b/webapp/src/app/api/model/institutions-list-response.ts deleted file mode 100644 index 15487606..00000000 --- a/webapp/src/app/api/model/institutions-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { Institution } from './institution'; -import { GroupByResult } from './group-by-result'; - -/** - * InstitutionsListResponse - */ -export interface InstitutionsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/institutionsListResponse.ts b/webapp/src/app/api/model/institutionsListResponse.ts index 0ac2c185..908d72fe 100644 --- a/webapp/src/app/api/model/institutionsListResponse.ts +++ b/webapp/src/app/api/model/institutionsListResponse.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,11 +11,13 @@ import { Meta } from './meta'; import { Institution } from './institution'; import { GroupByResult } from './groupByResult'; + /** * InstitutionsListResponse */ -export interface InstitutionsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; +export interface InstitutionsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; } + diff --git a/webapp/src/app/api/model/item-create.ts b/webapp/src/app/api/model/item-create.ts deleted file mode 100644 index 36920a12..00000000 --- a/webapp/src/app/api/model/item-create.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface ItemCreate { - /** - * The name of the item. - */ - name: string; - /** - * The description of the item. - */ - description: string; -} diff --git a/webapp/src/app/api/model/item-page.ts b/webapp/src/app/api/model/item-page.ts deleted file mode 100644 index 53a7140a..00000000 --- a/webapp/src/app/api/model/item-page.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Item } from './item'; - -export interface ItemPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page offset in elements. - */ - offset?: number; - /** - * The total number of elements. - */ - total?: number; - /** - * The page size in elements. - */ - size?: number; -} diff --git a/webapp/src/app/api/model/item.ts b/webapp/src/app/api/model/item.ts index 377f3a81..cc33194a 100644 --- a/webapp/src/app/api/model/item.ts +++ b/webapp/src/app/api/model/item.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 Item { - /** - * The id of the entity. - */ - id: number; - /** - * The name of the item. - */ - name: string; - /** - * The description of the item. - */ - description: string; + +export interface Item { + /** + * The id of the entity. + */ + id: number; + /** + * The name of the item. + */ + name: string; + /** + * The description of the item. + */ + description: string; } + diff --git a/webapp/src/app/api/model/itemCreate.ts b/webapp/src/app/api/model/itemCreate.ts index 36920a12..608d6910 100644 --- a/webapp/src/app/api/model/itemCreate.ts +++ b/webapp/src/app/api/model/itemCreate.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 ItemCreate { - /** - * The name of the item. - */ - name: string; - /** - * The description of the item. - */ - description: string; + +export interface ItemCreate { + /** + * The name of the item. + */ + name: string; + /** + * The description of the item. + */ + description: string; } + diff --git a/webapp/src/app/api/model/itemPage.ts b/webapp/src/app/api/model/itemPage.ts index 53a7140a..56595b8a 100644 --- a/webapp/src/app/api/model/itemPage.ts +++ b/webapp/src/app/api/model/itemPage.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 { Item } from './item'; -export interface ItemPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page offset in elements. - */ - offset?: number; - /** - * The total number of elements. - */ - total?: number; - /** - * The page size in elements. - */ - size?: number; + +export interface ItemPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page offset in elements. + */ + offset?: number; + /** + * The total number of elements. + */ + total?: number; + /** + * The page size in elements. + */ + size?: number; } + diff --git a/webapp/src/app/api/model/model2-yr-mean-citedness.ts b/webapp/src/app/api/model/keywordNested.ts similarity index 74% rename from webapp/src/app/api/model/model2-yr-mean-citedness.ts rename to webapp/src/app/api/model/keywordNested.ts index d9c3d9df..52b088e8 100644 --- a/webapp/src/app/api/model/model2-yr-mean-citedness.ts +++ b/webapp/src/app/api/model/keywordNested.ts @@ -1,11 +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 Model2YrMeanCitedness {} + +export interface KeywordNested { + keyword?: string | null; +} + diff --git a/webapp/src/app/api/model/latitude.ts b/webapp/src/app/api/model/latitude.ts index 8fb58a9b..fe6b49aa 100644 --- a/webapp/src/app/api/model/latitude.ts +++ b/webapp/src/app/api/model/latitude.ts @@ -1,11 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface Latitude {} + +export interface Latitude { +} + diff --git a/webapp/src/app/api/model/location.ts b/webapp/src/app/api/model/location.ts index ba587ef2..f207d751 100644 --- a/webapp/src/app/api/model/location.ts +++ b/webapp/src/app/api/model/location.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. */ -import { DehydratedSource } from './dehydrated-source'; +import { DehydratedSource } from './dehydratedSource'; + /** * Where a work is hosted */ -export interface Location { - is_oa?: boolean | null; - landing_page_url?: string | null; - pdf_url?: string | null; - source?: DehydratedSource | null; - license?: string | null; - license_id?: string | null; - version?: string | null; - is_accepted?: boolean | null; - is_published?: boolean | null; +export interface Location { + is_oa?: boolean | null; + landing_page_url?: string | null; + pdf_url?: string | null; + source?: DehydratedSource | null; + license?: string | null; + license_id?: string | null; + version?: string | null; + is_accepted?: boolean | null; + is_published?: boolean | null; } + diff --git a/webapp/src/app/api/model/longitude.ts b/webapp/src/app/api/model/longitude.ts index d222a6ff..b0d39fce 100644 --- a/webapp/src/app/api/model/longitude.ts +++ b/webapp/src/app/api/model/longitude.ts @@ -1,11 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface Longitude {} + +export interface Longitude { +} + diff --git a/webapp/src/app/api/model/meta.ts b/webapp/src/app/api/model/meta.ts index 0457bafa..8481062a 100644 --- a/webapp/src/app/api/model/meta.ts +++ b/webapp/src/app/api/model/meta.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. */ -import { CostUsd } from './cost-usd'; +import { CostUsd } from './costUsd'; + /** * Metadata about the query results */ -export interface Meta { - count?: number | null; - db_response_time_ms?: number | null; - page?: number | null; - per_page?: number | null; - next_cursor?: string | null; - groups_count?: number | null; - cost_usd?: CostUsd | null; +export interface Meta { + count?: number | null; + db_response_time_ms?: number | null; + page?: number | null; + per_page?: number | null; + next_cursor?: string | null; + groups_count?: number | null; + cost_usd?: CostUsd | null; } + diff --git a/webapp/src/app/api/model/model2YrMeanCitedness.ts b/webapp/src/app/api/model/model2YrMeanCitedness.ts index d9c3d9df..67ec623c 100644 --- a/webapp/src/app/api/model/model2YrMeanCitedness.ts +++ b/webapp/src/app/api/model/model2YrMeanCitedness.ts @@ -1,11 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface Model2YrMeanCitedness {} + +export interface Model2YrMeanCitedness { +} + diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index cd44ec17..7e188d4c 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -1,86 +1,96 @@ -export * from './access-grant'; -export * from './auth-account'; -export * from './auth-scope'; +export * from './accessGrant'; +export * from './authAccount'; +export * from './authScope'; export * from './author'; -export * from './author-affiliations-inner'; -export * from './author-counts-by-year-inner'; -export * from './author-ids'; -export * from './author-network-node'; -export * from './author-parsed-longest-name'; -export * from './author-position-count'; -export * from './author-summary-stats'; -export * from './authors-filter-properties'; -export * from './authors-list-response'; +export * from './authorAffiliationsInner'; +export * from './authorCountsByYearInner'; +export * from './authorIds'; +export * from './authorNetworkNode'; +export * from './authorParsedLongestName'; +export * from './authorPositionCount'; +export * from './authorSummaryStats'; +export * from './authorsFilterProperties'; +export * from './authorsListResponse'; export * from './authorship'; -export * from './autocomplete-response'; -export * from './autocomplete-response-meta'; -export * from './autocomplete-response-results-inner'; +export * from './autocompleteResponse'; +export * from './autocompleteResponseMeta'; +export * from './autocompleteResponseResultsInner'; export * from './award'; -export * from './collaboration-network'; -export * from './collaboration-network-edge'; -export * from './collaboration-network-node-type'; -export * from './cost-usd'; -export * from './custom-author'; -export * from './custom-authors-list-response'; -export * from './dehydrated-author'; -export * from './dehydrated-funder'; -export * from './dehydrated-institution'; -export * from './dehydrated-source'; -export * from './filter-information'; -export * from './filter-properties'; -export * from './funder-by-author'; -export * from './funders-by-author-response'; +export * from './bundProject'; +export * from './bundProjectPage'; +export * from './categoryNested'; +export * from './collaborationNetwork'; +export * from './collaborationNetworkEdge'; +export * from './collaborationNetworkNodeType'; +export * from './costUsd'; +export * from './customAuthor'; +export * from './customAuthorsListResponse'; +export * from './dehydratedAuthor'; +export * from './dehydratedFunder'; +export * from './dehydratedInstitution'; +export * from './dehydratedSource'; +export * from './displayCodeSplittedNested'; +export * from './euProject'; +export * from './euProjectPage'; +export * from './filterInformation'; +export * from './filterProperties'; +export * from './funderByAuthor'; +export * from './fundersByAuthorResponse'; export * from './fwci'; -export * from './group-by-result'; -export * from './http-validation-error'; -export * from './identity-grant'; +export * from './groupByResult'; +export * from './hTTPValidationError'; +export * from './identityGrant'; export * from './institution'; -export * from './institution-geo'; -export * from './institution-ids'; -export * from './institution-information'; -export * from './institution-network-node'; -export * from './institutions-list-response'; +export * from './institutionGeo'; +export * from './institutionIds'; +export * from './institutionInformation'; +export * from './institutionNetworkNode'; +export * from './institutionsListResponse'; export * from './item'; -export * from './item-create'; -export * from './item-page'; +export * from './itemCreate'; +export * from './itemPage'; +export * from './keywordNested'; export * from './latitude'; export * from './location'; export * from './longitude'; export * from './meta'; -export * from './model2-yr-mean-citedness'; -export * from './open-access'; -export * from './person-bio'; -export * from './publication-ids-by-author-position'; -export * from './publications-by-author-response'; +export * from './model2YrMeanCitedness'; +export * from './openAccess'; +export * from './organizationNested'; +export * from './personBio'; +export * from './programmeNested'; +export * from './publicationDetailByFunder'; +export * from './publicationIdsByAuthorPosition'; +export * from './publicationsByAuthorResponse'; export * from './score'; export * from './topic'; -export * from './topic-count'; -export * from './topic-domain'; -export * from './topic-field'; -export * from './topic-ids'; -export * from './topic-subfield'; -export * from './topics-by-time'; -export * from './topics-by-year'; -export * from './topics-list-response'; -export * from './validation-error'; -export * from './validation-error-loc-inner'; +export * from './topicCount'; +export * from './topicDomain'; +export * from './topicField'; +export * from './topicIds'; +export * from './topicSubfield'; +export * from './topicsByTime'; +export * from './topicsByYear'; +export * from './topicsListResponse'; +export * from './validationError'; +export * from './validationErrorLocInner'; export * from './value'; export * from './work'; -export * from './work-biblio'; -export * from './work-citation-normalized-percentile'; -export * from './work-cited-by-percentile-year'; -export * from './work-counts-by-year-inner'; -export * from './work-has-content'; -export * from './work-ids'; -export * from './work-keyword'; -export * from './work-mesh-inner'; -export * from './work-network-node'; -export * from './work-page'; -export * from './work-sustainable-development-goals-inner'; -export * from './work-topic'; -export * from './work-topic-domain'; -export * from './work-topic-field'; -export * from './work-topic-information'; -export * from './work-topic-subfield'; -export * from './works-filter-properties'; -export * from './works-list-response'; +export * from './workBiblio'; +export * from './workCitationNormalizedPercentile'; +export * from './workCitedByPercentileYear'; +export * from './workCountsByYearInner'; +export * from './workHasContent'; +export * from './workIds'; +export * from './workKeyword'; +export * from './workMeshInner'; +export * from './workNetworkNode'; +export * from './workPage'; +export * from './workSustainableDevelopmentGoalsInner'; +export * from './workTopic'; +export * from './workTopicDomain'; +export * from './workTopicField'; +export * from './workTopicInformation'; +export * from './workTopicSubfield'; +export * from './worksFilterProperties'; +export * from './worksListResponse'; diff --git a/webapp/src/app/api/model/open-access.ts b/webapp/src/app/api/model/open-access.ts deleted file mode 100644 index 40d7b1d0..00000000 --- a/webapp/src/app/api/model/open-access.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Open access information - */ -export interface OpenAccess { - is_oa?: boolean | null; - oa_status?: string | null; - oa_url?: string | null; - any_repository_has_fulltext?: boolean | null; -} diff --git a/webapp/src/app/api/model/openAccess.ts b/webapp/src/app/api/model/openAccess.ts index 40d7b1d0..32a4ddd9 100644 --- a/webapp/src/app/api/model/openAccess.ts +++ b/webapp/src/app/api/model/openAccess.ts @@ -1,19 +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. */ + /** * Open access information */ -export interface OpenAccess { - is_oa?: boolean | null; - oa_status?: string | null; - oa_url?: string | null; - any_repository_has_fulltext?: boolean | null; +export interface OpenAccess { + is_oa?: boolean | null; + oa_status?: string | null; + oa_url?: string | null; + any_repository_has_fulltext?: boolean | null; } + diff --git a/webapp/src/app/api/model/organizationNested.ts b/webapp/src/app/api/model/organizationNested.ts new file mode 100644 index 00000000..fdfed27e --- /dev/null +++ b/webapp/src/app/api/model/organizationNested.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 interface OrganizationNested { + ec_contribution?: string | null; + id?: string | null; + name?: string | null; + net_ec_contribution?: string | null; + total_cost?: string | null; + organization_type?: string | null; +} + diff --git a/webapp/src/app/api/model/personBio.ts b/webapp/src/app/api/model/personBio.ts index b060c9a9..f7291e6f 100644 --- a/webapp/src/app/api/model/personBio.ts +++ b/webapp/src/app/api/model/personBio.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 PersonBio { - /** - * The generated biography. - */ - bio: string; + +export interface PersonBio { + /** + * The generated biography. + */ + bio: string; } + diff --git a/webapp/src/app/api/model/person-bio.ts b/webapp/src/app/api/model/programmeNested.ts similarity index 63% rename from webapp/src/app/api/model/person-bio.ts rename to webapp/src/app/api/model/programmeNested.ts index b060c9a9..f13b7312 100644 --- a/webapp/src/app/api/model/person-bio.ts +++ b/webapp/src/app/api/model/programmeNested.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 interface PersonBio { - /** - * The generated biography. - */ - bio: string; + +export interface ProgrammeNested { + code?: string | null; + id?: string | null; + programme?: string | null; } + diff --git a/webapp/src/app/api/model/publication-ids-by-author-position.ts b/webapp/src/app/api/model/publication-ids-by-author-position.ts deleted file mode 100644 index d549f8ed..00000000 --- a/webapp/src/app/api/model/publication-ids-by-author-position.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface PublicationIdsByAuthorPosition { - first?: Array; - middle?: Array; - last?: Array; - unknown?: Array; -} diff --git a/webapp/src/app/api/model/publicationDetailByFunder.ts b/webapp/src/app/api/model/publicationDetailByFunder.ts new file mode 100644 index 00000000..123ded7e --- /dev/null +++ b/webapp/src/app/api/model/publicationDetailByFunder.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. + */ + + +export interface PublicationDetailByFunder { + id: string; + title: string; + 'abstract'?: string | null; + doi?: string | null; + publication_year?: number | null; + publication_date?: string | null; + publication_type?: string | null; + language?: string | null; + publication_url?: string | null; + pdf_url?: string | null; + source_name?: string | null; + source_type?: string | null; + is_open_access?: boolean | null; + open_access_status?: string | null; + has_fulltext?: boolean | null; + license?: string | null; + cited_by_count?: number | null; + is_retracted?: boolean | null; + primary_topic?: string | null; + topic_field?: string | null; + topic_subfield?: string | null; + topic_domain?: string | null; + author_position?: string | null; + authors?: Array; + funder_names?: Array; + institutions?: Array; + countries?: Array; + topics?: Array; + keywords?: Array; + grant_labels?: Array; + counts_by_year?: Array; +} + diff --git a/webapp/src/app/api/model/publicationIdsByAuthorPosition.ts b/webapp/src/app/api/model/publicationIdsByAuthorPosition.ts index d549f8ed..c35050ef 100644 --- a/webapp/src/app/api/model/publicationIdsByAuthorPosition.ts +++ b/webapp/src/app/api/model/publicationIdsByAuthorPosition.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 PublicationIdsByAuthorPosition { - first?: Array; - middle?: Array; - last?: Array; - unknown?: Array; + +export interface PublicationIdsByAuthorPosition { + first?: Array; + middle?: Array; + last?: Array; + unknown?: Array; } + diff --git a/webapp/src/app/api/model/publications-by-author-response.ts b/webapp/src/app/api/model/publications-by-author-response.ts deleted file mode 100644 index 35333880..00000000 --- a/webapp/src/app/api/model/publications-by-author-response.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface PublicationsByAuthorResponse { - author_id: string; - page: number; - page_size: number; - total_works: number; - total: number; - results_count: number; - results: Array; -} diff --git a/webapp/src/app/api/model/publicationsByAuthorResponse.ts b/webapp/src/app/api/model/publicationsByAuthorResponse.ts index 35333880..5176fe39 100644 --- a/webapp/src/app/api/model/publicationsByAuthorResponse.ts +++ b/webapp/src/app/api/model/publicationsByAuthorResponse.ts @@ -1,19 +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 interface PublicationsByAuthorResponse { - author_id: string; - page: number; - page_size: number; - total_works: number; - total: number; - results_count: number; - results: Array; + +export interface PublicationsByAuthorResponse { + author_id: string; + page: number; + page_size: number; + total_works: number; + total: number; + results_count: number; + results: Array; } + diff --git a/webapp/src/app/api/model/score.ts b/webapp/src/app/api/model/score.ts index 5b0b5935..fac39735 100644 --- a/webapp/src/app/api/model/score.ts +++ b/webapp/src/app/api/model/score.ts @@ -1,11 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface Score {} + +export interface Score { +} + diff --git a/webapp/src/app/api/model/topic-count.ts b/webapp/src/app/api/model/topic-count.ts deleted file mode 100644 index 559242d9..00000000 --- a/webapp/src/app/api/model/topic-count.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface TopicCount { - id?: string | null; - /** - * The topic display name. - */ - name: string; - /** - * The number of occurrences. - */ - count?: number; - description?: string | null; -} diff --git a/webapp/src/app/api/model/topic-domain.ts b/webapp/src/app/api/model/topic-domain.ts deleted file mode 100644 index 573bef0d..00000000 --- a/webapp/src/app/api/model/topic-domain.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The domain (highest level) containing this topic: - */ -export interface TopicDomain { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/topic-field.ts b/webapp/src/app/api/model/topic-field.ts deleted file mode 100644 index cd7d08c8..00000000 --- a/webapp/src/app/api/model/topic-field.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The field (second level) containing this topic: - */ -export interface TopicField { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/topic-ids.ts b/webapp/src/app/api/model/topic-ids.ts deleted file mode 100644 index 22ca3343..00000000 --- a/webapp/src/app/api/model/topic-ids.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: - */ -export interface TopicIds { - openalex?: string | null; - wikipedia?: string | null; -} diff --git a/webapp/src/app/api/model/topic-subfield.ts b/webapp/src/app/api/model/topic-subfield.ts deleted file mode 100644 index 79f3c9c7..00000000 --- a/webapp/src/app/api/model/topic-subfield.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The subfield (third level) containing this topic: - */ -export interface TopicSubfield { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/topic.ts b/webapp/src/app/api/model/topic.ts index 36f66189..9fc0ee63 100644 --- a/webapp/src/app/api/model/topic.ts +++ b/webapp/src/app/api/model/topic.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. */ -import { TopicDomain } from './topic-domain'; -import { TopicIds } from './topic-ids'; -import { TopicSubfield } from './topic-subfield'; -import { TopicField } from './topic-field'; +import { TopicDomain } from './topicDomain'; +import { TopicIds } from './topicIds'; +import { TopicSubfield } from './topicSubfield'; +import { TopicField } from './topicField'; + /** * A research topic automatically assigned to works */ -export interface Topic { - id?: string | null; - display_name?: string | null; - description?: string | null; - keywords?: Array | null; - subfield?: TopicSubfield | null; - field?: TopicField | null; - domain?: TopicDomain | null; - works_count?: number | null; - cited_by_count?: number | null; - ids?: TopicIds | null; - works_api_url?: string | null; - created_date?: string | null; - updated_date?: string | null; +export interface Topic { + id?: string | null; + display_name?: string | null; + description?: string | null; + keywords?: Array | null; + subfield?: TopicSubfield | null; + field?: TopicField | null; + domain?: TopicDomain | null; + works_count?: number | null; + cited_by_count?: number | null; + ids?: TopicIds | null; + works_api_url?: string | null; + created_date?: string | null; + updated_date?: string | null; } + diff --git a/webapp/src/app/api/model/topicCount.ts b/webapp/src/app/api/model/topicCount.ts index 559242d9..520042ec 100644 --- a/webapp/src/app/api/model/topicCount.ts +++ b/webapp/src/app/api/model/topicCount.ts @@ -1,22 +1,24 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicCount { - id?: string | null; - /** - * The topic display name. - */ - name: string; - /** - * The number of occurrences. - */ - count?: number; - description?: string | null; + +export interface TopicCount { + id?: string | null; + /** + * The topic display name. + */ + name: string; + /** + * The number of occurrences. + */ + count?: number; + description?: string | null; } + diff --git a/webapp/src/app/api/model/topicDomain.ts b/webapp/src/app/api/model/topicDomain.ts index 573bef0d..652b1bca 100644 --- a/webapp/src/app/api/model/topicDomain.ts +++ b/webapp/src/app/api/model/topicDomain.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 (highest level) containing this topic: */ -export interface TopicDomain { - id?: string | null; - display_name?: string | null; +export interface TopicDomain { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/topicField.ts b/webapp/src/app/api/model/topicField.ts index cd7d08c8..c7351675 100644 --- a/webapp/src/app/api/model/topicField.ts +++ b/webapp/src/app/api/model/topicField.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 (second level) containing this topic: */ -export interface TopicField { - id?: string | null; - display_name?: string | null; +export interface TopicField { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/topicIds.ts b/webapp/src/app/api/model/topicIds.ts index 22ca3343..4aa6738f 100644 --- a/webapp/src/app/api/model/topicIds.ts +++ b/webapp/src/app/api/model/topicIds.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. */ + /** * External identifiers: */ -export interface TopicIds { - openalex?: string | null; - wikipedia?: string | null; +export interface TopicIds { + openalex?: string | null; + wikipedia?: string | null; } + diff --git a/webapp/src/app/api/model/topicSubfield.ts b/webapp/src/app/api/model/topicSubfield.ts index 79f3c9c7..53d37842 100644 --- a/webapp/src/app/api/model/topicSubfield.ts +++ b/webapp/src/app/api/model/topicSubfield.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 subfield (third level) containing this topic: */ -export interface TopicSubfield { - id?: string | null; - display_name?: string | null; +export interface TopicSubfield { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/topics-by-time.ts b/webapp/src/app/api/model/topics-by-time.ts deleted file mode 100644 index 377ac395..00000000 --- a/webapp/src/app/api/model/topics-by-time.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { TopicsByYear } from './topicsByYear'; - -export interface TopicsByTime { - /** - * Topics grouped by year. - */ - elements?: Array; - /** - * The number of years. - */ - total?: number; - /** - * True if the timeline contains only a limited subset of the author's publications. - */ - is_limited?: boolean; - /** - * The number of publications used to build the timeline. - */ - used_publications?: number; - /** - * The total number of publications found for this author. - */ - total_publications?: number; -} diff --git a/webapp/src/app/api/model/topics-by-year.ts b/webapp/src/app/api/model/topics-by-year.ts deleted file mode 100644 index 8aaafbf6..00000000 --- a/webapp/src/app/api/model/topics-by-year.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { TopicCount } from './topic-count'; - -export interface TopicsByYear { - /** - * The publication year. - */ - year: number; - /** - * The number of works in this year. - */ - publication_count?: number; - /** - * The topics in this year. - */ - topics?: Array; - /** - * The primary topics in this year. - */ - primary_topics?: Array; -} diff --git a/webapp/src/app/api/model/topics-list-response.ts b/webapp/src/app/api/model/topics-list-response.ts deleted file mode 100644 index 54285ca1..00000000 --- a/webapp/src/app/api/model/topics-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { GroupByResult } from './group-by-result'; -import { Topic } from './topic'; - -/** - * TopicsListResponse - */ -export interface TopicsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/topicsByTime.ts b/webapp/src/app/api/model/topicsByTime.ts index 3242d9fc..8af7c9bb 100644 --- a/webapp/src/app/api/model/topicsByTime.ts +++ b/webapp/src/app/api/model/topicsByTime.ts @@ -1,33 +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 { TopicsByYear } from './topics-by-year'; +import { TopicsByYear } from './topicsByYear'; -export interface TopicsByTime { - /** - * Topics grouped by year. - */ - elements?: Array; - /** - * The number of years. - */ - total?: number; - /** - * True if the timeline contains only a limited subset of the author's publications. - */ - is_limited?: boolean; - /** - * The number of publications used to build the timeline. - */ - used_publications?: number; - /** - * The total number of publications found for this author. - */ - total_publications?: number; + +export interface TopicsByTime { + /** + * Topics grouped by year. + */ + elements?: Array; + /** + * The number of years. + */ + total?: number; + /** + * True if the timeline contains only a limited subset of the author\'s publications. + */ + is_limited?: boolean; + /** + * The number of publications used to build the timeline. + */ + used_publications?: number; + /** + * The total number of publications found for this author. + */ + total_publications?: number; } + diff --git a/webapp/src/app/api/model/topicsByYear.ts b/webapp/src/app/api/model/topicsByYear.ts index bb2f1820..fded8da0 100644 --- a/webapp/src/app/api/model/topicsByYear.ts +++ b/webapp/src/app/api/model/topicsByYear.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 { TopicCount } from './topicCount'; -export interface TopicsByYear { - /** - * The publication year. - */ - year: number; - /** - * The number of works in this year. - */ - publication_count?: number; - /** - * The topics in this year. - */ - topics?: Array; - /** - * The primary topics in this year. - */ - primary_topics?: Array; + +export interface TopicsByYear { + /** + * The publication year. + */ + year: number; + /** + * The number of works in this year. + */ + publication_count?: number; + /** + * The topics in this year. + */ + topics?: Array; + /** + * The primary topics in this year. + */ + primary_topics?: Array; } + diff --git a/webapp/src/app/api/model/topicsListResponse.ts b/webapp/src/app/api/model/topicsListResponse.ts index 058b45fd..43f21226 100644 --- a/webapp/src/app/api/model/topicsListResponse.ts +++ b/webapp/src/app/api/model/topicsListResponse.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,11 +11,13 @@ import { Meta } from './meta'; import { GroupByResult } from './groupByResult'; import { Topic } from './topic'; + /** * TopicsListResponse */ -export interface TopicsListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; +export interface TopicsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; } + diff --git a/webapp/src/app/api/model/validation-error-loc-inner.ts b/webapp/src/app/api/model/validation-error-loc-inner.ts deleted file mode 100644 index 3c1ffa29..00000000 --- a/webapp/src/app/api/model/validation-error-loc-inner.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface ValidationErrorLocInner {} diff --git a/webapp/src/app/api/model/validation-error.ts b/webapp/src/app/api/model/validation-error.ts deleted file mode 100644 index 87fed83b..00000000 --- a/webapp/src/app/api/model/validation-error.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { ValidationErrorLocInner } from './validation-error-loc-inner'; - -export interface ValidationError { - loc: Array; - msg: string; - type: string; -} diff --git a/webapp/src/app/api/model/validationError.ts b/webapp/src/app/api/model/validationError.ts index 18cd1b61..bdbd57ad 100644 --- a/webapp/src/app/api/model/validationError.ts +++ b/webapp/src/app/api/model/validationError.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 { ValidationErrorLocInner } from './validationErrorLocInner'; -export interface ValidationError { - loc: Array; - msg: string; - type: string; + +export interface ValidationError { + loc: Array; + msg: string; + type: string; } + diff --git a/webapp/src/app/api/model/validationErrorLocInner.ts b/webapp/src/app/api/model/validationErrorLocInner.ts index 3c1ffa29..d248a9b7 100644 --- a/webapp/src/app/api/model/validationErrorLocInner.ts +++ b/webapp/src/app/api/model/validationErrorLocInner.ts @@ -1,11 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface ValidationErrorLocInner {} + +export interface ValidationErrorLocInner { +} + diff --git a/webapp/src/app/api/model/value.ts b/webapp/src/app/api/model/value.ts index 016b21cb..a9fc79ba 100644 --- a/webapp/src/app/api/model/value.ts +++ b/webapp/src/app/api/model/value.ts @@ -1,11 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface Value {} + +export interface Value { +} + diff --git a/webapp/src/app/api/model/work-biblio.ts b/webapp/src/app/api/model/work-biblio.ts deleted file mode 100644 index 65c0a34b..00000000 --- a/webapp/src/app/api/model/work-biblio.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Bibliographic info: `volume`, `issue`, `first_page`, `last_page`. - */ -export interface WorkBiblio { - volume?: string | null; - issue?: string | null; - first_page?: string | null; - last_page?: string | null; -} diff --git a/webapp/src/app/api/model/work-citation-normalized-percentile.ts b/webapp/src/app/api/model/work-citation-normalized-percentile.ts deleted file mode 100644 index 4a2bc6d4..00000000 --- a/webapp/src/app/api/model/work-citation-normalized-percentile.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Value } from './value'; - -/** - * Percentile of citation count normalized by work type, year, and subfield. Includes `value`, `is_in_top_1_percent`, `is_in_top_10_percent`. - */ -export interface WorkCitationNormalizedPercentile { - value?: Value | null; - is_in_top_1_percent?: boolean | null; - is_in_top_10_percent?: boolean | null; -} diff --git a/webapp/src/app/api/model/work-cited-by-percentile-year.ts b/webapp/src/app/api/model/work-cited-by-percentile-year.ts deleted file mode 100644 index 7bcd3c85..00000000 --- a/webapp/src/app/api/model/work-cited-by-percentile-year.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Percentile rank compared to other works published in the same year. Contains `min` and `max`. - */ -export interface WorkCitedByPercentileYear { - min?: number | null; - max?: number | null; -} diff --git a/webapp/src/app/api/model/work-counts-by-year-inner.ts b/webapp/src/app/api/model/work-counts-by-year-inner.ts deleted file mode 100644 index 496a11db..00000000 --- a/webapp/src/app/api/model/work-counts-by-year-inner.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * WorkCountsByYearInner - */ -export interface WorkCountsByYearInner { - year?: number | null; - cited_by_count?: number | null; -} diff --git a/webapp/src/app/api/model/work-has-content.ts b/webapp/src/app/api/model/work-has-content.ts deleted file mode 100644 index 76871238..00000000 --- a/webapp/src/app/api/model/work-has-content.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * Information about downloadable full-text content: - */ -export interface WorkHasContent { - pdf?: boolean | null; - grobid_xml?: boolean | null; -} diff --git a/webapp/src/app/api/model/work-ids.ts b/webapp/src/app/api/model/work-ids.ts deleted file mode 100644 index fe562e40..00000000 --- a/webapp/src/app/api/model/work-ids.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * External identifiers: `openalex`, `doi`, `mag`, `pmid`, `pmcid`. - */ -export interface WorkIds { - openalex?: string | null; - doi?: string | null; - mag?: number | null; - pmid?: string | null; - pmcid?: string | null; -} diff --git a/webapp/src/app/api/model/work-keyword.ts b/webapp/src/app/api/model/work-keyword.ts deleted file mode 100644 index 7270db25..00000000 --- a/webapp/src/app/api/model/work-keyword.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Score } from './score'; - -/** - * WorkKeyword - */ -export interface WorkKeyword { - id?: string | null; - display_name?: string | null; - score?: Score | null; -} diff --git a/webapp/src/app/api/model/work-mesh-inner.ts b/webapp/src/app/api/model/work-mesh-inner.ts deleted file mode 100644 index 36a0c569..00000000 --- a/webapp/src/app/api/model/work-mesh-inner.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * WorkMeshInner - */ -export interface WorkMeshInner { - descriptor_ui?: string | null; - descriptor_name?: string | null; - qualifier_ui?: string | null; - qualifier_name?: string | null; - is_major_topic?: boolean | null; -} diff --git a/webapp/src/app/api/model/work-network-node.ts b/webapp/src/app/api/model/work-network-node.ts deleted file mode 100644 index 0bedef21..00000000 --- a/webapp/src/app/api/model/work-network-node.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { WorkTopicInformation } from './work-topic-information'; -import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; - -export interface WorkNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; - publication_year: number | null; - work_topics_information: Set | null; -} -export namespace WorkNetworkNode {} diff --git a/webapp/src/app/api/model/work-page.ts b/webapp/src/app/api/model/work-page.ts deleted file mode 100644 index 285d2065..00000000 --- a/webapp/src/app/api/model/work-page.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -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; -} diff --git a/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts b/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts deleted file mode 100644 index 8bc67292..00000000 --- a/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Score } from './score'; - -/** - * WorkSustainableDevelopmentGoalsInner - */ -export interface WorkSustainableDevelopmentGoalsInner { - id?: string | null; - display_name?: string | null; - score?: Score | null; -} diff --git a/webapp/src/app/api/model/work-topic-domain.ts b/webapp/src/app/api/model/work-topic-domain.ts deleted file mode 100644 index 13b227df..00000000 --- a/webapp/src/app/api/model/work-topic-domain.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The parent [domain](/api-reference/domains) - */ -export interface WorkTopicDomain { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/work-topic-field.ts b/webapp/src/app/api/model/work-topic-field.ts deleted file mode 100644 index 432b993e..00000000 --- a/webapp/src/app/api/model/work-topic-field.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The parent [field](/api-reference/fields) - */ -export interface WorkTopicField { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/work-topic-information.ts b/webapp/src/app/api/model/work-topic-information.ts deleted file mode 100644 index 5dbbfc78..00000000 --- a/webapp/src/app/api/model/work-topic-information.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface WorkTopicInformation { - /** - * The ID of the topic. - */ - raw_topic_id: string; - /** - * The name of the topic. - */ - display_name: string; -} diff --git a/webapp/src/app/api/model/work-topic-subfield.ts b/webapp/src/app/api/model/work-topic-subfield.ts deleted file mode 100644 index 49c1155b..00000000 --- a/webapp/src/app/api/model/work-topic-subfield.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/** - * The parent [subfield](/api-reference/subfields) - */ -export interface WorkTopicSubfield { - id?: string | null; - display_name?: string | null; -} diff --git a/webapp/src/app/api/model/work-topic.ts b/webapp/src/app/api/model/work-topic.ts deleted file mode 100644 index 73bb7ad9..00000000 --- a/webapp/src/app/api/model/work-topic.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Score } from './score'; -import { WorkTopicDomain } from './work-topic-domain'; -import { WorkTopicSubfield } from './work-topic-subfield'; -import { WorkTopicField } from './work-topic-field'; - -/** - * WorkTopic - */ -export interface WorkTopic { - id?: string | null; - display_name?: string | null; - score?: Score | null; - subfield?: WorkTopicSubfield | null; - field?: WorkTopicField | null; - domain?: WorkTopicDomain | null; -} diff --git a/webapp/src/app/api/model/work.ts b/webapp/src/app/api/model/work.ts index 746cc648..07d94a1c 100644 --- a/webapp/src/app/api/model/work.ts +++ b/webapp/src/app/api/model/work.ts @@ -1,69 +1,71 @@ /** * 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 { DehydratedFunder } from './dehydrated-funder'; +import { DehydratedFunder } from './dehydratedFunder'; import { Authorship } from './authorship'; -import { OpenAccess } from './open-access'; -import { WorkIds } from './work-ids'; -import { WorkSustainableDevelopmentGoalsInner } from './work-sustainable-development-goals-inner'; -import { WorkTopic } from './work-topic'; -import { WorkCountsByYearInner } from './work-counts-by-year-inner'; -import { WorkKeyword } from './work-keyword'; -import { WorkCitationNormalizedPercentile } from './work-citation-normalized-percentile'; +import { OpenAccess } from './openAccess'; +import { WorkIds } from './workIds'; +import { WorkSustainableDevelopmentGoalsInner } from './workSustainableDevelopmentGoalsInner'; +import { WorkTopic } from './workTopic'; +import { WorkCountsByYearInner } from './workCountsByYearInner'; +import { WorkKeyword } from './workKeyword'; +import { WorkCitationNormalizedPercentile } from './workCitationNormalizedPercentile'; import { Award } from './award'; import { Fwci } from './fwci'; -import { WorkMeshInner } from './work-mesh-inner'; -import { WorkCitedByPercentileYear } from './work-cited-by-percentile-year'; -import { WorkHasContent } from './work-has-content'; +import { WorkMeshInner } from './workMeshInner'; +import { WorkCitedByPercentileYear } from './workCitedByPercentileYear'; +import { WorkHasContent } from './workHasContent'; import { Location } from './location'; -import { WorkBiblio } from './work-biblio'; +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; +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; } + diff --git a/webapp/src/app/api/model/workBiblio.ts b/webapp/src/app/api/model/workBiblio.ts index 65c0a34b..f6d7079b 100644 --- a/webapp/src/app/api/model/workBiblio.ts +++ b/webapp/src/app/api/model/workBiblio.ts @@ -1,19 +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. */ + /** * Bibliographic info: `volume`, `issue`, `first_page`, `last_page`. */ -export interface WorkBiblio { - volume?: string | null; - issue?: string | null; - first_page?: string | null; - last_page?: string | null; +export interface WorkBiblio { + volume?: string | null; + issue?: string | null; + first_page?: string | null; + last_page?: string | null; } + diff --git a/webapp/src/app/api/model/workCitationNormalizedPercentile.ts b/webapp/src/app/api/model/workCitationNormalizedPercentile.ts index 4a2bc6d4..a587ddf6 100644 --- a/webapp/src/app/api/model/workCitationNormalizedPercentile.ts +++ b/webapp/src/app/api/model/workCitationNormalizedPercentile.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 { Value } from './value'; + /** * Percentile of citation count normalized by work type, year, and subfield. Includes `value`, `is_in_top_1_percent`, `is_in_top_10_percent`. */ -export interface WorkCitationNormalizedPercentile { - value?: Value | null; - is_in_top_1_percent?: boolean | null; - is_in_top_10_percent?: boolean | null; +export interface WorkCitationNormalizedPercentile { + value?: Value | null; + is_in_top_1_percent?: boolean | null; + is_in_top_10_percent?: boolean | null; } + diff --git a/webapp/src/app/api/model/workCitedByPercentileYear.ts b/webapp/src/app/api/model/workCitedByPercentileYear.ts index 7bcd3c85..5257eb3b 100644 --- a/webapp/src/app/api/model/workCitedByPercentileYear.ts +++ b/webapp/src/app/api/model/workCitedByPercentileYear.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. */ + /** * Percentile rank compared to other works published in the same year. Contains `min` and `max`. */ -export interface WorkCitedByPercentileYear { - min?: number | null; - max?: number | null; +export interface WorkCitedByPercentileYear { + min?: number | null; + max?: number | null; } + diff --git a/webapp/src/app/api/model/workCountsByYearInner.ts b/webapp/src/app/api/model/workCountsByYearInner.ts index 496a11db..76d97d77 100644 --- a/webapp/src/app/api/model/workCountsByYearInner.ts +++ b/webapp/src/app/api/model/workCountsByYearInner.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. */ + /** * WorkCountsByYearInner */ -export interface WorkCountsByYearInner { - year?: number | null; - cited_by_count?: number | null; +export interface WorkCountsByYearInner { + year?: number | null; + cited_by_count?: number | null; } + diff --git a/webapp/src/app/api/model/workHasContent.ts b/webapp/src/app/api/model/workHasContent.ts index 76871238..44fbe446 100644 --- a/webapp/src/app/api/model/workHasContent.ts +++ b/webapp/src/app/api/model/workHasContent.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. */ + /** * Information about downloadable full-text content: */ -export interface WorkHasContent { - pdf?: boolean | null; - grobid_xml?: boolean | null; +export interface WorkHasContent { + pdf?: boolean | null; + grobid_xml?: boolean | null; } + diff --git a/webapp/src/app/api/model/workIds.ts b/webapp/src/app/api/model/workIds.ts index fe562e40..e8315250 100644 --- a/webapp/src/app/api/model/workIds.ts +++ b/webapp/src/app/api/model/workIds.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. */ + /** * External identifiers: `openalex`, `doi`, `mag`, `pmid`, `pmcid`. */ -export interface WorkIds { - openalex?: string | null; - doi?: string | null; - mag?: number | null; - pmid?: string | null; - pmcid?: string | null; +export interface WorkIds { + openalex?: string | null; + doi?: string | null; + mag?: number | null; + pmid?: string | null; + pmcid?: string | null; } + diff --git a/webapp/src/app/api/model/workKeyword.ts b/webapp/src/app/api/model/workKeyword.ts index 7270db25..c9c99afb 100644 --- a/webapp/src/app/api/model/workKeyword.ts +++ b/webapp/src/app/api/model/workKeyword.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 { Score } from './score'; + /** * WorkKeyword */ -export interface WorkKeyword { - id?: string | null; - display_name?: string | null; - score?: Score | null; +export interface WorkKeyword { + id?: string | null; + display_name?: string | null; + score?: Score | null; } + diff --git a/webapp/src/app/api/model/workMeshInner.ts b/webapp/src/app/api/model/workMeshInner.ts index 36a0c569..40633524 100644 --- a/webapp/src/app/api/model/workMeshInner.ts +++ b/webapp/src/app/api/model/workMeshInner.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. */ + /** * WorkMeshInner */ -export interface WorkMeshInner { - descriptor_ui?: string | null; - descriptor_name?: string | null; - qualifier_ui?: string | null; - qualifier_name?: string | null; - is_major_topic?: boolean | null; +export interface WorkMeshInner { + descriptor_ui?: string | null; + descriptor_name?: string | null; + qualifier_ui?: string | null; + qualifier_name?: string | null; + is_major_topic?: boolean | null; } + diff --git a/webapp/src/app/api/model/workNetworkNode.ts b/webapp/src/app/api/model/workNetworkNode.ts index 445cd8ad..abc04a69 100644 --- a/webapp/src/app/api/model/workNetworkNode.ts +++ b/webapp/src/app/api/model/workNetworkNode.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,24 @@ import { WorkTopicInformation } from './workTopicInformation'; import { CollaborationNetworkNodeType } from './collaborationNetworkNodeType'; -export interface WorkNetworkNode { - /** - * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. - */ - raw_id: string; - /** - * The display name of the node. - */ - display_name: string; - /** - * The category of the node, either \'author\', \'institution\', or \'work\'. - */ - category: CollaborationNetworkNodeType; - publication_year: number | null; - work_topics_information: Set | null; + +export interface WorkNetworkNode { + /** + * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. + */ + raw_id: string; + /** + * The display name of the node. + */ + display_name: string; + /** + * The category of the node, either \'author\', \'institution\', or \'work\'. + */ + category: CollaborationNetworkNodeType; + publication_year: number | null; + work_topics_information: Set | null; } -export namespace WorkNetworkNode {} +export namespace WorkNetworkNode { +} + + 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/workSustainableDevelopmentGoalsInner.ts b/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.ts index 8bc67292..c9ecd00f 100644 --- a/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.ts +++ b/webapp/src/app/api/model/workSustainableDevelopmentGoalsInner.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 { Score } from './score'; + /** * WorkSustainableDevelopmentGoalsInner */ -export interface WorkSustainableDevelopmentGoalsInner { - id?: string | null; - display_name?: string | null; - score?: Score | null; +export interface WorkSustainableDevelopmentGoalsInner { + id?: string | null; + display_name?: string | null; + score?: Score | null; } + diff --git a/webapp/src/app/api/model/workTopic.ts b/webapp/src/app/api/model/workTopic.ts index 4b326824..925ead4f 100644 --- a/webapp/src/app/api/model/workTopic.ts +++ b/webapp/src/app/api/model/workTopic.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,14 +12,16 @@ import { WorkTopicDomain } from './workTopicDomain'; import { WorkTopicSubfield } from './workTopicSubfield'; import { WorkTopicField } from './workTopicField'; + /** * WorkTopic */ -export interface WorkTopic { - id?: string | null; - display_name?: string | null; - score?: Score | null; - subfield?: WorkTopicSubfield | null; - field?: WorkTopicField | null; - domain?: WorkTopicDomain | null; +export interface WorkTopic { + id?: string | null; + display_name?: string | null; + score?: Score | null; + subfield?: WorkTopicSubfield | null; + field?: WorkTopicField | null; + domain?: WorkTopicDomain | null; } + diff --git a/webapp/src/app/api/model/workTopicDomain.ts b/webapp/src/app/api/model/workTopicDomain.ts index 13b227df..1a9879d4 100644 --- a/webapp/src/app/api/model/workTopicDomain.ts +++ b/webapp/src/app/api/model/workTopicDomain.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 parent [domain](/api-reference/domains) */ -export interface WorkTopicDomain { - id?: string | null; - display_name?: string | null; +export interface WorkTopicDomain { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/workTopicField.ts b/webapp/src/app/api/model/workTopicField.ts index 432b993e..1807cfc1 100644 --- a/webapp/src/app/api/model/workTopicField.ts +++ b/webapp/src/app/api/model/workTopicField.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 parent [field](/api-reference/fields) */ -export interface WorkTopicField { - id?: string | null; - display_name?: string | null; +export interface WorkTopicField { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/workTopicInformation.ts b/webapp/src/app/api/model/workTopicInformation.ts index 5dbbfc78..ca3b9454 100644 --- a/webapp/src/app/api/model/workTopicInformation.ts +++ b/webapp/src/app/api/model/workTopicInformation.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 WorkTopicInformation { - /** - * The ID of the topic. - */ - raw_topic_id: string; - /** - * The name of the topic. - */ - display_name: string; + +export interface WorkTopicInformation { + /** + * The ID of the topic. + */ + raw_topic_id: string; + /** + * The name of the topic. + */ + display_name: string; } + diff --git a/webapp/src/app/api/model/workTopicSubfield.ts b/webapp/src/app/api/model/workTopicSubfield.ts index 49c1155b..b6e7278a 100644 --- a/webapp/src/app/api/model/workTopicSubfield.ts +++ b/webapp/src/app/api/model/workTopicSubfield.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 parent [subfield](/api-reference/subfields) */ -export interface WorkTopicSubfield { - id?: string | null; - display_name?: string | null; +export interface WorkTopicSubfield { + id?: string | null; + display_name?: string | null; } + diff --git a/webapp/src/app/api/model/works-filter-properties.ts b/webapp/src/app/api/model/works-filter-properties.ts deleted file mode 100644 index fd25fd26..00000000 --- a/webapp/src/app/api/model/works-filter-properties.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -export interface WorksFilterProperties { - /** - * The start publication year for the works to include in the collaboration network. - */ - start_year?: number; - /** - * The end publication year for the works to include in the collaboration network. - */ - end_year?: number; - /** - * The list of raw topic IDs to include in the collaboration network. If empty, all topics will be included. - */ - allowed_topics?: Array; - /** - * The minimum number of contributors required for a work to be included in the collaboration network. - */ - min_contributors?: number; - /** - * The maximum number of contributors allowed for a work to be included in the collaboration network. - */ - max_contributors?: number; -} diff --git a/webapp/src/app/api/model/works-list-response.ts b/webapp/src/app/api/model/works-list-response.ts deleted file mode 100644 index 6c711607..00000000 --- a/webapp/src/app/api/model/works-list-response.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -import { Meta } from './meta'; -import { Work } from './work'; -import { GroupByResult } from './group-by-result'; - -/** - * WorksListResponse - */ -export interface WorksListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; -} diff --git a/webapp/src/app/api/model/worksFilterProperties.ts b/webapp/src/app/api/model/worksFilterProperties.ts index fd25fd26..bd6cc9a4 100644 --- a/webapp/src/app/api/model/worksFilterProperties.ts +++ b/webapp/src/app/api/model/worksFilterProperties.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 WorksFilterProperties { - /** - * The start publication year for the works to include in the collaboration network. - */ - start_year?: number; - /** - * The end publication year for the works to include in the collaboration network. - */ - end_year?: number; - /** - * The list of raw topic IDs to include in the collaboration network. If empty, all topics will be included. - */ - allowed_topics?: Array; - /** - * The minimum number of contributors required for a work to be included in the collaboration network. - */ - min_contributors?: number; - /** - * The maximum number of contributors allowed for a work to be included in the collaboration network. - */ - max_contributors?: number; + +export interface WorksFilterProperties { + /** + * The start publication year for the works to include in the collaboration network. + */ + start_year?: number; + /** + * The end publication year for the works to include in the collaboration network. + */ + end_year?: number; + /** + * The list of raw topic IDs to include in the collaboration network. If empty, all topics will be included. + */ + allowed_topics?: Array; + /** + * The minimum number of contributors required for a work to be included in the collaboration network. + */ + min_contributors?: number; + /** + * The maximum number of contributors allowed for a work to be included in the collaboration network. + */ + max_contributors?: number; } + diff --git a/webapp/src/app/api/model/worksListResponse.ts b/webapp/src/app/api/model/worksListResponse.ts index bc21a41b..a65d3849 100644 --- a/webapp/src/app/api/model/worksListResponse.ts +++ b/webapp/src/app/api/model/worksListResponse.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,11 +11,13 @@ import { Meta } from './meta'; import { Work } from './work'; import { GroupByResult } from './groupByResult'; + /** * WorksListResponse */ -export interface WorksListResponse { - meta?: Meta | null; - results?: Array | null; - group_by?: Array | null; +export interface WorksListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; } + diff --git a/webapp/src/app/api/param.ts b/webapp/src/app/api/param.ts index 486c804e..78a2d20a 100644 --- a/webapp/src/app/api/param.ts +++ b/webapp/src/app/api/param.ts @@ -8,7 +8,8 @@ export type StandardParamStyle = | 'simple' | 'spaceDelimited' | 'pipeDelimited' - | 'deepObject'; + | 'deepObject' + ; /** * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user. @@ -24,12 +25,13 @@ export type ParamLocation = 'query' | 'header' | 'path' | 'cookie'; * Standard types as defined in OpenAPI Specification: Data Types */ export type StandardDataType = - | 'integer' - | 'number' - | 'boolean' - | 'string' - | 'object' - | 'array'; + | "integer" + | "number" + | "boolean" + | "string" + | "object" + | "array" + ; /** * Standard {@link DataType}s plus your own types/classes. @@ -40,15 +42,16 @@ export type DataType = StandardDataType | string; * Standard formats as defined in OpenAPI Specification: Data Types */ export type StandardDataFormat = - | 'int32' - | 'int64' - | 'float' - | 'double' - | 'byte' - | 'binary' - | 'date' - | 'date-time' - | 'password'; + | "int32" + | "int64" + | "float" + | "double" + | "byte" + | "binary" + | "date" + | "date-time" + | "password" + ; export type DataFormat = StandardDataFormat | string; @@ -59,7 +62,7 @@ export interface Param { name: string; value: unknown; in: ParamLocation; - style: ParamStyle; + style: ParamStyle, explode: boolean; dataType: DataType; dataFormat: DataFormat | undefined; diff --git a/webapp/src/app/api/provide-api.ts b/webapp/src/app/api/provide-api.ts index 960132f8..19c762ac 100644 --- a/webapp/src/app/api/provide-api.ts +++ b/webapp/src/app/api/provide-api.ts @@ -1,17 +1,15 @@ -import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'; +import { EnvironmentProviders, makeEnvironmentProviders } from "@angular/core"; import { Configuration, ConfigurationParameters } from './configuration'; import { BASE_PATH } from './variables'; // Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig). -export function provideApi( - configOrBasePath: string | ConfigurationParameters, -): EnvironmentProviders { - return makeEnvironmentProviders([ - typeof configOrBasePath === 'string' - ? { provide: BASE_PATH, useValue: configOrBasePath } - : { - provide: Configuration, - useValue: new Configuration({ ...configOrBasePath }), - }, - ]); -} +export function provideApi(configOrBasePath: string | ConfigurationParameters): EnvironmentProviders { + return makeEnvironmentProviders([ + typeof configOrBasePath === "string" + ? { provide: BASE_PATH, useValue: configOrBasePath } + : { + provide: Configuration, + useValue: new Configuration({ ...configOrBasePath }), + }, + ]); +} \ No newline at end of file diff --git a/webapp/src/app/api/variables.ts b/webapp/src/app/api/variables.ts index 2277a9cc..6fe58549 100644 --- a/webapp/src/app/api/variables.ts +++ b/webapp/src/app/api/variables.ts @@ -2,8 +2,8 @@ import { InjectionToken } from '@angular/core'; export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { - csv: ',', - tsv: ' ', - ssv: ' ', - pipes: '|', -}; + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 23a85220..558480d3 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -2,6 +2,9 @@ import { Routes } from '@angular/router'; import { userGuard } from './shared/guards/user.guard'; import { collaborationNetworkResolver } from './resolvers/collaboration-network.resolver'; import { personListResolver } from './resolvers/person-list.resolver'; +import { institutionResolver } from './resolvers/institution.resolver'; +import { bundProjectsResolver } from './resolvers/bund-projects.resolver'; +import { euProjectsResolver } from './resolvers/eu-projects.resolver'; export const routes: Routes = [ { @@ -93,7 +96,7 @@ export const routes: Routes = [ resolve: { collaborationNetwork: collaborationNetworkResolver, }, - runGuardsAndResolvers: (to, from) => { + runGuardsAndResolvers: (from, to) => { // No need to re-run for different table view or search term const keys = [ 'filter_by', @@ -108,7 +111,7 @@ export const routes: Routes = [ ]; return keys.some( - (key) => to.queryParamMap.get(key) !== from.queryParamMap.get(key), + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), ); }, }, @@ -129,12 +132,24 @@ export const routes: Routes = [ ], }, { - path: 'institution/:id', + path: 'institution/:institutionId', canActivate: [userGuard], loadComponent: () => import('./modules/institution/institution.component').then( (mod) => mod.InstitutionComponent, ), + resolve: { + institution: institutionResolver, + bundProjectPage: bundProjectsResolver, + euProjectPage: euProjectsResolver, + }, + runGuardsAndResolvers: (from, to) => { + const keys = ['page', 'size', 'sort_by', 'sort_direction']; + + return keys.some( + (key) => from.queryParamMap.get(key) !== to.queryParamMap.get(key), + ); + }, }, { path: '**', diff --git a/webapp/src/app/directives/debounce.directive.ts b/webapp/src/app/directives/debounce.directive.ts new file mode 100644 index 00000000..15b56c1a --- /dev/null +++ b/webapp/src/app/directives/debounce.directive.ts @@ -0,0 +1,30 @@ +import { Directive, input, model, numberAttribute } from '@angular/core'; + +@Directive({ + selector: 'input[debounceTime]', + host: { + '[value]': 'debouncedValue()', + '(input)': 'handleInput($event)', + }, +}) +export class DebounceDirective { + #debounceTimer?: ReturnType; + + readonly debounceTime = input(0, { transform: numberAttribute }); + readonly debouncedValue = model(''); + + handleInput(event: Event): void { + const value = (event.target as HTMLInputElement).value; + + clearTimeout(this.#debounceTimer); + + if (!value || !this.debounceTime()) { + this.debouncedValue.set(value); + return; + } + + this.#debounceTimer = setTimeout(() => { + this.debouncedValue.set(value); + }, this.debounceTime()); + } +} diff --git a/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.html b/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.html new file mode 100644 index 00000000..c2f8fcfc --- /dev/null +++ b/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
Thema + {{ element.topic }} + Förderbeginn + {{ element.funding_start | date: 'dd.MM.yyyy' }} + Förderende + {{ element.funding_end | date: 'dd.MM.yyyy' }} + Förderbeträge + {{ element.grant_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }} + Förderer + {{ element.department }} +
+@if (dataSource.filteredData.length === 0) { +

Keine Projekte gefunden.

+} diff --git a/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.scss b/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.scss new file mode 100644 index 00000000..c6f1fc09 --- /dev/null +++ b/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.scss @@ -0,0 +1,3 @@ +.mat-column-grant_amount { + text-align: right; +} \ No newline at end of file diff --git a/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.ts b/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.ts new file mode 100644 index 00000000..f7724dd6 --- /dev/null +++ b/webapp/src/app/modules/institution-projects-bund/institution-projects-bund.component.ts @@ -0,0 +1,109 @@ +import { + AfterViewInit, + Component, + computed, + effect, + input, + ViewChild, +} from '@angular/core'; +import { BundProject, BundProjectPage } from '../../api'; +import { MatTableDataSource, MatTableModule } from '@angular/material/table'; +import { MatSort, MatSortModule, Sort } from '@angular/material/sort'; +import { CurrencyPipe, DatePipe } from '@angular/common'; +import { ActivatedRoute, Router } from '@angular/router'; +import { toSignal } from '@angular/core/rxjs-interop'; + +type BundProjectRow = { + topic: string; + funding_start: Date; + funding_end: Date; + grant_amount: number; + department: string; +}; + +@Component({ + selector: 'app-institution-projects-bund', + imports: [MatTableModule, MatSortModule, CurrencyPipe, DatePipe], + templateUrl: './institution-projects-bund.component.html', + styleUrl: './institution-projects-bund.component.scss', +}) +export class InstitutionProjectsBundComponent implements AfterViewInit { + bundProjectPage = input.required(); + + displayedColumns: string[] = [ + 'topic', + 'funding_start', + 'funding_end', + 'grant_amount', + 'department', + ]; + + dataSource = new MatTableDataSource(); + + trackBy = (index: number, item: BundProjectRow) => index; + + @ViewChild(MatSort) sort!: MatSort; + + readonly queryParams = toSignal(this.activatedRoute.queryParamMap, { + initialValue: null, + }); + + readonly sortBy = computed(() => { + return this.queryParams()?.get('sort_bys') ?? 'topic'; + }); + + readonly sortDirection = computed(() => { + return this.queryParams()?.get('sort_direction') ?? 'asc'; + }); + + constructor( + private readonly activatedRoute: ActivatedRoute, + private readonly router: Router, + ) { + effect(() => { + const bundProjectPage = this.bundProjectPage(); + if (!bundProjectPage) { + return; + } + this.dataSource.data = + bundProjectPage.elements?.map(this.transformToRow.bind(this)) || []; + }); + effect(() => { + const sortBy = this.sortBy(); + const sortDirection = this.sortDirection(); + this.router.navigate([], { + queryParams: { page: 1, size: 10 }, + queryParamsHandling: 'merge', + }); + }); + } + + transformToRow(project: BundProject): BundProjectRow { + return { + topic: project.topic || '', + funding_start: project.funding_start + ? new Date(project.funding_start) + : new Date(0), + funding_end: project.funding_end + ? new Date(project.funding_end) + : new Date(0), + grant_amount: project.grant_amount || 0, + department: project.department_fullname || '', + }; + } + + ngAfterViewInit() { + this.dataSource.sort = this.sort; + } + + parseGermanNumber(value: string): number { + return Number(value.replaceAll('.', '').replace(',', '.')); + } + + handleSortChange(event: Sort): void { + this.router.navigate([], { + queryParams: { sort_by: event.active, sort_direction: event.direction }, + queryParamsHandling: 'merge', + }); + } +} diff --git a/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.html b/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.html new file mode 100644 index 00000000..c567c125 --- /dev/null +++ b/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.html @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + +
Thema + {{ element.topic }} + Förderbeginn + {{ element.funding_start | date: 'dd.MM.yyyy' }} + Förderende + {{ element.funding_end | date: 'dd.MM.yyyy' }} + Förderbeträge + {{ element.grant_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }} +
+@if (dataSource.filteredData.length === 0) { +

Keine Projekte gefunden.

+} diff --git a/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.scss b/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.ts b/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.ts new file mode 100644 index 00000000..dcef606d --- /dev/null +++ b/webapp/src/app/modules/institution-projects-eu/institution-projects-eu.component.ts @@ -0,0 +1,104 @@ +import { CurrencyPipe, DatePipe } from '@angular/common'; +import { + AfterViewInit, + Component, + computed, + effect, + input, + ViewChild, +} from '@angular/core'; +import { MatSort, MatSortModule, Sort } from '@angular/material/sort'; +import { MatTableDataSource, MatTableModule } from '@angular/material/table'; +import { ActivatedRoute, Router } from '@angular/router'; +import { EuProject, EuProjectPage } from '../../api'; +import { toSignal } from '@angular/core/rxjs-interop'; + +type EuProjectRow = { + topic: string; + funding_start: Date; + funding_end: Date; + grant_amount: number; +}; + +@Component({ + selector: 'app-institution-projects-eu', + imports: [MatTableModule, MatSortModule, CurrencyPipe, DatePipe], + templateUrl: './institution-projects-eu.component.html', + styleUrl: './institution-projects-eu.component.scss', +}) +export class InstitutionProjectsEuComponent implements AfterViewInit { + euProjectPage = input.required(); + + displayedColumns: string[] = [ + 'topic', + 'funding_start', + 'funding_end', + 'grant_amount', + ]; + + dataSource = new MatTableDataSource(); + + trackBy = (index: number, item: EuProjectRow) => index; + + @ViewChild(MatSort) sort!: MatSort; + + readonly queryParams = toSignal(this.activatedRoute.queryParamMap, { + initialValue: null, + }); + + readonly sortBy = computed(() => { + return this.queryParams()?.get('sort_bys') ?? 'topic'; + }); + + readonly sortDirection = computed(() => { + return this.queryParams()?.get('sort_direction') ?? 'asc'; + }); + + constructor( + private readonly activatedRoute: ActivatedRoute, + private readonly router: Router, + ) { + effect(() => { + const euProjectPage = this.euProjectPage(); + if (!euProjectPage) { + return; + } + this.dataSource.data = + euProjectPage.elements?.map(this.transformToRow.bind(this)) || []; + }); + effect(() => { + const sortBy = this.sortBy(); + const sortDirection = this.sortDirection(); + this.router.navigate([], { + queryParams: { page: 1, size: 10 }, + queryParamsHandling: 'merge', + }); + }); + } + + transformToRow(project: EuProject): EuProjectRow { + return { + topic: project.title || '', + funding_start: project.start_date + ? new Date(project.start_date) + : new Date(0), + funding_end: project.end_date ? new Date(project.end_date) : new Date(0), + grant_amount: Number(project.total_cost) || 0, + }; + } + + ngAfterViewInit() { + this.dataSource.sort = this.sort; + } + + parseGermanNumber(value: string): number { + return Number(value.replaceAll('.', '').replace(',', '.')); + } + + handleSortChange(event: Sort): void { + this.router.navigate([], { + queryParams: { sort_by: event.active, sort_direction: event.direction }, + queryParamsHandling: 'merge', + }); + } +} diff --git a/webapp/src/app/modules/institution/institution.component.html b/webapp/src/app/modules/institution/institution.component.html index 06cbe4a2..00384cbc 100644 --- a/webapp/src/app/modules/institution/institution.component.html +++ b/webapp/src/app/modules/institution/institution.component.html @@ -1 +1,35 @@ -

institution works!

+
+

{{ institution.display_name }}

+ + Projekte + + + Suche nach Themen oder Förderern + + + + + + + + + + @if (!institution.country_code || institution.country_code === 'DE') { + + } + + + + +
diff --git a/webapp/src/app/modules/institution/institution.component.scss b/webapp/src/app/modules/institution/institution.component.scss index e69de29b..ae66a6b3 100644 --- a/webapp/src/app/modules/institution/institution.component.scss +++ b/webapp/src/app/modules/institution/institution.component.scss @@ -0,0 +1,3 @@ +.content { + padding: 16px; +} \ No newline at end of file diff --git a/webapp/src/app/modules/institution/institution.component.ts b/webapp/src/app/modules/institution/institution.component.ts index 2e11507e..7c732aa4 100644 --- a/webapp/src/app/modules/institution/institution.component.ts +++ b/webapp/src/app/modules/institution/institution.component.ts @@ -1,9 +1,120 @@ -import { Component } from '@angular/core'; +import { Component, computed, effect, OnInit, signal } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { BundProjectPage, EuProjectPage, Institution } from '../../api'; +import { MatCardModule } from '@angular/material/card'; +import { MatTabChangeEvent, MatTabsModule } from '@angular/material/tabs'; +import { InstitutionProjectsBundComponent } from '../institution-projects-bund/institution-projects-bund.component'; +import { toSignal } from '@angular/core/rxjs-interop'; +import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatIconModule } from '@angular/material/icon'; +import { DebounceDirective } from '../../directives/debounce.directive'; +import { InstitutionProjectsEuComponent } from '../institution-projects-eu/institution-projects-eu.component'; @Component({ selector: 'app-institution', - imports: [], + imports: [ + MatCardModule, + MatTabsModule, + InstitutionProjectsBundComponent, + MatPaginatorModule, + MatFormFieldModule, + MatInputModule, + MatIconModule, + DebounceDirective, + InstitutionProjectsEuComponent, + ], templateUrl: './institution.component.html', styleUrl: './institution.component.scss', }) -export class InstitutionComponent {} +export class InstitutionComponent implements OnInit { + institution!: Institution; + bundProjectPage!: BundProjectPage; + euProjectPage!: EuProjectPage; + + constructor( + private readonly activatedRoute: ActivatedRoute, + private readonly router: Router, + ) {} + + readonly queryParams = toSignal(this.activatedRoute.queryParamMap, { + initialValue: null, + }); + + searchDebounceTime: number = 300; + searchTerm = signal(''); + + readonly displayedProjects = computed(() => { + return this.queryParams()?.get('project_tab') ?? 'eu'; + }); + + readonly page = computed(() => { + const pageParam = this.queryParams()?.get('page'); + const page = pageParam ? Number.parseInt(pageParam, 10) : 0; + return Number.isNaN(page) ? 0 : page; + }); + + readonly selectedPage = computed(() => { + if (this.displayedProjects() === 'eu') { + return this.euProjectPage; + } else { + return this.bundProjectPage; + } + }); + + readonly pageTotal = computed(() => { + return this.selectedPage()?.total ?? 0; + }); + + readonly pageSize = computed(() => { + return this.selectedPage()?.size ?? 10; + }); + + readonly pageIndex = computed(() => { + return this.selectedPage()?.page ?? 0; + }); + + ngOnInit(): void { + this.activatedRoute.data.subscribe( + ({ institution, bundProjectPage, euProjectPage }) => { + console.log('Resolved institution:', institution); + this.institution = institution; + this.bundProjectPage = bundProjectPage; + this.euProjectPage = euProjectPage; + }, + ); + } + + readonly tabIndex = computed(() => { + switch (this.displayedProjects()) { + case 'eu': + return 0; + case 'bund': + return 1; + case 'dfg': + return 2; + default: + return 0; + } + }); + + selectedTabChange(event: MatTabChangeEvent): void { + const tab = ['eu', 'bund', 'dfg'][event.index]; + this.router.navigate([], { + queryParams: { project_tab: tab }, + queryParamsHandling: 'merge', + }); + } + + handlePageChange(event: PageEvent): void { + this.router.navigate([], { + queryParams: { page: event.pageIndex, size: event.pageSize }, + queryParamsHandling: 'merge', + }); + } + + handleSearchTermChange(event: any): void { + this.searchTerm.set(event.target.value); + } +} diff --git a/webapp/src/app/resolvers/bund-projects.resolver.ts b/webapp/src/app/resolvers/bund-projects.resolver.ts new file mode 100644 index 00000000..a7e6e54c --- /dev/null +++ b/webapp/src/app/resolvers/bund-projects.resolver.ts @@ -0,0 +1,27 @@ +import { ResolveFn } from '@angular/router'; +import { BundProjectPage, ProjectsService } from '../api'; +import { inject } from '@angular/core'; + +export const bundProjectsResolver: ResolveFn = ( + route, + state, +) => { + console.log('bundProjectsResolver called with route:', route); + const page = route.queryParamMap.get('page') ?? '1'; + const size = route.queryParamMap.get('size') ?? '10'; + const institutionId = route.paramMap.get('institutionId'); + if (!institutionId) { + throw new Error('Institution ID is required to load projects'); + } + + const sortBy = route.queryParamMap.get('sort_by') ?? 'topic'; + const sortDirection = route.queryParamMap.get('sort_direction') ?? 'asc'; + + return inject(ProjectsService).getBundProjects( + institutionId, + Number(page), + Number(size), + sortBy, + sortDirection, + ); +}; diff --git a/webapp/src/app/resolvers/eu-projects.resolver.ts b/webapp/src/app/resolvers/eu-projects.resolver.ts new file mode 100644 index 00000000..de175f78 --- /dev/null +++ b/webapp/src/app/resolvers/eu-projects.resolver.ts @@ -0,0 +1,23 @@ +import { ResolveFn } from '@angular/router'; +import { EuProjectPage, ProjectsService } from '../api'; +import { inject } from '@angular/core'; + +export const euProjectsResolver: ResolveFn = (route, state) => { + const page = route.queryParamMap.get('page') ?? '1'; + const size = route.queryParamMap.get('size') ?? '10'; + const institutionId = route.paramMap.get('institutionId'); + if (!institutionId) { + throw new Error('Institution ID is required to load projects'); + } + + const sortBy = route.queryParamMap.get('sort_by') ?? 'topic'; + const sortDirection = route.queryParamMap.get('sort_direction') ?? 'asc'; + + return inject(ProjectsService).getEuProjects( + institutionId, + Number(page), + Number(size), + sortBy, + sortDirection, + ); +}; diff --git a/webapp/src/app/resolvers/institution.resolver.ts b/webapp/src/app/resolvers/institution.resolver.ts new file mode 100644 index 00000000..12fcdc10 --- /dev/null +++ b/webapp/src/app/resolvers/institution.resolver.ts @@ -0,0 +1,17 @@ +import { ResolveFn } from '@angular/router'; +import { Institution, InstitutionsService } from '../api'; +import { inject } from '@angular/core'; + +export const institutionResolver: ResolveFn = ( + route, + state, +) => { + const institutionId = route.paramMap.get('institutionId'); + if (!institutionId) { + throw new Error( + 'Institution ID is required to resolve institution details', + ); + } + + return inject(InstitutionsService).getInstitutionById(institutionId); +}; From 229c4126deaeaa468cd962510737ee5595f52701 Mon Sep 17 00:00:00 2001 From: genja Date: Thu, 11 Jun 2026 11:55:47 +0200 Subject: [PATCH 21/97] removed name_quality_boost from person list ranking --- .../src/main/inse/persons/query_builder.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/service/src/main/inse/persons/query_builder.py b/service/src/main/inse/persons/query_builder.py index a258b99a..0081477f 100644 --- a/service/src/main/inse/persons/query_builder.py +++ b/service/src/main/inse/persons/query_builder.py @@ -418,16 +418,16 @@ def build_authors_search_rescored( functions = [] if not sort_by: - if (name_quality_boost): # Name quality boost, boost names which are not "Value Value" - name_boost_query={ - "script_score": { - "script": { - "lang": "painless", - "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;" - } - } - } - functions.append(name_boost_query) + # if (name_quality_boost): # Name quality boost, boost names which are not "Value Value" + # name_boost_query={ + # "script_score": { + # "script": { + # "lang": "painless", + # "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;" + # } + # } + # } + # functions.append(name_boost_query) if (h_index_boost): # h_index boost h_index_boost_query={ "script_score": { From c2b8f54fb7a748a76731c89a745d22adfcf64d0a Mon Sep 17 00:00:00 2001 From: genja Date: Thu, 11 Jun 2026 18:34:58 +0200 Subject: [PATCH 22/97] added ETag caching --- service/src/main/inse/main.py | 7 +++ .../src/main/inse/middleware/etag_cache.py | 52 ++++++++++++++++ webapp/src/app/app.config.ts | 3 +- .../interceptors/caching.interceptor.ts | 62 +++++++++++++++++++ 4 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 service/src/main/inse/middleware/etag_cache.py create mode 100644 webapp/src/app/shared/interceptors/caching.interceptor.ts diff --git a/service/src/main/inse/main.py b/service/src/main/inse/main.py index a1e4614e..c7be626f 100644 --- a/service/src/main/inse/main.py +++ b/service/src/main/inse/main.py @@ -17,6 +17,8 @@ from inse.works.service import router as works_service_router from inse.persons.service import router as persons_service_router from inse.funders.service import router as funders_service_router +#caching +from inse.middleware.etag_cache import ETagCacheMiddleware from . import config from .service import router as service_router from .account.service import router as account_router @@ -43,12 +45,17 @@ app.include_router(funders_service_router) app.include_router(service_router) app.include_router(account_router) +app.add_middleware( + ETagCacheMiddleware, + ttl=600 # 10 minutes expiration time +) app.add_middleware( CORSMiddleware, allow_origins=settings.allowed_origins, allow_credentials=True, allow_methods=["*"], allow_headers=["*"], + expose_headers=["ETag"] ) diff --git a/service/src/main/inse/middleware/etag_cache.py b/service/src/main/inse/middleware/etag_cache.py new file mode 100644 index 00000000..547aecb4 --- /dev/null +++ b/service/src/main/inse/middleware/etag_cache.py @@ -0,0 +1,52 @@ +# middleware/etag_cache.py +import hashlib, json, time +from starlette.middleware.base import BaseHTTPMiddleware +from starlette.requests import Request +from starlette.responses import Response + +class ETagCacheMiddleware(BaseHTTPMiddleware): + def __init__(self, app, ttl: int = 60): + super().__init__(app) + self.ttl = ttl # timeout in seconds + self.cache: dict[str, dict] = {} # key → {body, etag, expires} + + def _cache_key(self, request: Request) -> str: + # Include query params and relevant headers in the key + return f"{request.url.path}?{request.url.query}" + + async def dispatch(self, request: Request, call_next): + if request.method != "GET": + return await call_next(request) + + key = self._cache_key(request) + entry = self.cache.get(key) + client_etag = request.headers.get("if-none-match") + + # Cache hit + not expired + if entry and time.time() < entry["expires"]: + if client_etag == entry["etag"]: + return Response(status_code=304, headers={"ETag": entry["etag"]}) + + # Client has stale ETag - return fresh cached body + return Response( + content=entry["body"], + media_type="application/json", + headers={"ETag": entry["etag"], "Cache-Control": f"max-age={self.ttl}"} + ) + + # Cache miss or expired → hit the actual route + response = await call_next(request) + body = b"".join([chunk async for chunk in response.body_iterator]) + etag = f'"{hashlib.md5(body).hexdigest()}"' + + self.cache[key] = { + "body": body, + "etag": etag, + "expires": time.time() + self.ttl + } + return Response( + content=body, + status_code=response.status_code, + media_type="application/json", + headers={"ETag": etag, "Cache-Control": f"max-age={self.ttl}"} + ) \ No newline at end of file diff --git a/webapp/src/app/app.config.ts b/webapp/src/app/app.config.ts index 7aaeef9e..596122e4 100644 --- a/webapp/src/app/app.config.ts +++ b/webapp/src/app/app.config.ts @@ -11,6 +11,7 @@ import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field'; import { MatPaginatorIntl } from '@angular/material/paginator'; import { PaginatorIntl } from './shared/utils/paginatorIntl'; import { provideEchartsCore } from 'ngx-echarts'; +import { cachingInterceptor } from './shared/interceptors/caching.interceptor'; registerLocaleData(locale); @@ -23,7 +24,7 @@ export const appConfig: ApplicationConfig = { }, { provide: MatPaginatorIntl, useClass: PaginatorIntl }, provideRouter(routes), - provideHttpClient(withInterceptors([authenticationInterceptor])), + provideHttpClient(withInterceptors([authenticationInterceptor,cachingInterceptor])), // provideApi('/inse-service'), provideAnimationsAsync(), provideEchartsCore({ echarts: () => import('echarts') }), diff --git a/webapp/src/app/shared/interceptors/caching.interceptor.ts b/webapp/src/app/shared/interceptors/caching.interceptor.ts new file mode 100644 index 00000000..4b60ec94 --- /dev/null +++ b/webapp/src/app/shared/interceptors/caching.interceptor.ts @@ -0,0 +1,62 @@ +import { + HttpInterceptorFn, + HttpResponse, + HttpErrorResponse +} from '@angular/common/http'; +import { catchError, of, tap, throwError } from 'rxjs'; +// here we do store our etags and responses from server. +const etagStore = new Map(); +const responseCache = new Map(); + +export const cachingInterceptor: HttpInterceptorFn = (req, next) => { + if (req.method !== 'GET') { + return next(req); + } + // Do we have an ETag for the corresponding request? + + const cacheKey = req.urlWithParams; + const etag = etagStore.get(cacheKey); + // If yes, set header to "If-None-Match" to let the server know we've got already an ETag. + const modifiedReq = etag + ? req.clone({ + setHeaders: { + 'If-None-Match': etag + } + }) + : req; + + // On server response: + return next(modifiedReq).pipe( + tap(event => { + if (event instanceof HttpResponse) { + const responseEtag = event.headers.get('ETag'); + // update the ETag and response body for our request + console.log("FROM NEW BACKEND CALL , UPDATING ETAG",responseEtag) + if (event.status === 200 && responseEtag) { + etagStore.set(cacheKey, responseEtag); + responseCache.set(cacheKey, event.body); + } + } + }), + // handle 304 separately (no data changes) + catchError(err => { + if ( // Server responded with 304 -> ETag hasnt changed -> use cached response body + err instanceof HttpErrorResponse && + err.status === 304 && + responseCache.has(cacheKey) + ) { + console.log("FROM CACHE!",cacheKey) + return of( + new HttpResponse({ + body: responseCache.get(cacheKey), + status: 200, + statusText: 'OK (cached)', + url: req.urlWithParams + }) + ); + } + + return throwError(() => err); + }) + ); +}; \ No newline at end of file From f7c7a9751aca6426e0076b36be18b5edec8ab69e Mon Sep 17 00:00:00 2001 From: genja Date: Thu, 11 Jun 2026 18:37:29 +0200 Subject: [PATCH 23/97] removed debug info from console --- webapp/src/app/shared/services/resolver-state.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/webapp/src/app/shared/services/resolver-state.service.ts b/webapp/src/app/shared/services/resolver-state.service.ts index d992ae74..f6eb2052 100644 --- a/webapp/src/app/shared/services/resolver-state.service.ts +++ b/webapp/src/app/shared/services/resolver-state.service.ts @@ -43,7 +43,6 @@ export class ResolverStateService { isResolvingInside(path: string) { const from = this.previousUrl(); const to = this.resolvingUrl(); - console.log(from, to, to?.startsWith(path) && from?.startsWith(path)); if (to?.startsWith(path) && from?.startsWith(path)) return true; return false; } From 2836cf02a7f48eeaf32fd0138ac7b73c9a97af88 Mon Sep 17 00:00:00 2001 From: genja Date: Thu, 11 Jun 2026 19:11:47 +0200 Subject: [PATCH 24/97] removed mead_citedness from person scroing strategy --- service/src/main/inse/persons/query_builder.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/service/src/main/inse/persons/query_builder.py b/service/src/main/inse/persons/query_builder.py index 0081477f..7431558d 100644 --- a/service/src/main/inse/persons/query_builder.py +++ b/service/src/main/inse/persons/query_builder.py @@ -449,17 +449,6 @@ def build_authors_search_rescored( } functions.append(cited_by_count_boost_query) - if (_2yr_mean_citedness_boost): # 2yr mean citedness boost - mean_citedness_boost_query = { - "script_score": { - "script": { - "lang": "painless", - "source": "if (!doc.containsKey('summary_stats.2yr_mean_citedness') || doc['summary_stats.2yr_mean_citedness'].empty) return 1.0;double recent = doc['summary_stats.2yr_mean_citedness'].value;return 1.0 + Math.log1p(recent) / 8.0;" - } - } - } - functions.append(mean_citedness_boost_query) - if (works_boost): # works_count boost works_count_boost_query = { "script_score": { From f288fb7306540b0d1c6180022b1ec10b71735c36 Mon Sep 17 00:00:00 2001 From: genja Date: Thu, 11 Jun 2026 19:21:23 +0200 Subject: [PATCH 25/97] added sorting by h_index --- webapp/src/app/modules/person-list/person-list.component.html | 1 + webapp/src/app/modules/person-list/person-list.component.ts | 3 --- webapp/src/app/resolvers/person-list.resolver.ts | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/webapp/src/app/modules/person-list/person-list.component.html b/webapp/src/app/modules/person-list/person-list.component.html index f2348b2b..766f6ed8 100644 --- a/webapp/src/app/modules/person-list/person-list.component.html +++ b/webapp/src/app/modules/person-list/person-list.component.html @@ -60,6 +60,7 @@ + + + } @else { + Themen + } + - @if (!loadingWordCloud) { -
-
-

Forschungsthemen

- @if (wordCloudOptions && sliderMax > 5) { -
- {{ topN }} Themen -
-
- -
-
- } -
- @if (wordCloudOptions) { +
+ @if (loadingWordCloud) { +
Forschungsthemen werden geladen ...
+ } @else if (wordCloudOptions) {
Keine Forschungsthemen gefunden.

}
- } + diff --git a/webapp/src/app/modules/person-overview/person-overview.component.scss b/webapp/src/app/modules/person-overview/person-overview.component.scss index 4e70b0e9..7b40485a 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.scss +++ b/webapp/src/app/modules/person-overview/person-overview.component.scss @@ -5,37 +5,12 @@ box-sizing: border-box; } -.word-cloud-card { - margin-top: 1.5rem; - padding: 24px 28px; - border: 1px solid #d7e4ff; - border-radius: 16px; - background: #ffffff; - box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); - box-sizing: border-box; -} - -.word-cloud-header { - display: flex; - align-items: center; - justify-content: space-between; - gap: 1.5rem; - margin-bottom: 0.75rem; -} - -.word-cloud-title { - margin: 0; - font-family: 'Montserrat', 'Open Sans', Arial, sans-serif; - font-size: 20px; - font-weight: 700; - color: var(--sg-text); -} - .word-cloud-slider-wrapper { display: flex; align-items: center; + justify-content: center; gap: 0.75rem; - flex-shrink: 0; + min-height: 86px; } .slider-label { @@ -115,15 +90,24 @@ } } +.word-cloud-view { + min-height: 420px; +} + .word-cloud-chart { width: 100%; - height: 400px; + height: 420px; cursor: pointer; } +.word-cloud-state, .word-cloud-empty { - margin: 2rem 0 0.5rem; - text-align: center; + margin: 0; + min-height: 420px; + display: flex; + align-items: center; + justify-content: center; color: var(--sg-text-muted); font-size: 14px; + text-align: center; } diff --git a/webapp/src/app/modules/person-overview/person-overview.component.ts b/webapp/src/app/modules/person-overview/person-overview.component.ts index d6963b71..5291c82a 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.ts +++ b/webapp/src/app/modules/person-overview/person-overview.component.ts @@ -489,7 +489,11 @@ export class PersonOverviewComponent implements OnInit { } private parseTimelineViewMode(value: string | null): TimelineViewMode { - return value === 'compact' ? 'compact' : 'years'; + if (value === 'compact' || value === 'wordcloud') { + return value; + } + + return 'years'; } private parseOptionalYear(value: string | null): number | undefined { From 15392b57575cc1bc2ea4bfc702ef18f2db8a98a7 Mon Sep 17 00:00:00 2001 From: Kazgatari <56477241+Kazgatari@users.noreply.github.com> Date: Fri, 12 Jun 2026 12:50:10 +0200 Subject: [PATCH 30/97] Exclude vectors from response --- service/sentence_transformer/index_topics.py | 12 ++++++------ service/src/main/inse/topics/logic.py | 13 +++++-------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/service/sentence_transformer/index_topics.py b/service/sentence_transformer/index_topics.py index 5494b8f9..bb7b7380 100644 --- a/service/sentence_transformer/index_topics.py +++ b/service/sentence_transformer/index_topics.py @@ -22,7 +22,7 @@ load_dotenv(dotenv_path=env_path) sys.path.append(str(project_root / "service" / "src" / "main")) from inse.config import settings -ELASTIC_URL = settings.elasticsearch_url.rstrip("/") if settings.elasticsearch_url else "https://project.nes.uni-due.de/elastic" +ELASTIC_URL = settings.elasticsearch_url API_KEY = settings.elasticsearch_api_key MODEL_NAME = "paraphrase-multilingual-mpnet-base-v2" @@ -58,14 +58,14 @@ def check_and_update_mapping(): with httpx.Client(timeout=30.0) as client: # Check if index exists - exists_resp = client.head(f"{ELASTIC_URL}/topicvectors", headers=headers) + exists_resp = client.head(f"{ELASTIC_URL}topicvectors", headers=headers) if exists_resp.status_code == 404: print("Index 'topicvectors' does not exist. Creating index with mapping...") create_payload = { "mappings": mapping_payload } resp = client.put( - f"{ELASTIC_URL}/topicvectors", + f"{ELASTIC_URL}topicvectors", json=create_payload, headers=headers ) @@ -77,7 +77,7 @@ def check_and_update_mapping(): else: print("Index 'topicvectors' exists. Updating mapping...") resp = client.put( - f"{ELASTIC_URL}/topicvectors/_mapping", + f"{ELASTIC_URL}topicvectors/_mapping", json=mapping_payload, headers=headers ) @@ -101,7 +101,7 @@ def fetch_all_topics(): "size": size } resp = client.post( - f"{ELASTIC_URL}/openalex-topics/_search", + f"{ELASTIC_URL}openalex-topics/_search", json=payload, headers=headers ) @@ -148,7 +148,7 @@ def bulk_index_topics(topics, vectors): payload = "\n".join(bulk_lines) + "\n" resp = client.post( - f"{ELASTIC_URL}/_bulk", + f"{ELASTIC_URL}_bulk", content=payload, headers={"Authorization": f"ApiKey {API_KEY}", "Content-Type": "application/x-ndjson"} ) diff --git a/service/src/main/inse/topics/logic.py b/service/src/main/inse/topics/logic.py index ab409a0e..681f480f 100644 --- a/service/src/main/inse/topics/logic.py +++ b/service/src/main/inse/topics/logic.py @@ -286,7 +286,7 @@ async def vector_search_topics( detail=f"Failed to encode query text: {exc}" ) - # 2. Query Elasticsearch + # 2. Query Elasticsearch using vector similarity search body = { "knn": { @@ -294,6 +294,9 @@ async def vector_search_topics( "query_vector": query_vector, "k": limit, "num_candidates": 100 + }, + "_source": { + "excludes": ["vector"] #remove vectors } } @@ -314,13 +317,7 @@ async def vector_search_topics( hits = raw_results.get("hits", {}).get("hits", []) total = len(hits) - results = [] - for hit in hits: - source = hit.get("_source", {}) - # Remove vector field (dont send to frontend) - if "vector" in source: - del source["vector"] - results.append(source) + results = [hit.get("_source", {}) for hit in hits] data = { "meta": { From 0c52b6f32495ea6816de51ae9ebc47b3c5e79615 Mon Sep 17 00:00:00 2001 From: louis-19041904 Date: Fri, 12 Jun 2026 12:50:22 +0200 Subject: [PATCH 31/97] Timeline: add publication count tooltips --- .../research-timeline.component.html | 3 ++ .../research-timeline.component.ts | 34 ++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html index cfdb87cd..5376284b 100644 --- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html +++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html @@ -235,6 +235,7 @@
+ + + + open_in_new + + + + + {{ element.works.length }} + + + +
+ +
+
+ + + + open_in_new + + + + + {{ element.collaborators.length }} + + + +
+ +
+
+ + + + open_in_new + + + + + {{ element.collaborators.length }} + + + +
+ +
diff --git a/webapp/src/app/modules/person-network/person-network.component.scss b/webapp/src/app/modules/person-network/person-network.component.scss index 36506868..74a4778c 100644 --- a/webapp/src/app/modules/person-network/person-network.component.scss +++ b/webapp/src/app/modules/person-network/person-network.component.scss @@ -59,3 +59,13 @@ form > div > mat-button-toggle-group { mat-card { background-color: var(--sg-background); } + +.person-link, +.work-link { + color: var(--sg-primary); + text-decoration: none; +} +.person-link:hover, +.work-link:hover { + text-decoration: underline; +} diff --git a/webapp/src/app/modules/person-network/person-network.component.ts b/webapp/src/app/modules/person-network/person-network.component.ts index 647f2939..e824fdee 100644 --- a/webapp/src/app/modules/person-network/person-network.component.ts +++ b/webapp/src/app/modules/person-network/person-network.component.ts @@ -1,17 +1,23 @@ import { toSignal } from '@angular/core/rxjs-interop'; -import { Component, computed, OnInit, signal } from '@angular/core'; +import { + Component, + computed, + effect, + input, + OnInit, + signal, + TemplateRef, + viewChild, +} from '@angular/core'; import { ActivatedRoute, Router, RouterModule } from '@angular/router'; import { MatCardModule } from '@angular/material/card'; import { MatButtonToggleModule } from '@angular/material/button-toggle'; -import { MatRippleModule } from '@angular/material/core'; import { provideEchartsCore } from 'ngx-echarts'; import * as echarts from 'echarts/core'; -import { MatTableModule } from '@angular/material/table'; import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; -import { ScrollingModule } from '@angular/cdk/scrolling'; import { MatFormFieldModule } from '@angular/material/form-field'; import { FormControl, @@ -20,11 +26,7 @@ import { ReactiveFormsModule, } from '@angular/forms'; import { MatInputModule } from '@angular/material/input'; -import { MatSliderModule } from '@angular/material/slider'; -import { MatSortModule } from '@angular/material/sort'; import { CollaborationNetwork } from '../../api'; -import { PersonNetworkCollaboratorsComponent } from '../person-network-collaborators/person-network-collaborators.component'; -import { PersonNetworkPublicationsComponent } from '../person-network-publications/person-network-publications.component'; import { debounceTime } from 'rxjs'; import { NodeCategory, @@ -36,26 +38,57 @@ import { MatExpansionModule } from '@angular/material/expansion'; import { MatDialog, MatDialogModule } from '@angular/material/dialog'; import { PersonNetworkFilterDialogComponent } from '../person-network-filter-dialog/person-network-filter-dialog.component'; import { PersonNetworkInfoCardComponent } from '../person-network-info-card/person-network-info-card.component'; -import { PersonNetworkInstitutionsComponent } from '../person-network-institutions/person-network-institutions.component'; +import { + GenericColumn, + DataTableComponent, +} from '../../shared/ui/data-table/data-table.component'; + +type CWork = { + id: string; + title: string; +}; + +type CCollaborator = { + id: string; + name: string; + category: string; + works: CWork[]; +}; + +type PCollaborator = { + id: string; + name: string; + category: string; +}; + +type PWork = { + id: string; + title: string; + collaborators: PCollaborator[]; +}; + +type ICollaborator = { + id: string; + name: string; +}; + +type IInstitution = { + id: string; + name: string; + collaborators: ICollaborator[]; +}; @Component({ selector: 'app-person-network', imports: [ MatCardModule, - MatTableModule, MatButtonModule, MatIconModule, - ScrollingModule, MatButtonToggleModule, MatFormFieldModule, FormsModule, MatInputModule, - MatSortModule, - MatRippleModule, RouterModule, - PersonNetworkCollaboratorsComponent, - PersonNetworkPublicationsComponent, - MatSliderModule, ReactiveFormsModule, FormsModule, PersonNetworkGraphComponent, @@ -63,14 +96,50 @@ import { PersonNetworkInstitutionsComponent } from '../person-network-institutio MatExpansionModule, MatDialogModule, PersonNetworkInfoCardComponent, - PersonNetworkInstitutionsComponent, + DataTableComponent, ], templateUrl: './person-network.component.html', styleUrl: './person-network.component.scss', providers: [provideEchartsCore({ echarts })], }) export class PersonNetworkComponent implements OnInit { - collaborationNetwork!: CollaborationNetwork; + collaborationNetwork = input.required(); + + collaboratorsColumns: GenericColumn[] = []; + collaboratorsData: CCollaborator[] = []; + collaboratorsActionTmp = viewChild.required>( + 'collaboratorsActionTmp', + ); + collaboratorsFrequencyTmp = viewChild.required>( + 'collaboratorsFrequencyTmp', + ); + collaboratorsDetailRow = viewChild.required>( + 'collaboratorsDetailRow', + ); + + publicationsColumns: GenericColumn[] = []; + publicationsData: PWork[] = []; + publicationsActionTmp = viewChild.required>( + 'publicationsActionTmp', + ); + publicationsCollaborationFrequencyTmp = viewChild.required>( + 'publicationsCollaborationFrequencyTmp', + ); + publicationsDetailRow = viewChild.required>( + 'publicationsDetailRow', + ); + + institutionsColumns: GenericColumn[] = []; + institutionsData: IInstitution[] = []; + institutionsActionTmp = viewChild.required>( + 'institutionsActionTmp', + ); + institutionsFrequencyTmp = viewChild.required>( + 'institutionsFrequencyTmp', + ); + institutionsDetailRow = viewChild.required>( + 'institutionsDetailRow', + ); filterForm = new FormGroup({ searchTerm: new FormControl(''), @@ -181,7 +250,50 @@ export class PersonNetworkComponent implements OnInit { private readonly activatedRoute: ActivatedRoute, private readonly router: Router, private readonly dialog: MatDialog, - ) {} + ) { + effect(() => { + this.collaboratorsData = this.buildCollaboratorsDataSource( + this.collaborationNetwork(), + ); + + this.publicationsData = this.buildWorksDataSource( + this.collaborationNetwork(), + ); + + this.institutionsData = this.buildInstitutionsDataSource( + this.collaborationNetwork(), + ); + + this.calculateSummary(this.collaborationNetwork()); + + const currentParams = this.activatedRoute.snapshot.queryParams; + + this.filterForm.setValue({ + searchTerm: currentParams['search_term'] || '', + filterBy: currentParams['filter_by'] || 'works', + displayedTable: currentParams['table'] || 'collaborators', + + startYear: + Number(currentParams['start_year']) || + this.collaborationNetwork().filter_information.min_possible_year, + endYear: + Number(currentParams['end_year']) || + this.collaborationNetwork().filter_information.max_possible_year, + topics: currentParams['topics'] + ? currentParams['topics'].split(',') + : [], + minContributors: Number(currentParams['min_contributors']) || 2, + maxContributors: Number(currentParams['max_contributors']) || 10, + + minCollaborations: Number(currentParams['min_collaborations']) || 1, + maxCollaborations: Number(currentParams['max_collaborations']) || 100, + + institutions: currentParams['institutions'] + ? currentParams['institutions'].split(',') + : [], + }); + }); + } openFilterDialog() { console.log('Form value when opening dialog:', this.filterForm.value); @@ -233,39 +345,67 @@ export class PersonNetworkComponent implements OnInit { } ngOnInit(): void { - this.activatedRoute.data.subscribe(({ collaborationNetwork }) => { - this.collaborationNetwork = collaborationNetwork; - - this.calculateSummary(collaborationNetwork); - - const currentParams = this.activatedRoute.snapshot.queryParams; - - this.filterForm.setValue({ - searchTerm: currentParams['search_term'] || '', - filterBy: currentParams['filter_by'] || 'works', - displayedTable: currentParams['table'] || 'collaborators', - - startYear: - Number(currentParams['start_year']) || - this.collaborationNetwork.filter_information.min_possible_year, - endYear: - Number(currentParams['end_year']) || - this.collaborationNetwork.filter_information.max_possible_year, - topics: currentParams['topics'] - ? currentParams['topics'].split(',') - : [], - minContributors: Number(currentParams['min_contributors']) || 2, - maxContributors: Number(currentParams['max_contributors']) || 10, - - minCollaborations: Number(currentParams['min_collaborations']) || 1, - maxCollaborations: Number(currentParams['max_collaborations']) || 100, - - institutions: currentParams['institutions'] - ? currentParams['institutions'].split(',') - : [], - }); - }); - + this.collaboratorsColumns = [ + { + id: 'name', + header: 'Name', + type: 'accessor', + accessorKey: 'name', + }, + { + id: 'works', + header: 'Häufigkeit', + type: 'display', + cellTemplate: this.collaboratorsFrequencyTmp(), + }, + { + id: 'actions', + header: '', + type: 'display', + cellTemplate: this.collaboratorsActionTmp(), + }, + ]; + this.publicationsColumns = [ + { + id: 'title', + header: 'Titel', + type: 'accessor', + accessorKey: 'title', + }, + { + id: 'collaborators', + header: 'Mitwirkende', + type: 'display', + cellTemplate: this.publicationsCollaborationFrequencyTmp(), + }, + { + id: 'actions', + header: '', + type: 'display', + cellTemplate: this.publicationsActionTmp(), + }, + ]; + this.institutionsColumns = [ + { + id: 'name', + header: 'Name', + type: 'accessor', + accessorKey: 'name', + }, + { + id: 'collaborators', + header: 'Mitwirkende', + type: 'display', + cellTemplate: this.institutionsFrequencyTmp(), + }, + { + id: 'actions', + header: '', + type: 'display', + cellTemplate: this.institutionsActionTmp(), + }, + ]; + this.filterForm.valueChanges.pipe(debounceTime(300)).subscribe((value) => { console.log('Form value changed:', value); this.router.navigate([], { @@ -294,4 +434,151 @@ export class PersonNetworkComponent implements OnInit { } this.filterForm.get('displayedTable')?.setValue(value); } + + buildCollaboratorsDataSource( + collaborationNetwork: CollaborationNetwork, + ): CCollaborator[] { + // key: collaborator id, value: set of work ids + const worksByCollaborator: Record> = {}; + // key: work id, value: work + const works: Record = {}; + + const allWorks: Record = collaborationNetwork.work_nodes + .map((node) => ({ + id: node.raw_id, + title: node.display_name, + })) + .reduce( + (acc, work) => { + acc[work.id] = work; + return acc; + }, + {} as Record, + ); + + const allAuthors: Record = + collaborationNetwork.author_nodes + .map((node) => ({ + id: node.raw_id, + name: node.display_name, + category: node.category, + works: [], + })) + .reduce( + (acc, author) => { + acc[author.id] = author; + return acc; + }, + {} as Record, + ); + + collaborationNetwork.collaboration_edges.forEach((edge) => { + if ( + edge.raw_source_id.toUpperCase().startsWith('A') && + edge.raw_target_id.toUpperCase().startsWith('W') + ) { + allAuthors[edge.raw_source_id]?.works.push( + allWorks[edge.raw_target_id], + ); + } + }); + + Object.values(allAuthors).forEach((author) => { + author.works.sort((a, b) => a.title.localeCompare(b.title)); + }); + + return Object.values(allAuthors).filter( + (author) => + author.works.length > 0 && + author.id !== collaborationNetwork.raw_person_id, + ); + } + + buildWorksDataSource(collaborationNetwork: CollaborationNetwork): PWork[] { + const allWorks: Record = collaborationNetwork.work_nodes + .map((node) => ({ + id: node.raw_id, + title: node.display_name, + collaborators: [], + })) + .reduce( + (acc, work) => { + acc[work.id] = work; + return acc; + }, + {} as Record, + ); + + const allAuthors: Record = + collaborationNetwork.author_nodes + .map((node) => ({ + id: node.raw_id, + name: node.display_name, + category: + node.raw_id === collaborationNetwork.raw_person_id + ? 'author' + : 'collaborator', + })) + .reduce( + (acc, person) => { + acc[person.id] = person; + return acc; + }, + {} as Record, + ); + + collaborationNetwork.collaboration_edges.forEach((edge) => { + if ( + edge.raw_source_id.toUpperCase().startsWith('A') && + edge.raw_target_id.toUpperCase().startsWith('W') + ) { + allWorks[edge.raw_target_id]?.collaborators.push( + allAuthors[edge.raw_source_id], + ); + } + }); + + Object.values(allWorks).forEach((work) => { + work.collaborators.sort((a, b) => a.name.localeCompare(b.name)); + }); + + return Object.values(allWorks).filter( + (work) => work.collaborators.length > 0, + ); + } + + buildInstitutionsDataSource( + collaborationNetwork: CollaborationNetwork, + ): IInstitution[] { + const institutionsMap: Record = {}; + + for (const node of collaborationNetwork.institution_nodes) { + institutionsMap[node.raw_id] = { + id: node.raw_id, + name: node.display_name, + collaborators: [], + }; + } + + for (const edge of collaborationNetwork.collaboration_edges) { + if (edge.raw_target_id in institutionsMap) { + const institution = institutionsMap[edge.raw_target_id]; + institution.collaborators.push({ + id: edge.raw_source_id, + name: + collaborationNetwork.author_nodes.find( + (node) => node.raw_id === edge.raw_source_id, + )?.display_name || 'Unbekannt', + }); + } + } + + for (const institution of Object.values(institutionsMap)) { + institution.collaborators.sort((a, b) => + a.name.localeCompare(b.name, 'de', { sensitivity: 'base' }), + ); + } + + return Object.values(institutionsMap); + } } diff --git a/webapp/src/app/resolvers/person-list.resolver.ts b/webapp/src/app/resolvers/person-list.resolver.ts index 97001abe..8e4b824c 100644 --- a/webapp/src/app/resolvers/person-list.resolver.ts +++ b/webapp/src/app/resolvers/person-list.resolver.ts @@ -26,8 +26,8 @@ export const personListResolver: ResolveFn = ( : 10; const institutionName = params.get('institutionName') || undefined; - const sortBy= params.get('sortBy') || undefined; - const sortOrder= params.get('sortOrder') || undefined; + const sortBy = params.get('sortBy') || undefined; + const sortOrder = params.get('sortOrder') || undefined; const topicsParam = params.getAll('topic'); diff --git a/webapp/src/app/shared/ui/data-table/data-table.component.html b/webapp/src/app/shared/ui/data-table/data-table.component.html index 2cac8d57..41347477 100644 --- a/webapp/src/app/shared/ui/data-table/data-table.component.html +++ b/webapp/src/app/shared/ui/data-table/data-table.component.html @@ -1,9 +1,10 @@ -
+
+ (matSortChange)="onSortChange($event)" + multiTemplateDataRows> @for (col of columns(); track col.id) { @if (col.type === 'accessor') { @@ -28,10 +29,40 @@ } - - + + + + + + + + +
+ @if (row === expandedElement() && detailTemplate()) { + @if (detailTemplate(); as tpl) { + + } + } +
- @if (this.dataSource.data.length === 0) { + @if (this.dataSource.filteredData.length === 0) {
Keine Daten gefunden.
diff --git a/webapp/src/app/shared/ui/data-table/data-table.component.scss b/webapp/src/app/shared/ui/data-table/data-table.component.scss index 3936b5af..87d6020d 100644 --- a/webapp/src/app/shared/ui/data-table/data-table.component.scss +++ b/webapp/src/app/shared/ui/data-table/data-table.component.scss @@ -1,3 +1,7 @@ +.mat-mdc-table { + background-color: var(--sg-background); +} + .no-data { display: flex; justify-content: center; @@ -5,3 +9,17 @@ height: 200px; color: #888; } + +tr.detail-row { + height: 0 !important; +} + +.detail-row-wrapper { + overflow: hidden; + display: flex; +} + +.element-row:hover { + background: #f5f5f5; + cursor: pointer; +} diff --git a/webapp/src/app/shared/ui/data-table/data-table.component.ts b/webapp/src/app/shared/ui/data-table/data-table.component.ts index e1ddd0cf..4456b966 100644 --- a/webapp/src/app/shared/ui/data-table/data-table.component.ts +++ b/webapp/src/app/shared/ui/data-table/data-table.component.ts @@ -6,6 +6,7 @@ import { effect, input, output, + signal, TemplateRef, viewChild, } from '@angular/core'; @@ -45,6 +46,14 @@ export type GenericColumn = AccessorColumn | DisplayColumn; export class DataTableComponent implements AfterViewInit { data = input.required(); columns = input.required[]>(); + filterTerm = input(''); + + detailTemplate = input | null>(null); + expandedElement = signal(null); + + maxHeight = input(null); + containerOverflow = computed(() => (this.maxHeight() ? 'auto' : 'visible')); + stickyHeader = input(true); activeSortKey = input(''); sortDirection = input(''); @@ -72,6 +81,8 @@ export class DataTableComponent implements AfterViewInit { return value ? String(value).toLowerCase().includes(filter) : false; }); }; + + this.dataSource.filter = this.filterTerm().trim().toLowerCase(); }); effect(() => { @@ -98,4 +109,9 @@ export class DataTableComponent implements AfterViewInit { onSortChange(sort: Sort) { this.sortChange.emit(sort); } + + toggleRow(row: T): void { + if (!this.detailTemplate()) return; + this.expandedElement.update((current) => (current === row ? null : row)); + } } From 1874f41fb01bf1adf8f610262704cd9f9f5635e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20Paul=20Ton=C4=8Dik?= Date: Sun, 14 Jun 2026 12:18:19 +0200 Subject: [PATCH 44/97] Added error page --- webapp/src/app/app.config.ts | 16 ++-- webapp/src/app/app.routes.ts | 11 ++- .../error-page/error-page.component.html | 38 +++++++- .../error-page/error-page.component.scss | 87 +++++++++++++++++++ .../error-page/error-page.component.ts | 26 +++++- .../ui/app-menu/app-menu.component.html | 2 +- .../shared/ui/app-menu/app-menu.component.ts | 7 +- 7 files changed, 176 insertions(+), 11 deletions(-) diff --git a/webapp/src/app/app.config.ts b/webapp/src/app/app.config.ts index 89c90655..2af26785 100644 --- a/webapp/src/app/app.config.ts +++ b/webapp/src/app/app.config.ts @@ -33,12 +33,18 @@ export const appConfig: ApplicationConfig = { withComponentInputBinding(), withNavigationErrorHandler((error) => { const router = inject(Router); + const errorMessage: string = + error instanceof NavigationError ? error.error : 'Unbekannter Fehler'; - if (error) { - console.error('Navigation error occurred:', error); - } - - router.navigate(['/error']); + router.navigate(['/error'], { + state: { + statusCode: 500, + title: 'Daten-Fehler', + message: + 'Die Daten für diese Ansicht konnten nicht geladen werden.', + errorDetails: errorMessage, + }, + }); }), ), provideHttpClient(withInterceptors([authenticationInterceptor])), diff --git a/webapp/src/app/app.routes.ts b/webapp/src/app/app.routes.ts index 675d87a8..56b9b531 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -200,6 +200,15 @@ export const routes: Routes = [ }, { path: '**', - redirectTo: 'login', + loadComponent: () => + import('./modules/error-page/error-page.component').then( + (mod) => mod.ErrorPageComponent, + ), + data: { + statusCode: 404, + title: 'Seite nicht gefunden', + message: + 'Die gesuchte Seite existiert leider nicht oder wurde verschoben.', + }, }, ]; diff --git a/webapp/src/app/modules/error-page/error-page.component.html b/webapp/src/app/modules/error-page/error-page.component.html index 7e9d75af..126ea4fb 100644 --- a/webapp/src/app/modules/error-page/error-page.component.html +++ b/webapp/src/app/modules/error-page/error-page.component.html @@ -1 +1,37 @@ -

error-page works!

+
+ + +
+ warning +
+ + Fehler {{ statusCode() }} +

{{ title() }}

+

{{ message() }}

+ + + + @if (errorDetails()) { + + + + ERWEITERTE DIAGNOSE + + + +
{{ errorDetails() }}
+
+ } +
+
+
diff --git a/webapp/src/app/modules/error-page/error-page.component.scss b/webapp/src/app/modules/error-page/error-page.component.scss index e69de29b..b7c2bee1 100644 --- a/webapp/src/app/modules/error-page/error-page.component.scss +++ b/webapp/src/app/modules/error-page/error-page.component.scss @@ -0,0 +1,87 @@ +.error-container { + min-height: 90vh; + background-color: none !important; + display: flex; + align-items: center; + justify-content: center; + padding: 1.5rem; + box-sizing: border-box; +} + +.error-card { + max-width: 450px; + width: 100%; + box-shadow: + 0 4px 6px -1px rgb(0 0 0 / 0.05), + 0 2px 4px -2px rgb(0 0 0 / 0.05) !important; +} + +.error-content { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; +} + +.error-icon { + height: 36px !important; + width: 36px !important; + font-size: 36px !important; +} + +.status-code { + font-size: 0.75rem; + font-weight: 600; + letter-spacing: 0.05em; + color: #94a3b8; + text-transform: uppercase; +} + +.error-title { + margin: 0.5rem 0 1rem 0; + font-size: 1.75rem; + font-weight: 700; + color: #1e293b; + letter-spacing: -0.025em; + line-height: 1.2; +} + +.error-message { + margin: 0 0 2rem 0; + font-size: 1rem; + color: #475569; + line-height: 1.6; +} + +.back-button { + margin-bottom: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.diagnostics-panel { + width: 100%; + background: transparent !important; +} + +.diagnostics-title { + font-size: 0.75rem !important; + font-weight: 600; + color: #94a3b8; + letter-spacing: 0.05em; +} + +.diagnostics-code { + margin-top: 0.5rem; + padding: 1rem; + background-color: #0f172a; + border-radius: 8px; + font-size: 0.75rem; + color: #34d399; + overflow-x: auto; + font-family: monospace; + text-align: left; + white-space: pre-wrap; + max-height: 160px; +} diff --git a/webapp/src/app/modules/error-page/error-page.component.ts b/webapp/src/app/modules/error-page/error-page.component.ts index eaf0c9ba..a1d51e3a 100644 --- a/webapp/src/app/modules/error-page/error-page.component.ts +++ b/webapp/src/app/modules/error-page/error-page.component.ts @@ -1,11 +1,33 @@ -import { Component } from '@angular/core'; +import { Location } from '@angular/common'; +import { Component, input, signal } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; +import { MatExpansionModule } from '@angular/material/expansion'; +import { MatIconModule } from '@angular/material/icon'; @Component({ selector: 'app-error-page', - imports: [], + imports: [MatButtonModule, MatCardModule, MatIconModule, MatExpansionModule], templateUrl: './error-page.component.html', styleUrl: './error-page.component.scss', }) export class ErrorPageComponent { + statusCode = input(500); + title = input('Da ist was schiefgelaufen'); + message = input( + 'Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später erneut.', + ); + errorDetails = input(); + isDetailsOpen = signal(false); + + constructor(private readonly location: Location) {} + + toggleDetails() { + this.isDetailsOpen.update((isOpen) => !isOpen); + } + + goBack() { + this.location.back(); + } } diff --git a/webapp/src/app/shared/ui/app-menu/app-menu.component.html b/webapp/src/app/shared/ui/app-menu/app-menu.component.html index 8e136a31..26147f0a 100644 --- a/webapp/src/app/shared/ui/app-menu/app-menu.component.html +++ b/webapp/src/app/shared/ui/app-menu/app-menu.component.html @@ -1,5 +1,5 @@