diff --git a/service/src/main/inse/works/model.py b/service/src/main/inse/works/model.py index 3adaf777..38f29433 100644 --- a/service/src/main/inse/works/model.py +++ b/service/src/main/inse/works/model.py @@ -51,6 +51,7 @@ class WorkPurpose(StrEnum): APPLIED_RESEARCH = "Applied Research" NON_RESEARCH = "Non-Research" EXPERIMENTAL_DEVELOPMENT = "Experimental Development" + NOT_CLASSIFIED = "Not Classified" class SpecificWorkPurpose(BaseModel): diff --git a/service/src/main/inse/works/purpose_service.py b/service/src/main/inse/works/purpose_service.py index 15cb3b4c..f397076a 100644 --- a/service/src/main/inse/works/purpose_service.py +++ b/service/src/main/inse/works/purpose_service.py @@ -43,7 +43,8 @@ async def get_author_work_purposes(raw_oa_author_id: str) -> AuthorWorkPurposes: logger.debug( f"Retrieved work ids for author {raw_oa_author_id}: {list(relevant_work_information.keys())}" ) - raw_work_ids = list(map(_extract_raw_work_id, relevant_work_information.keys())) + work_ids = list(relevant_work_information.keys()) + raw_work_ids = list(map(_extract_raw_work_id, work_ids)) logger.debug( f"Extracted raw work ids for author {raw_oa_author_id}: {raw_work_ids}" ) @@ -61,6 +62,7 @@ async def get_author_work_purposes(raw_oa_author_id: str) -> AuthorWorkPurposes: hits_block = response.get("hits", {}) hits = hits_block.get("hits", []) total_hits = hits_block.get("total", {}).get("value", 0) + hitted_work_ids = [] for hit in hits: source = hit.get("_source", {}) work_id = source.get("work_id") @@ -79,9 +81,20 @@ async def get_author_work_purposes(raw_oa_author_id: str) -> AuthorWorkPurposes: reasoning=classification.get("classification_reason"), ) ) + hitted_work_ids.append(f"https://openalex.org/{work_id}") else: logger.warning(f"Work hit without id for author {raw_oa_author_id}: {hit}") + for work_id in filter(lambda wid: wid not in hitted_work_ids, work_ids): + purposes.append( + SpecificWorkPurpose( + raw_oa_work_id=_extract_raw_work_id(work_id), + publication_year=relevant_work_information.get(work_id), + purpose=WorkPurpose.NOT_CLASSIFIED, + reasoning="No classification found for this work.", + ) + ) + return AuthorWorkPurposes( raw_oa_author_id=raw_oa_author_id, total=total_hits, purposes=purposes ) diff --git a/service/src/main/inse/works/v2/model.py b/service/src/main/inse/works/v2/model.py index bd440b8f..25efaef5 100644 --- a/service/src/main/inse/works/v2/model.py +++ b/service/src/main/inse/works/v2/model.py @@ -1,10 +1,7 @@ from enum import StrEnum -from typing import List - -from pydantic import BaseModel, Field from inse.model import Page -from inse.models.openalex.work_topic import WorkTopic +from inse.models.openalex.work import Work class WorkSortBy(StrEnum): @@ -15,34 +12,5 @@ class WorkSortBy(StrEnum): CITED_BY_COUNT = "cited_by_count" -class AuthorWorkInstitution(BaseModel): - institution_id: str = Field( - description="The ID of the institution associated with the work" - ) - institution_name: str = Field( - description="The name of the institution associated with the work" - ) - institution_country_code: str = Field( - description="The country code of the institution associated with the work" - ) - - -class AuthorWork(BaseModel): - id: str = Field(description="The ID of the work") - title: str = Field(description="The title of the work") - type: str = Field(description="The type of the work") - publication_year: int = Field(description="The year the work was published") - language_code: str = Field(description="The language code of the work") - institutions: List[AuthorWorkInstitution] = Field( - description="A list of institutions associated with the work" - ) - topics: List[WorkTopic] = Field( - description="A list of topics associated with the work" - ) - cited_by_count: int = Field( - description="The number of citations the work has received" - ) - - -class AuthorWorkPage(Page[AuthorWork]): +class WorkPage(Page[Work]): pass diff --git a/service/src/main/inse/works/v2/router.py b/service/src/main/inse/works/v2/router.py index 5ad09882..f03d5f6a 100644 --- a/service/src/main/inse/works/v2/router.py +++ b/service/src/main/inse/works/v2/router.py @@ -4,7 +4,7 @@ from fastapi import APIRouter, Path, Query from inse.tags import Tags from inse.model import SortDirection -from inse.works.v2.model import AuthorWorkPage, WorkSortBy +from inse.works.v2.model import WorkPage, WorkSortBy from inse.models.openalex.work_topic import WorkTopic from inse.models.openalex.institution import Institution @@ -52,7 +52,7 @@ async def get_author_works( sort_order: Annotated[ SortDirection, Query(description="The order to sort by.") ] = SortDirection.DESCENDING, -) -> AuthorWorkPage: +) -> WorkPage: from inse.works.v2.service import get_author_works return await get_author_works( diff --git a/service/src/main/inse/works/v2/service.py b/service/src/main/inse/works/v2/service.py index b35736e3..df6c3b90 100644 --- a/service/src/main/inse/works/v2/service.py +++ b/service/src/main/inse/works/v2/service.py @@ -1,16 +1,15 @@ import logging -from typing import List, Optional, Dict +from typing import List, Optional from inse.integrations import elasticsearch from inse.model import ESIndex, SortDirection from inse.works.v2.model import ( - AuthorWork, - AuthorWorkInstitution, - AuthorWorkPage, + WorkPage, WorkSortBy, ) from inse.models.openalex.work_topic import WorkTopic from inse.models.openalex.institution import Institution +from inse.models.openalex.work import Work logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) @@ -27,7 +26,7 @@ async def get_author_works( language_codes: Optional[List[str]] = None, sort_by: WorkSortBy = WorkSortBy.PUBLICATION_YEAR, sort_order: SortDirection = SortDirection.DESCENDING, -) -> AuthorWorkPage: +) -> WorkPage: must = [ { @@ -84,6 +83,7 @@ async def get_author_works( "publication_year", "language", "cited_by_count", + "authorships.author", "authorships.institutions.id", "authorships.institutions.display_name", "authorships.institutions.country_code", @@ -99,36 +99,14 @@ async def get_author_works( hits_block = response.get("hits", {}) total = hits_block.get("total", {}).get("value", 0) hits = hits_block.get("hits", []) - elements: List[AuthorWork] = [] + elements: List[Work] = [] for hit in hits: source = hit.get("_source", {}) logger.debug(f"Hit source for author {raw_oa_author_id} v2: {source}") - institutions: Dict[str, AuthorWorkInstitution] = {} - for authorship in source.get("authorships", []): - for institution in authorship.get("institutions", []): - institution_id = institution.get("id", "") - if institution_id not in institutions: - institutions[institution_id] = AuthorWorkInstitution( - institution_id=institution.get("id", ""), - institution_name=institution.get("display_name", ""), - institution_country_code=institution.get("country_code") or "", - ) - topics: List[WorkTopic] = [ - WorkTopic.from_dict(topic) for topic in source.get("topics", []) - ] # type: ignore - elements.append( - AuthorWork( - id=source.get("id", ""), - title=source.get("title", ""), - type=source.get("type", ""), - publication_year=source.get("publication_year", 0), - language_code=source.get("language") or "", - institutions=list(institutions.values()), - topics=topics, - cited_by_count=source.get("cited_by_count", 0), - ) - ) - return AuthorWorkPage( + work = Work.from_dict(source) # type: ignore + if work is not None: + elements.append(work) + return WorkPage( elements=elements, total=total, page=page, diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index 7e1e7127..3b7a05ad 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -39,9 +39,6 @@ model/authorNetworkNode.ts model/authorParsedLongestName.ts model/authorPositionCount.ts model/authorSummaryStats.ts -model/authorWork.ts -model/authorWorkInstitution.ts -model/authorWorkPage.ts model/authorWorkPurposes.ts model/authorsFilterProperties.ts model/authorsListResponse.ts @@ -130,7 +127,9 @@ model/hEUWebLink.ts model/hTTPValidationError.ts model/idTokenMetadata.ts model/inseAccountManagementModelOrganizationProfile.ts +model/inseModelsOpenalexWorkPageWorkPage.ts model/inseOrganizationManagementModelOrganizationProfile.ts +model/inseWorksV2ModelWorkPage.ts model/institution.ts model/institutionFunderSummary.ts model/institutionGeo.ts @@ -228,7 +227,6 @@ model/workIds.ts model/workKeyword.ts model/workMeshInner.ts model/workNetworkNode.ts -model/workPage.ts model/workPurpose.ts model/workSortBy.ts model/workSustainableDevelopmentGoalsInner.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 d7bae3a8..3a480162 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -34,23 +34,4 @@ export * from './works.service'; import { WorksService } from './works.service'; export * from './worksV2.service'; import { WorksV2Service } from './worksV2.service'; -export const APIS = [ - AuthService, - BookmarksService, - CompanyConnectionsService, - DashboardService, - FundingService, - INSEServiceService, - InstitutionsService, - KeywordsService, - NewsService, - OrganizationService, - PatentsService, - PersonNetworkService, - PersonsService, - ProjectsService, - TopicsService, - UniversityRankingsService, - WorksService, - WorksV2Service, -]; +export const APIS = [AuthService, BookmarksService, CompanyConnectionsService, DashboardService, FundingService, INSEServiceService, InstitutionsService, KeywordsService, NewsService, OrganizationService, PatentsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, UniversityRankingsService, WorksService, WorksV2Service]; diff --git a/webapp/src/app/api/api/auth.service.ts b/webapp/src/app/api/api/auth.service.ts index e504fdc9..a906d12f 100644 --- a/webapp/src/app/api/api/auth.service.ts +++ b/webapp/src/app/api/api/auth.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AccessResponse } from '../model/accessResponse'; @@ -56,1749 +50,964 @@ import { OtkResponse } from '../model/otkResponse'; import { UpdateAccountRequest } from '../model/updateAccountRequest'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class AuthService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Change Password - * Change the user\'s password and invalidate existing tokens. - * @endpoint post /api/auth/v2/change-password - * @param bodyChangePassword - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public changePassword( - bodyChangePassword: BodyChangePassword, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyChangePassword === null || bodyChangePassword === undefined) { - throw new Error( - 'Required parameter bodyChangePassword was null or undefined when calling changePassword.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Change Password + * Change the user\'s password and invalidate existing tokens. + * @endpoint post /api/auth/v2/change-password + * @param bodyChangePassword + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyChangePassword === null || bodyChangePassword === undefined) { + throw new Error('Required parameter bodyChangePassword was null or undefined when calling changePassword.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/change-password`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyChangePassword, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Create Account + * @endpoint post /api/accounts + * @param createAccountRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createAccount(createAccountRequest: CreateAccountRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (createAccountRequest === null || createAccountRequest === undefined) { + throw new Error('Required parameter createAccountRequest was null or undefined when calling createAccount.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createAccountRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + /** + * Delete Account + * @endpoint delete /api/accounts/{account_id} + * @param accountId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteAccount(accountId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling deleteAccount.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts/${this.configuration.encodeParam({name: "accountId", value: accountId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/auth/v2/change-password`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: bodyChangePassword, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } + /** + * Get Access Token + * Retrieve an access token for the authenticated user. + * @endpoint post /api/auth/v2/access + * @param bodyGetAccessToken + * @param idToken + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyGetAccessToken === null || bodyGetAccessToken === undefined) { + throw new Error('Required parameter bodyGetAccessToken was null or undefined when calling getAccessToken.'); + } - /** - * Create Account - * @endpoint post /api/accounts - * @param createAccountRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createAccount( - createAccountRequest: CreateAccountRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (createAccountRequest === null || createAccountRequest === undefined) { - throw new Error( - 'Required parameter createAccountRequest was null or undefined when calling createAccount.', - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/access`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyGetAccessToken, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Get Current Account + * @endpoint get /api/accounts/me + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCurrentAccount(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCurrentAccount(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCurrentAccount(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCurrentAccount(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts/me`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Health Check + * @endpoint get /api/auth/v2/health + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public healthCheckApiAuthV2HealthGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public healthCheckApiAuthV2HealthGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public healthCheckApiAuthV2HealthGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public healthCheckApiAuthV2HealthGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/health`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + /** + * List Organizations + * @endpoint get /api/accounts/organizations + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listAccountOrganizations(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listAccountOrganizations(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listAccountOrganizations(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listAccountOrganizations(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts/organizations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/accounts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createAccountRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * List Accounts + * @endpoint get /api/accounts + * @param page + * @param pageSize + * @param offset + * @param search + * @param organizationId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Delete Account - * @endpoint delete /api/accounts/{account_id} - * @param accountId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteAccount( - accountId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (accountId === null || accountId === undefined) { - throw new Error( - 'Required parameter accountId was null or undefined when calling deleteAccount.', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + offset, 'offset'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + organizationId, 'organization_id'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Login with One-Time Key + * Login using a one-time key (OTK) sent to the user\'s email. + * @endpoint post /api/auth/v2/login + * @param bodyLogin + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public login(bodyLogin: BodyLogin, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public login(bodyLogin: BodyLogin, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public login(bodyLogin: BodyLogin, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public login(bodyLogin: BodyLogin, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyLogin === null || bodyLogin === undefined) { + throw new Error('Required parameter bodyLogin was null or undefined when calling login.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/login`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyLogin, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Logout + * Logout the authenticated user. + * @endpoint post /api/auth/v2/logout + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public logout(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public logout(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public logout(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public logout(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/logout`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/accounts/${this.configuration.encodeParam({ name: 'accountId', value: accountId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Refresh Access Token + * Refresh the access token using a valid refresh token. + * @endpoint post /api/auth/v2/refresh + * @param refreshToken + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public refreshAccessToken(refreshToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public refreshAccessToken(refreshToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public refreshAccessToken(refreshToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public refreshAccessToken(refreshToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Get Access Token - * Retrieve an access token for the authenticated user. - * @endpoint post /api/auth/v2/access - * @param bodyGetAccessToken - * @param idToken - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAccessToken( - bodyGetAccessToken: BodyGetAccessToken, - idToken?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyGetAccessToken === null || bodyGetAccessToken === undefined) { - throw new Error( - 'Required parameter bodyGetAccessToken was null or undefined when calling getAccessToken.', - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/refresh`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Request One-Time Key + * Request a one-time key (OTK) for authentication using email and password. + * @endpoint post /api/auth/v2/request-otk + * @param bodyRequestOtk + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestOtk(bodyRequestOtk: BodyRequestOtk, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyRequestOtk === null || bodyRequestOtk === undefined) { + throw new Error('Required parameter bodyRequestOtk was null or undefined when calling requestOtk.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/request-otk`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyRequestOtk, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Request Password Reset + * Request a one-time password reset link for the given email address. + * @endpoint post /api/auth/v2/request-password-reset + * @param bodyRequestPasswordReset + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public requestPasswordReset(bodyRequestPasswordReset: BodyRequestPasswordReset, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyRequestPasswordReset === null || bodyRequestPasswordReset === undefined) { + throw new Error('Required parameter bodyRequestPasswordReset was null or undefined when calling requestPasswordReset.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/request-password-reset`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyRequestPasswordReset, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + /** + * Reset Password + * Reset the user\'s password using a one-time password reset token. + * @endpoint post /api/auth/v2/reset-password + * @param bodyResetPassword + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public resetPassword(bodyResetPassword: BodyResetPassword, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (bodyResetPassword === null || bodyResetPassword === undefined) { + throw new Error('Required parameter bodyResetPassword was null or undefined when calling resetPassword.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/auth/v2/reset-password`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: bodyResetPassword, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/auth/v2/access`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyGetAccessToken, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Update Account + * @endpoint put /api/accounts/{account_id} + * @param accountId + * @param updateAccountRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (accountId === null || accountId === undefined) { + throw new Error('Required parameter accountId was null or undefined when calling updateAccount.'); + } + if (updateAccountRequest === null || updateAccountRequest === undefined) { + throw new Error('Required parameter updateAccountRequest was null or undefined when calling updateAccount.'); + } - /** - * Get Current Account - * @endpoint get /api/accounts/me - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCurrentAccount( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCurrentAccount( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCurrentAccount( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCurrentAccount( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/accounts/${this.configuration.encodeParam({name: "accountId", value: accountId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: updateAccountRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts/me`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Health Check - * @endpoint get /api/auth/v2/health - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public healthCheckApiAuthV2HealthGet( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public healthCheckApiAuthV2HealthGet( - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public healthCheckApiAuthV2HealthGet( - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public healthCheckApiAuthV2HealthGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * List Organizations - * @endpoint get /api/accounts/organizations - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAccountOrganizations( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listAccountOrganizations( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpResponse> - >; - public listAccountOrganizations( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpEvent> - >; - public listAccountOrganizations( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts/organizations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request< - Array - >('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * List Accounts - * @endpoint get /api/accounts - * @param page - * @param pageSize - * @param offset - * @param search - * @param organizationId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listAccounts( - page?: number, - pageSize?: number, - offset?: number, - search?: string, - organizationId?: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - offset, - 'offset', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - search, - 'search', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - organizationId, - 'organization_id', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Login with One-Time Key - * Login using a one-time key (OTK) sent to the user\'s email. - * @endpoint post /api/auth/v2/login - * @param bodyLogin - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public login( - bodyLogin: BodyLogin, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public login( - bodyLogin: BodyLogin, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public login( - bodyLogin: BodyLogin, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public login( - bodyLogin: BodyLogin, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyLogin === null || bodyLogin === undefined) { - throw new Error( - 'Required parameter bodyLogin was null or undefined when calling login.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/login`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyLogin, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Logout - * Logout the authenticated user. - * @endpoint post /api/auth/v2/logout - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public logout( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public logout( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public logout( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public logout( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/logout`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Refresh Access Token - * Refresh the access token using a valid refresh token. - * @endpoint post /api/auth/v2/refresh - * @param refreshToken - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public refreshAccessToken( - refreshToken?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public refreshAccessToken( - refreshToken?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public refreshAccessToken( - refreshToken?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public refreshAccessToken( - refreshToken?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/refresh`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Request One-Time Key - * Request a one-time key (OTK) for authentication using email and password. - * @endpoint post /api/auth/v2/request-otk - * @param bodyRequestOtk - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestOtk( - bodyRequestOtk: BodyRequestOtk, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyRequestOtk === null || bodyRequestOtk === undefined) { - throw new Error( - 'Required parameter bodyRequestOtk was null or undefined when calling requestOtk.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/request-otk`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyRequestOtk, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Request Password Reset - * Request a one-time password reset link for the given email address. - * @endpoint post /api/auth/v2/request-password-reset - * @param bodyRequestPasswordReset - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public requestPasswordReset( - bodyRequestPasswordReset: BodyRequestPasswordReset, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - bodyRequestPasswordReset === null || - bodyRequestPasswordReset === undefined - ) { - throw new Error( - 'Required parameter bodyRequestPasswordReset was null or undefined when calling requestPasswordReset.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/request-password-reset`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: bodyRequestPasswordReset, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Reset Password - * Reset the user\'s password using a one-time password reset token. - * @endpoint post /api/auth/v2/reset-password - * @param bodyResetPassword - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public resetPassword( - bodyResetPassword: BodyResetPassword, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (bodyResetPassword === null || bodyResetPassword === undefined) { - throw new Error( - 'Required parameter bodyResetPassword was null or undefined when calling resetPassword.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/reset-password`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - body: bodyResetPassword, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Update Account - * @endpoint put /api/accounts/{account_id} - * @param accountId - * @param updateAccountRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateAccount( - accountId: string, - updateAccountRequest: UpdateAccountRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (accountId === null || accountId === undefined) { - throw new Error( - 'Required parameter accountId was null or undefined when calling updateAccount.', - ); - } - if (updateAccountRequest === null || updateAccountRequest === undefined) { - throw new Error( - 'Required parameter updateAccountRequest was null or undefined when calling updateAccount.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts/${this.configuration.encodeParam({ name: 'accountId', value: accountId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'put', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: updateAccountRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/bookmarks.service.ts b/webapp/src/app/api/api/bookmarks.service.ts index 198f796e..3e0ec2e8 100644 --- a/webapp/src/app/api/api/bookmarks.service.ts +++ b/webapp/src/app/api/api/bookmarks.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CreatePersonBookmark } from '../model/createPersonBookmark'; @@ -30,375 +24,206 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { PersonBookmarkResponse } from '../model/personBookmarkResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class BookmarksService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Bookmark Person - * @endpoint put /api/bookmarks/persons/{person_id} - * @param personId - * @param createPersonBookmark - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public bookmarkPerson( - personId: string, - createPersonBookmark: CreatePersonBookmark, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (personId === null || personId === undefined) { - throw new Error( - 'Required parameter personId was null or undefined when calling bookmarkPerson.', - ); - } - if (createPersonBookmark === null || createPersonBookmark === undefined) { - throw new Error( - 'Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Bookmark Person + * @endpoint put /api/bookmarks/persons/{person_id} + * @param personId + * @param createPersonBookmark + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public bookmarkPerson(personId: string, createPersonBookmark: CreatePersonBookmark, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (personId === null || personId === undefined) { + throw new Error('Required parameter personId was null or undefined when calling bookmarkPerson.'); + } + if (createPersonBookmark === null || createPersonBookmark === undefined) { + throw new Error('Required parameter createPersonBookmark was null or undefined when calling bookmarkPerson.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createPersonBookmark, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * List Person Bookmarks + * @endpoint get /api/bookmarks/persons + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listPersonBookmarks(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listPersonBookmarks(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listPersonBookmarks(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listPersonBookmarks(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bookmarks/persons`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + /** + * Remove Person Bookmark + * @endpoint delete /api/bookmarks/persons/{person_id} + * @param personId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public removePersonBookmark(personId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (personId === null || personId === undefined) { + throw new Error('Required parameter personId was null or undefined when calling removePersonBookmark.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({name: "personId", value: personId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'put', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createPersonBookmark, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * List Person Bookmarks - * @endpoint get /api/bookmarks/persons - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listPersonBookmarks( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listPersonBookmarks( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public listPersonBookmarks( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public listPersonBookmarks( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bookmarks/persons`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Remove Person Bookmark - * @endpoint delete /api/bookmarks/persons/{person_id} - * @param personId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public removePersonBookmark( - personId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (personId === null || personId === undefined) { - throw new Error( - 'Required parameter personId was null or undefined when calling removePersonBookmark.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bookmarks/persons/${this.configuration.encodeParam({ name: 'personId', value: personId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/companyConnections.service.ts b/webapp/src/app/api/api/companyConnections.service.ts index 6ad850ea..cbc5f803 100644 --- a/webapp/src/app/api/api/companyConnections.service.ts +++ b/webapp/src/app/api/api/companyConnections.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CompanyConnectionsResponse } from '../model/companyConnectionsResponse'; @@ -28,121 +22,74 @@ import { CompanyConnectionsResponse } from '../model/companyConnectionsResponse' import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class CompanyConnectionsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Get possible company connections by OpenAlex author ID. - * @endpoint get /api/inse-service/authors/{author_id}/company-connections - * @param authorId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompanyConnectionsByAuthor( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getCompanyConnectionsByAuthor( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCompanyConnectionsByAuthor( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getCompanyConnectionsByAuthor( - 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 getCompanyConnectionsByAuthor.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Get possible company connections by OpenAlex author ID. + * @endpoint get /api/inse-service/authors/{author_id}/company-connections + * @param authorId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompanyConnectionsByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCompanyConnectionsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCompanyConnectionsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCompanyConnectionsByAuthor(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 getCompanyConnectionsByAuthor.'); + } - 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})}/company-connections`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/dashboard.service.ts b/webapp/src/app/api/api/dashboard.service.ts index 247dfab8..5bf6b615 100644 --- a/webapp/src/app/api/api/dashboard.service.ts +++ b/webapp/src/app/api/api/dashboard.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,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 { DashboardStatisticValue } from '../model/dashboardStatisticValue'; @@ -34,897 +28,477 @@ import { TopAuthorStatistics } from '../model/topAuthorStatistics'; import { TopicHeatmap } from '../model/topicHeatmap'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class DashboardService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Dashboard Bmbf Projects - * @endpoint get /api/dashboard/statistics/projects/bmbf - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardBmbfProjects( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardBmbfProjects( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBmbfProjects( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardBmbfProjects( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Bmbf Projects + * @endpoint get /api/dashboard/statistics/projects/bmbf + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardBmbfProjects(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardBmbfProjects(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBmbfProjects(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardBmbfProjects(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/projects/bmbf`; + 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/dashboard/statistics/projects/bmbf`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Dfg Projects + * @endpoint get /api/dashboard/statistics/projects/dfg + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardDfgProjects(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardDfgProjects(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjects(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardDfgProjects(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Dfg Projects - * @endpoint get /api/dashboard/statistics/projects/dfg - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardDfgProjects( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardDfgProjects( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjects( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardDfgProjects( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/projects/dfg`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Eu Projects + * @endpoint get /api/dashboard/statistics/projects/eu + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardEuProjects(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardEuProjects(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjects(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardEuProjects(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/projects/eu`; + 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/dashboard/statistics/projects/dfg`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Persons + * @endpoint get /api/dashboard/statistics/persons + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardPersons(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardPersons(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPersons(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPersons(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Eu Projects - * @endpoint get /api/dashboard/statistics/projects/eu - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardEuProjects( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardEuProjects( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjects( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardEuProjects( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/persons`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Publications + * @endpoint get /api/dashboard/statistics/publications + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardPublications(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardPublications(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPublications(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardPublications(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/publications`; + 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/dashboard/statistics/projects/eu`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Statistics + * @endpoint get /api/dashboard/statistics + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardStatistics(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardStatistics(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardStatistics(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardStatistics(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Persons - * @endpoint get /api/dashboard/statistics/persons - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardPersons( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardPersons( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPersons( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPersons( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Dashboard Top Authors + * @endpoint get /api/dashboard/top-authors + * @param worksPeriod + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + worksPeriod, 'works_period'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/top-authors`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/dashboard/statistics/persons`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Dashboard Topic Heatmap + * @endpoint get /api/dashboard/topic-heatmap + * @param fromYear + * @param toYear + * @param limit + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardTopicHeatmap(fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDashboardTopicHeatmap(fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopicHeatmap(fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDashboardTopicHeatmap(fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Dashboard Publications - * @endpoint get /api/dashboard/statistics/publications - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardPublications( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardPublications( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPublications( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardPublications( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fromYear, 'from_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + toYear, 'to_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/topic-heatmap`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/publications`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Statistics - * @endpoint get /api/dashboard/statistics - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardStatistics( - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardStatistics( - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardStatistics( - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardStatistics( - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Top Authors - * @endpoint get /api/dashboard/top-authors - * @param worksPeriod - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopAuthors( - worksPeriod?: 'all_time' | 'last_5_years', - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - worksPeriod, - 'works_period', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/top-authors`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Dashboard Topic Heatmap - * @endpoint get /api/dashboard/topic-heatmap - * @param fromYear - * @param toYear - * @param limit - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDashboardTopicHeatmap( - fromYear?: number, - toYear?: number, - limit?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fromYear, - 'from_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - toYear, - 'to_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/topic-heatmap`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/funding.service.ts b/webapp/src/app/api/api/funding.service.ts index f1f0a1a7..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,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 { FundersByAuthorResponse } from '../model/fundersByAuthorResponse'; @@ -30,246 +24,138 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { PublicationsByAuthorResponse } from '../model/publicationsByAuthorResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class FundingService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * 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/iNSEService.service.ts b/webapp/src/app/api/api/iNSEService.service.ts index da26fff7..1149c309 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,355 +9,205 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class INSEServiceService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * 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, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * 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 localVarTransferCache: boolean = options?.transferCache ?? true; + 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; - 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 localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - /** - * 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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic', + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | '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 + } ); - }); } - let localVarHeaders = this.defaultHeaders; + /** + * 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 localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (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 + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * 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 { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/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 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 { - 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, - }, - ); - } } diff --git a/webapp/src/app/api/api/institutions.service.ts b/webapp/src/app/api/api/institutions.service.ts index b837e00e..641a3b13 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,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AutocompleteResponse } from '../model/autocompleteResponse'; @@ -34,591 +28,295 @@ import { InstitutionPage } from '../model/institutionPage'; 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'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class InstitutionsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns institution options for autocomplete inputs. - * @endpoint get /api/inse-service/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/inse-service/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/inse-service/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/inse-service/institutions/{id} + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionById(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + 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/inse-service/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/institutions/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/inse-service/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 single institution by ID. - * Returns a single institution by its OpenAlex ID. - * @endpoint get /api/inse-service/institutions/{id} - * @param id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionById( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - 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.', - ); + 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/inse-service/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 + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Searches for institutions by name. + * Searches for institutions by name with pagination. + * @endpoint get /api/inse-service/institutions/search + * @param name Institution name to search for, for example \'University of Duisburg Essen\'. + * @param page Page number (0-indexed). + * @param size Number of institutions per page. + * @param sortBy Field to sort by, either \'relevance\', \'name\', \'works_count\', or \'citations_count\'. + * @param sortingDirection Sorting direction, either \'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 searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchInstitutionsByName(name?: string, page?: number, size?: number, sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', sortingDirection?: 'asc' | 'desc', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - 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, + name, 'name'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortingDirection, 'sorting_direction'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('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/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a list of OpenAlex institutions. - * @endpoint get /api/inse-service/institutions - * @param search Full-text search, for example \'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 localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/institutions`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for institutions by name. - * Searches for institutions by name with pagination. - * @endpoint get /api/inse-service/institutions/search - * @param name Institution name to search for, for example \'University of Duisburg Essen\'. - * @param page Page number (0-indexed). - * @param size Number of institutions per page. - * @param sortBy Field to sort by, either \'relevance\', \'name\', \'works_count\', or \'citations_count\'. - * @param sortingDirection Sorting direction, either \'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 searchInstitutionsByName( - name?: string, - page?: number, - size?: number, - sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', - sortingDirection?: 'asc' | 'desc', - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchInstitutionsByName( - name?: string, - page?: number, - size?: number, - sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', - sortingDirection?: 'asc' | 'desc', - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchInstitutionsByName( - name?: string, - page?: number, - size?: number, - sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', - sortingDirection?: 'asc' | 'desc', - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchInstitutionsByName( - name?: string, - page?: number, - size?: number, - sortBy?: 'relevance' | 'name' | 'works_count' | 'citations_count', - sortingDirection?: 'asc' | 'desc', - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - name, - 'name', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortingDirection, - 'sorting_direction', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/institutions/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - '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/keywords.service.ts b/webapp/src/app/api/api/keywords.service.ts index 6aed478b..fa73019b 100644 --- a/webapp/src/app/api/api/keywords.service.ts +++ b/webapp/src/app/api/api/keywords.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 { ExtractedKeywordsResponse } from '../model/extractedKeywordsResponse'; @@ -34,250 +28,149 @@ import { PatentsByKeywordsRequest } from '../model/patentsByKeywordsRequest'; import { PatentsByKeywordsResponse } from '../model/patentsByKeywordsResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class KeywordsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Extracts keywords from text. - * @endpoint post /api/inse-service/keywords/extract - * @param keywordsRequest - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public extractKeywords( - keywordsRequest: KeywordsRequest, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public extractKeywords( - keywordsRequest: KeywordsRequest, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public extractKeywords( - keywordsRequest: KeywordsRequest, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public extractKeywords( - keywordsRequest: KeywordsRequest, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (keywordsRequest === null || keywordsRequest === undefined) { - throw new Error( - 'Required parameter keywordsRequest was null or undefined when calling extractKeywords.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Extracts keywords from text. + * @endpoint post /api/inse-service/keywords/extract + * @param keywordsRequest + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public extractKeywords(keywordsRequest: KeywordsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public extractKeywords(keywordsRequest: KeywordsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public extractKeywords(keywordsRequest: KeywordsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public extractKeywords(keywordsRequest: KeywordsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (keywordsRequest === null || keywordsRequest === undefined) { + throw new Error('Required parameter keywordsRequest was null or undefined when calling extractKeywords.'); + } - 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/inse-service/keywords/extract`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: keywordsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Find patents matching extracted OpenAlex keywords. + * @endpoint post /api/inse-service/keywords/patents + * @param patentsByKeywordsRequest + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentsByKeywords(patentsByKeywordsRequest: PatentsByKeywordsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPatentsByKeywords(patentsByKeywordsRequest: PatentsByKeywordsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByKeywords(patentsByKeywordsRequest: PatentsByKeywordsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByKeywords(patentsByKeywordsRequest: PatentsByKeywordsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (patentsByKeywordsRequest === null || patentsByKeywordsRequest === undefined) { + throw new Error('Required parameter patentsByKeywordsRequest was null or undefined when calling getPatentsByKeywords.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/keywords/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: patentsByKeywordsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/keywords/extract`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: keywordsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Find patents matching extracted OpenAlex keywords. - * @endpoint post /api/inse-service/keywords/patents - * @param patentsByKeywordsRequest - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPatentsByKeywords( - patentsByKeywordsRequest: PatentsByKeywordsRequest, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPatentsByKeywords( - patentsByKeywordsRequest: PatentsByKeywordsRequest, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByKeywords( - patentsByKeywordsRequest: PatentsByKeywordsRequest, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByKeywords( - patentsByKeywordsRequest: PatentsByKeywordsRequest, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - patentsByKeywordsRequest === null || - patentsByKeywordsRequest === undefined - ) { - throw new Error( - 'Required parameter patentsByKeywordsRequest was null or undefined when calling getPatentsByKeywords.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/keywords/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: patentsByKeywordsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/news.service.ts b/webapp/src/app/api/api/news.service.ts index eb6e0f11..8ff477cf 100644 --- a/webapp/src/app/api/api/news.service.ts +++ b/webapp/src/app/api/api/news.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -30,1151 +24,567 @@ import { NewsArticleDetail } from '../model/newsArticleDetail'; import { NewsPage } from '../model/newsPage'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class NewsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns news articles in which the given person is mentioned. - * @endpoint get /api/news/by-author - * @param authorId OpenAlex author id, e.g. A5034365278. - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param query Optional search term, matched against title/author. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getNewsByAuthor.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'authorId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); + /** + * Returns news articles in which the given person is mentioned. + * @endpoint get /api/news/by-author + * @param authorId OpenAlex author id, e.g. A5034365278. + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param query Optional search term, matched against title/author. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getNewsByAuthor.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'authorId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/by-author`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns news articles in which the given person is mentioned. + * @endpoint get /api/news/by-author + * @param authorId OpenAlex author id, e.g. A5034365278. + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param query Optional search term, matched against title/author. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsByAuthor_1(authorId: string, page?: number, pageSize?: number, sortOrder?: string, query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getNewsByAuthor_1.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'authorId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/by-author`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/news/by-author`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Returns a single news article including its full content. + * @endpoint get /api/news/{news_id} + * @param newsId The unique id of the news article (Elasticsearch _id). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getNewsById(newsId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsById(newsId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById(newsId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById(newsId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (newsId === null || newsId === undefined) { + throw new Error('Required parameter newsId was null or undefined when calling getNewsById.'); + } - /** - * Returns news articles in which the given person is mentioned. - * @endpoint get /api/news/by-author - * @param authorId OpenAlex author id, e.g. A5034365278. - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param query Optional search term, matched against title/author. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsByAuthor_1( - authorId: string, - page?: number, - pageSize?: number, - sortOrder?: string, - query?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getNewsByAuthor_1.', - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/${this.configuration.encodeParam({name: "newsId", value: newsId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - authorId, - 'authorId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); + /** + * Returns a single news article including its full content. + * @endpoint get /api/news/{news_id} + * @param newsId The unique id of the news article (Elasticsearch _id). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getNewsById_2(newsId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getNewsById_2(newsId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById_2(newsId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getNewsById_2(newsId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (newsId === null || newsId === undefined) { + throw new Error('Required parameter newsId was null or undefined when calling getNewsById_2.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/${this.configuration.encodeParam({name: "newsId", value: newsId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns a page of news articles, newest first. + * @endpoint get /api/news + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/news/by-author`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Returns a page of news articles, newest first. + * @endpoint get /api/news + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listNews_3(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public listNews_3(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews_3(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listNews_3(page?: number, pageSize?: number, sortOrder?: string, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - /** - * Returns a single news article including its full content. - * @endpoint get /api/news/{news_id} - * @param newsId The unique id of the news article (Elasticsearch _id). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getNewsById( - newsId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsById( - newsId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById( - newsId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById( - newsId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (newsId === null || newsId === undefined) { - throw new Error( - 'Required parameter newsId was null or undefined when calling getNewsById.', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sortOrder'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; + /** + * Searches news articles by full text (full_content). + * @endpoint get /api/news/search + * @param query Search term, matched against the full text (full_content). + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling searchNews.'); + } - const 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, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Searches news articles by full text (full_content). + * @endpoint get /api/news/search + * @param query Search term, matched against the full text (full_content). + * @param page Page number (1-based). + * @param pageSize Articles per page. + * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. + * @param yearFrom Earliest publication year (inclusive). + * @param yearTo Latest publication year (inclusive). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchNews_4(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchNews_4(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews_4(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchNews_4(query: string, page?: number, pageSize?: number, relevance?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling searchNews_4.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + relevance, 'relevance'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'yearFrom'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'yearTo'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/news/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/news/${this.configuration.encodeParam({ name: 'newsId', value: newsId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a single news article including its full content. - * @endpoint get /api/news/{news_id} - * @param newsId The unique id of the news article (Elasticsearch _id). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getNewsById_2( - newsId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getNewsById_2( - newsId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById_2( - newsId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getNewsById_2( - newsId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (newsId === null || newsId === undefined) { - throw new Error( - 'Required parameter newsId was null or undefined when calling getNewsById_2.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/news/${this.configuration.encodeParam({ name: 'newsId', value: newsId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a page of news articles, newest first. - * @endpoint get /api/news - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/news`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a page of news articles, newest first. - * @endpoint get /api/news - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param sortOrder Sort order: \'desc\' (newest first) or \'asc\' (oldest first). - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listNews_3( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listNews_3( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews_3( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listNews_3( - page?: number, - pageSize?: number, - sortOrder?: string, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sortOrder', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/news`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches news articles by full text (full_content). - * @endpoint get /api/news/search - * @param query Search term, matched against the full text (full_content). - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling searchNews.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/news/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches news articles by full text (full_content). - * @endpoint get /api/news/search - * @param query Search term, matched against the full text (full_content). - * @param page Page number (1-based). - * @param pageSize Articles per page. - * @param relevance Comma-separated relevance filter: \'relevant\', \'not_relevant\'. - * @param yearFrom Earliest publication year (inclusive). - * @param yearTo Latest publication year (inclusive). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchNews_4( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchNews_4( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews_4( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchNews_4( - query: string, - page?: number, - pageSize?: number, - relevance?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling searchNews_4.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - relevance, - 'relevance', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'yearFrom', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'yearTo', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/news/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/organization.service.ts b/webapp/src/app/api/api/organization.service.ts index 4315e7c1..14fb942d 100644 --- a/webapp/src/app/api/api/organization.service.ts +++ b/webapp/src/app/api/api/organization.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CreateOrganizationRequest } from '../model/createOrganizationRequest'; @@ -34,545 +28,287 @@ import { OrganizationPage } from '../model/organizationPage'; import { UpdateOrganizationRequest } from '../model/updateOrganizationRequest'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class OrganizationService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Create Organization - * @endpoint post /api/organizations - * @param createOrganizationRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpResponse - >; - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public createOrganisation( - createOrganizationRequest: CreateOrganizationRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - createOrganizationRequest === null || - createOrganizationRequest === undefined - ) { - throw new Error( - 'Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Create Organization + * @endpoint post /api/organizations + * @param createOrganizationRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (createOrganizationRequest === null || createOrganizationRequest === undefined) { + throw new Error('Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.'); + } - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/organizations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: createOrganizationRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Delete Organization + * @endpoint delete /api/organizations/{organization_id} + * @param organizationId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteOrganisation(organizationId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (organizationId === null || organizationId === undefined) { + throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganisation.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/organizations/${this.configuration.encodeParam({name: "organizationId", value: organizationId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + /** + * Get Organizations + * @endpoint get /api/organizations + * @param page + * @param pageSize + * @param offset + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getOrganisations(page?: number, pageSize?: number, offset?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + offset, 'offset'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/organizations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/organizations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createOrganizationRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Update Organization + * @endpoint put /api/organizations/{organization_id} + * @param organizationId + * @param updateOrganizationRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (organizationId === null || organizationId === undefined) { + throw new Error('Required parameter organizationId was null or undefined when calling updateOrganisation.'); + } + if (updateOrganizationRequest === null || updateOrganizationRequest === undefined) { + throw new Error('Required parameter updateOrganizationRequest was null or undefined when calling updateOrganisation.'); + } - /** - * Delete Organization - * @endpoint delete /api/organizations/{organization_id} - * @param organizationId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public deleteOrganisation( - organizationId: string, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (organizationId === null || organizationId === undefined) { - throw new Error( - 'Required parameter organizationId was null or undefined when calling deleteOrganisation.', - ); + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/organizations/${this.configuration.encodeParam({name: "organizationId", value: organizationId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: updateOrganizationRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/organizations/${this.configuration.encodeParam({ name: 'organizationId', value: organizationId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'delete', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get Organizations - * @endpoint get /api/organizations - * @param page - * @param pageSize - * @param offset - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOrganisations( - page?: number, - pageSize?: number, - offset?: number, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getOrganisations( - page?: number, - pageSize?: number, - offset?: number, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getOrganisations( - page?: number, - pageSize?: number, - offset?: number, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getOrganisations( - page?: number, - pageSize?: number, - offset?: number, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'page_size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - offset, - 'offset', - ); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/organizations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Update Organization - * @endpoint put /api/organizations/{organization_id} - * @param organizationId - * @param updateOrganizationRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable< - HttpResponse - >; - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public updateOrganisation( - organizationId: string, - updateOrganizationRequest: UpdateOrganizationRequest, - secureFgpAcc?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (organizationId === null || organizationId === undefined) { - throw new Error( - 'Required parameter organizationId was null or undefined when calling updateOrganisation.', - ); - } - if ( - updateOrganizationRequest === null || - updateOrganizationRequest === undefined - ) { - throw new Error( - 'Required parameter updateOrganizationRequest was null or undefined when calling updateOrganisation.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders( - 'HTTPBearer', - 'Authorization', - localVarHeaders, - 'Bearer ', - ); - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/organizations/${this.configuration.encodeParam({ name: 'organizationId', value: organizationId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: 'uuid' })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'put', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: updateOrganizationRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/patents.service.ts b/webapp/src/app/api/api/patents.service.ts index 5e69dc9e..ec6e9280 100644 --- a/webapp/src/app/api/api/patents.service.ts +++ b/webapp/src/app/api/api/patents.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AllPatentsResponse } from '../model/allPatentsResponse'; @@ -38,779 +32,399 @@ import { PatentsByInstitutionResponse } from '../model/patentsByInstitutionRespo import { RebuildResponse } from '../model/rebuildResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class PatentsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Get all patents with pagination and search. - * @endpoint get /api/inse-service/patents - * @param page - * @param size - * @param search - * @param source - * @param sortBy - * @param sortDirection - * @param yearFrom - * @param yearTo - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllPatents( - page?: number, - size?: number, - search?: string, - source?: string, - sortBy?: string, - sortDirection?: string, - yearFrom?: number, - yearTo?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - search, - 'search', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - source, - 'source', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearFrom, - 'year_from', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - yearTo, - 'year_to', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Get all patents with pagination and search. + * @endpoint get /api/inse-service/patents + * @param page + * @param size + * @param search + * @param source + * @param sortBy + * @param sortDirection + * @param yearFrom + * @param yearTo + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllPatents(page?: number, size?: number, search?: string, source?: string, sortBy?: string, sortDirection?: string, yearFrom?: number, yearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + search, 'search'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + source, 'source'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearFrom, 'year_from'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + yearTo, 'year_to'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Get pre-indexed org patents for an institution. + * @endpoint get /api/inse-service/institutions/{id}/org-patents + * @param id + * @param matchType Filter patents by match type. + * @param page + * @param size + * @param source + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getOrgPatentsByInstitution(id: string, matchType?: 'institution' | 'name' | 'both' | 'all', page?: number, size?: number, source?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getOrgPatentsByInstitution.'); + } - /** - * Get pre-indexed org patents for an institution. - * @endpoint get /api/inse-service/institutions/{id}/org-patents - * @param id - * @param matchType Filter patents by match type. - * @param page - * @param size - * @param source - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getOrgPatentsByInstitution( - id: string, - matchType?: 'institution' | 'name' | 'both' | 'all', - page?: number, - size?: number, - source?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getOrgPatentsByInstitution( - id: string, - matchType?: 'institution' | 'name' | 'both' | 'all', - page?: number, - size?: number, - source?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getOrgPatentsByInstitution( - id: string, - matchType?: 'institution' | 'name' | 'both' | 'all', - page?: number, - size?: number, - source?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getOrgPatentsByInstitution( - id: string, - matchType?: 'institution' | 'name' | 'both' | 'all', - page?: number, - size?: number, - source?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getOrgPatentsByInstitution.', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + matchType, 'match_type'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + source, 'source'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/org-patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - matchType, - 'match_type', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - source, - 'source', - ); + /** + * Get a single patent by identifier with optional title fallback. + * @endpoint get /api/inse-service/patents/{identifier} + * @param identifier + * @param prefix + * @param title + * @param fillingDate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, fillingDate?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (identifier === null || identifier === undefined) { + throw new Error('Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + prefix, 'prefix'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fillingDate, 'filling_date'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/patents/${this.configuration.encodeParam({name: "identifier", value: identifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Get patents matched to an author by name. + * @endpoint get /api/inse-service/authors/{author_id}/patents + * @param authorId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentsByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPatentsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByAuthor(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getPatentsByAuthor.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/org-patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } + /** + * Get patents matched to an institution by assignee name. + * @endpoint get /api/inse-service/institutions/{id}/patents + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentsByInstitution(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getPatentsByInstitution(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByInstitution(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPatentsByInstitution(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getPatentsByInstitution.'); + } - /** - * Get a single patent by identifier with optional title fallback. - * @endpoint get /api/inse-service/patents/{identifier} - * @param identifier - * @param prefix - * @param title - * @param fillingDate - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - fillingDate?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - fillingDate?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - fillingDate?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentByIdOrTitle( - identifier: string, - prefix?: string, - title?: string, - fillingDate?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (identifier === null || identifier === undefined) { - throw new Error( - 'Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.', - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - prefix, - 'prefix', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fillingDate, - 'filling_date', - ); + /** + * Trigger a background rebuild of the org_patents index for an institution. + * @endpoint post /api/inse-service/institutions/{id}/org-patents/rebuild + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public rebuildOrgPatents(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public rebuildOrgPatents(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public rebuildOrgPatents(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public rebuildOrgPatents(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling rebuildOrgPatents.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/org-patents/rebuild`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/patents/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get patents matched to an author by name. - * @endpoint get /api/inse-service/authors/{author_id}/patents - * @param authorId - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPatentsByAuthor( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPatentsByAuthor( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByAuthor( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByAuthor( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getPatentsByAuthor.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get patents matched to an institution by assignee name. - * @endpoint get /api/inse-service/institutions/{id}/patents - * @param id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPatentsByInstitution( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPatentsByInstitution( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByInstitution( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPatentsByInstitution( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getPatentsByInstitution.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Trigger a background rebuild of the org_patents index for an institution. - * @endpoint post /api/inse-service/institutions/{id}/org-patents/rebuild - * @param id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public rebuildOrgPatents( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public rebuildOrgPatents( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public rebuildOrgPatents( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public rebuildOrgPatents( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling rebuildOrgPatents.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/org-patents/rebuild`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/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 cef36fc4..03222a4c 100644 --- a/webapp/src/app/api/api/persons.service.ts +++ b/webapp/src/app/api/api/persons.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AuthorsListResponse } from '../model/authorsListResponse'; @@ -32,1739 +26,869 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { PersonBio } from '../model/personBio'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class PersonsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Generates a bio for a person by author ID. - * @endpoint get /api/inse-service/persons/bio - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param 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.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/person/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for person by ID. - * @endpoint get /api/inse-service/person/{id} - * @param id OpenAlex author ID - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPersonByID_1( - id: string, - include?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getPersonByID_1( - id: string, - include?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPersonByID_1( - id: string, - include?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPersonByID_1( - id: string, - include?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getPersonByID_1.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - include, - 'include', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/person/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Searches for persons by ID or name. - * @endpoint get /api/inse-service/persons/search - * @param authorId OpenAlex author ID (e.g., A5093075883) - * @param query Search query (e.g., Arman AND Arzani) - * @param 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 sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param 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, - 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, - 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.'); + } - 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 sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param 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, - 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, - 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.'); + } - 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 sortBy Value to sort by + * @param sortOrder asc or desc? + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param 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, 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, + 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 sortBy Value to sort by + * @param sortOrder asc or desc? + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param 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, 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, + 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/projects.service.ts b/webapp/src/app/api/api/projects.service.ts index c69e39c9..95efc1f2 100644 --- a/webapp/src/app/api/api/projects.service.ts +++ b/webapp/src/app/api/api/projects.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { BundProjectDetails } from '../model/bundProjectDetails'; @@ -52,1209 +46,650 @@ import { ProjectsSortBy } from '../model/projectsSortBy'; import { SortDirection } from '../model/sortDirection'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class ProjectsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Get DFG projects. - * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. - * @endpoint get /api/projects/person/dfg/search - * @param authorId The author ID to filter by. - * @param topic The topic 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 getDfgProjects( - authorId: string, - topic?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getDfgProjects( - authorId: string, - topic?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgProjects( - authorId: string, - topic?: string, - page?: number, - size?: number, - sortBy?: string, - sortDirection?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getDfgProjects( - authorId: string, - topic?: 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 (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getDfgProjects.', - ); + 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, - topic, - 'topic', - ); - 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/person/dfg/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get EU projects for an author. - * Returns a list of EU projects associated with the specified author ID. - * @endpoint get /api/projects/author/{raw_oa_author_id}/eu - * @param rawOaAuthorId The author ID to filter by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEuProjectsForAuthor( - rawOaAuthorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getEuProjectsForAuthor( - rawOaAuthorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getEuProjectsForAuthor( - rawOaAuthorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getEuProjectsForAuthor( - rawOaAuthorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling getEuProjectsForAuthor.', - ); - } - - 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/author/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/eu`; - 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 funding over time for bund projects. - * Returns the funding over time for bund projects associated with the specified institution. - * @endpoint get /api/projects/institution/bund/funding-over-time - * @param rawOaInstitutionId The institution ID to filter by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionBundProjectsFundingOverTime( - rawOaInstitutionId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { - throw new Error( - 'Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionBundProjectsFundingOverTime.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/bund/funding-over-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get funding over time for EU projects. - * Returns the funding over time for EU projects associated with the specified institution. - * @endpoint get /api/projects/institution/eu/funding-over-time - * @param rawOaInstitutionId The institution ID to filter by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionCordisEuProjectsFundingOverTime( - rawOaInstitutionId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { - throw new Error( - 'Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionCordisEuProjectsFundingOverTime.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - rawOaInstitutionId, - 'raw_oa_institution_id', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/eu/funding-over-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get a single BUND project. - * Returns a single BUND project based on its ID. - * @endpoint get /api/projects/bund/{id} - * @param id The ID of the BUND project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleBundProject( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSingleBundProject( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleBundProject( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleBundProject( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getSingleBundProject.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get a single DFG project. - * Returns a single DFG project based on its ID. - * @endpoint get /api/projects/dfg/{id} - * @param id The ID of the DFG project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleDfgProject( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSingleDfgProject( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleDfgProject( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleDfgProject( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getSingleDfgProject.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/dfg/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get a single EU Cordis project. - * Returns a single EU Cordis project based on its ID. - * @endpoint get /api/projects/eu/{id} - * @param id The ID of the EU Cordis project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleEuCordisProject( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getSingleEuCordisProject( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleEuCordisProject( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getSingleEuCordisProject( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling getSingleEuCordisProject.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/eu/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get bund projects. - * Returns a page of bund projects based on the provided pagination parameters and optional institution filter. - * @endpoint post /api/projects/institution/bund/search - * @param projectsFilteringProperties - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchBundProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - projectsFilteringProperties === null || - projectsFilteringProperties === undefined - ) { - throw new Error( - 'Required parameter projectsFilteringProperties was null or undefined when calling searchBundProjects.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/bund/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: projectsFilteringProperties, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Get EU projects. - * Returns a page of EU projects based on the provided pagination parameters and optional institution filter. - * @endpoint post /api/projects/institution/eu/search - * @param projectsFilteringProperties - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchCordisEuProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchCordisEuProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchCordisEuProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchCordisEuProjects( - projectsFilteringProperties: ProjectsFilteringProperties, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if ( - projectsFilteringProperties === null || - projectsFilteringProperties === undefined - ) { - throw new Error( - 'Required parameter projectsFilteringProperties was null or undefined when calling searchCordisEuProjects.', - ); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/eu/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: projectsFilteringProperties, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Search projects across all funders. - * Returns a page of projects across all funders based on the provided pagination parameters and optional institution filter. - * @endpoint get /api/projects/search - * @param page The page number. - * @param size The page size. - * @param selectedProjectTypes The set of project types to filter by (e.g., \'bund\', \'eu\', \'dfg\'). If not provided, projects of all types will be included. - * @param title The title to filter by. - * @param sortBy The field to sort by. - * @param sortDirection The sort direction (asc or desc). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public searchProjects( - page?: number, - size?: number, - selectedProjectTypes?: Set, - title?: string, - sortBy?: ProjectsSortBy, - sortDirection?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - if (selectedProjectTypes) { - selectedProjectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'selected_project_types', + /** + * Get DFG projects. + * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/person/dfg/search + * @param authorId The author ID to filter by. + * @param topic The topic 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 getDfgProjects(authorId: string, topic?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getDfgProjects(authorId: string, topic?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgProjects(authorId: string, topic?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getDfgProjects(authorId: string, topic?: 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 (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getDfgProjects.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + authorId, 'author_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + topic, 'topic'); + 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/person/dfg/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortDirection, - 'sort_direction', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Get EU projects for an author. + * Returns a list of EU projects associated with the specified author ID. + * @endpoint get /api/projects/author/{raw_oa_author_id}/eu + * @param rawOaAuthorId The author ID to filter by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuProjectsForAuthor(rawOaAuthorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getEuProjectsForAuthor(rawOaAuthorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuProjectsForAuthor(rawOaAuthorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getEuProjectsForAuthor(rawOaAuthorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getEuProjectsForAuthor.'); + } - 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/projects/author/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/eu`; + 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 funding over time for bund projects. + * Returns the funding over time for bund projects associated with the specified institution. + * @endpoint get /api/projects/institution/bund/funding-over-time + * @param rawOaInstitutionId The institution ID to filter by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { + throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionBundProjectsFundingOverTime.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/bund/funding-over-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get funding over time for EU projects. + * Returns the funding over time for EU projects associated with the specified institution. + * @endpoint get /api/projects/institution/eu/funding-over-time + * @param rawOaInstitutionId The institution ID to filter by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { + throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionCordisEuProjectsFundingOverTime.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + rawOaInstitutionId, 'raw_oa_institution_id'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/eu/funding-over-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get a single BUND project. + * Returns a single BUND project based on its ID. + * @endpoint get /api/projects/bund/{id} + * @param id The ID of the BUND project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleBundProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSingleBundProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleBundProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleBundProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getSingleBundProject.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get a single DFG project. + * Returns a single DFG project based on its ID. + * @endpoint get /api/projects/dfg/{id} + * @param id The ID of the DFG project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleDfgProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSingleDfgProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleDfgProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleDfgProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getSingleDfgProject.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/dfg/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get a single EU Cordis project. + * Returns a single EU Cordis project based on its ID. + * @endpoint get /api/projects/eu/{id} + * @param id The ID of the EU Cordis project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleEuCordisProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getSingleEuCordisProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleEuCordisProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getSingleEuCordisProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getSingleEuCordisProject.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/eu/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get bund projects. + * Returns a page of bund projects based on the provided pagination parameters and optional institution filter. + * @endpoint post /api/projects/institution/bund/search + * @param projectsFilteringProperties + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (projectsFilteringProperties === null || projectsFilteringProperties === undefined) { + throw new Error('Required parameter projectsFilteringProperties was null or undefined when calling searchBundProjects.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: projectsFilteringProperties, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get EU projects. + * Returns a page of EU projects based on the provided pagination parameters and optional institution filter. + * @endpoint post /api/projects/institution/eu/search + * @param projectsFilteringProperties + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (projectsFilteringProperties === null || projectsFilteringProperties === undefined) { + throw new Error('Required parameter projectsFilteringProperties was null or undefined when calling searchCordisEuProjects.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/eu/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: projectsFilteringProperties, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Search projects across all funders. + * Returns a page of projects across all funders based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/search + * @param page The page number. + * @param size The page size. + * @param selectedProjectTypes The set of project types to filter by (e.g., \'bund\', \'eu\', \'dfg\'). If not provided, projects of all types will be included. + * @param title The title to filter by. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (selectedProjectTypes) { + selectedProjectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'selected_project_types'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortDirection, 'sort_direction'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/projects/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/topics.service.ts b/webapp/src/app/api/api/topics.service.ts index 5a51e233..ef7b0c7f 100644 --- a/webapp/src/app/api/api/topics.service.ts +++ b/webapp/src/app/api/api/topics.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AutocompleteResponse } from '../model/autocompleteResponse'; @@ -34,929 +28,484 @@ import { KeywordsTopicsResponse } from '../model/keywordsTopicsResponse'; import { TopicsListResponse } from '../model/topicsListResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class TopicsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns topic options for autocomplete inputs. - * @endpoint get /api/topics/autocomplete - * @param query Topic search text, for example \'machine learning\'. - * @param domainId Optional OpenAlex domain id filter. - * @param fieldId Optional OpenAlex field id filter. - * @param subfieldId Optional OpenAlex subfield id filter. - * @param limit Maximum number of autocomplete options. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public autocompleteTopics( - query: string, - domainId?: string, - fieldId?: string, - subfieldId?: string, - limit?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling autocompleteTopics.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - domainId, - 'domainId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fieldId, - 'fieldId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - subfieldId, - 'subfieldId', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); + /** + * Returns topic options for autocomplete inputs. + * @endpoint get /api/topics/autocomplete + * @param query Topic search text, for example \'machine learning\'. + * @param domainId Optional OpenAlex domain id filter. + * @param fieldId Optional OpenAlex field id filter. + * @param subfieldId Optional OpenAlex subfield id filter. + * @param limit Maximum number of autocomplete options. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling autocompleteTopics.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + domainId, 'domainId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fieldId, 'fieldId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + subfieldId, 'subfieldId'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const 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, - }, - ); - } + /** + * Semantic / vector search for topics using a keyword/sentence. + * @endpoint get /api/topics/vector-search + * @param query Word or sentence to search by similarity. + * @param limit Maximum number of topics to return. + * @param searchType Search approach: \'hybrid\' or \'semantic\'. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopics(query: string, limit?: number, searchType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling vectorSearchTopics.'); + } - /** - * Returns a list of OpenAlex topics. - * @endpoint get /api/topics - * @param search Full-text search, for example \'machine learning\'. - * @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'. - * @param sort Sort field, for example \'works_count:desc\'. - * @param groupBy OpenAlex group_by field, for example \'domain.id\'. - * @param perPage Results per page. - * @param page Page number. Use cursor for deep pagination. - * @param cursor Cursor pagination token. Use \'*\' to start. - * @param sample Random sample size. Cannot be combined with sort or page. - * @param select Comma-separated fields to return. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listTopics( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public listTopics( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listTopics( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public listTopics( - search?: string, - filter?: string, - sort?: string, - groupBy?: string, - perPage?: number, - page?: number, - cursor?: string, - sample?: number, - select?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - search, - 'search', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - filter, - 'filter', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sort, - 'sort', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - groupBy, - 'group_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - perPage, - 'per_page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - cursor, - 'cursor', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sample, - 'sample', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - select, - 'select', - ); + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'searchType'); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/vector-search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Batch semantic / vector search for multiple keywords. + * @endpoint post /api/topics/vector-search/batch + * @param keywordsTopicsRequest + * @param searchType Search approach: \'hybrid\' or \'semantic\'. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public vectorSearchTopicsBatch(keywordsTopicsRequest: KeywordsTopicsRequest, searchType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (keywordsTopicsRequest === null || keywordsTopicsRequest === undefined) { + throw new Error('Required parameter keywordsTopicsRequest was null or undefined when calling vectorSearchTopicsBatch.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'searchType'); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/topics/vector-search/batch`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: keywordsTopicsRequest, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - let localVarPath = `/api/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Semantic / vector search for topics using a keyword/sentence. - * @endpoint get /api/topics/vector-search - * @param query Word or sentence to search by similarity. - * @param limit Maximum number of topics to return. - * @param searchType Search approach: \'hybrid\' or \'semantic\'. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopics( - query: string, - limit?: number, - searchType?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling vectorSearchTopics.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'searchType', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/topics/vector-search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Batch semantic / vector search for multiple keywords. - * @endpoint post /api/topics/vector-search/batch - * @param keywordsTopicsRequest - * @param searchType Search approach: \'hybrid\' or \'semantic\'. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public vectorSearchTopicsBatch( - keywordsTopicsRequest: KeywordsTopicsRequest, - searchType?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (keywordsTopicsRequest === null || keywordsTopicsRequest === undefined) { - throw new Error( - 'Required parameter keywordsTopicsRequest was null or undefined when calling vectorSearchTopicsBatch.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'searchType', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected, - ); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/topics/vector-search/batch`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'post', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: keywordsTopicsRequest, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/universityRankings.service.ts b/webapp/src/app/api/api/universityRankings.service.ts index a7aba880..82bcee4c 100644 --- a/webapp/src/app/api/api/universityRankings.service.ts +++ b/webapp/src/app/api/api/universityRankings.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AutocompleteLocationItem } from '../model/autocompleteLocationItem'; @@ -38,748 +32,391 @@ import { TrendResponse } from '../model/trendResponse'; import { TrendSearchType } from '../model/trendSearchType'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class UniversityRankingsService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns country and continent options for autocomplete inputs. - * @endpoint get /api/inse-service/university-rankings/autocomplete-locations - * @param query Query text to search for countries/continents - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet( - query: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (query === null || query === undefined) { - throw new Error( - 'Required parameter query was null or undefined when calling getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - query, - 'query', - ); + /** + * Returns country and continent options for autocomplete inputs. + * @endpoint get /api/inse-service/university-rankings/autocomplete-locations + * @param query Query text to search for countries/continents + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet(query: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (query === null || query === undefined) { + throw new Error('Required parameter query was null or undefined when calling getAutocompleteLocationsApiInseServiceUniversityRankingsAutocompleteLocationsGet.'); + } - let localVarHeaders = this.defaultHeaders; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + query, 'query'); - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/inse-service/university-rankings/autocomplete-locations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Returns data for the University Ranking Dashboard. - * @endpoint get /api/inse-service/university-rankings - * @param topic Research topic display name or OpenAlex ID (e.g., \'Artificial Intelligence\') - * @param metric Metric to rank by - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getRankingsApiInseServiceUniversityRankingsGet( - topic: string, - metric?: 'publications' | 'citations', - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (topic === null || topic === undefined) { - throw new Error( - 'Required parameter topic was null or undefined when calling getRankingsApiInseServiceUniversityRankingsGet.', - ); - } + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - topic, - 'topic', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - metric, - 'metric', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/university-rankings`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns top institutions filtered by country/region and sorted by topic-level publications count. - * @endpoint get /api/inse-service/university-rankings/top-institutions - * @param topic Research topic - * @param region Region identifier (e.g. EU) - * @param country Country code (e.g. DE) - * @param limit Max suggestions to return - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( - topic: string, - region?: string, - country?: string, - limit?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( - topic: string, - region?: string, - country?: string, - limit?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( - topic: string, - region?: string, - country?: string, - limit?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet( - topic: string, - region?: string, - country?: string, - limit?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (topic === null || topic === undefined) { - throw new Error( - 'Required parameter topic was null or undefined when calling getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - topic, - 'topic', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - region, - 'region', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - country, - 'country', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - limit, - 'limit', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/university-rankings/top-institutions`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns top 10 research topics for a selected entity. - * @endpoint get /api/inse-service/university-rankings/top-topics - * @param entityId Entity ID - * @param entityType Entity type: institution, author, country, region - * @param startYear Start year - * @param endYear End year - * @param searchType Search strategy type - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet( - entityId: string, - entityType: string, - startYear?: number, - endYear?: number, - searchType?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (entityId === null || entityId === undefined) { - throw new Error( - 'Required parameter entityId was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.', - ); - } - if (entityType === null || entityType === undefined) { - throw new Error( - 'Required parameter entityType was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - entityId, - 'entity_id', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - entityType, - 'entity_type', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - startYear, - 'start_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - endYear, - 'end_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'search_type', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/university-rankings/top-topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns timeseries publication data for compared institutions, countries, and regions. - * @endpoint get /api/inse-service/university-rankings/trend - * @param topics List of topics to analyze - * @param keywords List of raw keywords corresponding to topics - * @param fuzzy True if using mapped topics, False if using raw keywords - * @param institutions List of OpenAlex Institution IDs - * @param countries List of country codes - * @param regions List of region identifiers - * @param authors List of OpenAlex Author IDs - * @param searchType - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTrendApiInseServiceUniversityRankingsTrendGet( - topics: Array, - keywords?: Array, - fuzzy?: boolean, - institutions?: Array, - countries?: Array, - regions?: Array, - authors?: Array, - searchType?: TrendSearchType, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (topics === null || topics === undefined) { - throw new Error( - 'Required parameter topics was null or undefined when calling getTrendApiInseServiceUniversityRankingsTrendGet.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topics) { - topics.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topics', + let localVarPath = `/api/inse-service/university-rankings/autocomplete-locations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'keywords', + + /** + * Returns data for the University Ranking Dashboard. + * @endpoint get /api/inse-service/university-rankings + * @param topic Research topic display name or OpenAlex ID (e.g., \'Artificial Intelligence\') + * @param metric Metric to rank by + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getRankingsApiInseServiceUniversityRankingsGet(topic: string, metric?: 'publications' | 'citations', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (topic === null || topic === undefined) { + throw new Error('Required parameter topic was null or undefined when calling getRankingsApiInseServiceUniversityRankingsGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + topic, 'topic'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + metric, 'metric'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/university-rankings`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - fuzzy, - 'fuzzy', - ); - if (institutions) { - institutions.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institutions', + + /** + * Returns top institutions filtered by country/region and sorted by topic-level publications count. + * @endpoint get /api/inse-service/university-rankings/top-institutions + * @param topic Research topic + * @param region Region identifier (e.g. EU) + * @param country Country code (e.g. DE) + * @param limit Max suggestions to return + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(topic: string, region?: string, country?: string, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(topic: string, region?: string, country?: string, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(topic: string, region?: string, country?: string, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet(topic: string, region?: string, country?: string, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (topic === null || topic === undefined) { + throw new Error('Required parameter topic was null or undefined when calling getTopInstitutionsApiInseServiceUniversityRankingsTopInstitutionsGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + topic, 'topic'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + region, 'region'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + country, 'country'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/university-rankings/top-institutions`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'countries', + + /** + * Returns top 10 research topics for a selected entity. + * @endpoint get /api/inse-service/university-rankings/top-topics + * @param entityId Entity ID + * @param entityType Entity type: institution, author, country, region + * @param startYear Start year + * @param endYear End year + * @param searchType Search strategy type + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet(entityId: string, entityType: string, startYear?: number, endYear?: number, searchType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (entityId === null || entityId === undefined) { + throw new Error('Required parameter entityId was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.'); + } + if (entityType === null || entityType === undefined) { + throw new Error('Required parameter entityType was null or undefined when calling getTopTopicsApiInseServiceUniversityRankingsTopTopicsGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + entityId, 'entity_id'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + entityType, 'entity_type'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + startYear, 'start_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + endYear, 'end_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'search_type'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/university-rankings/top-topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (regions) { - regions.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'regions', + + /** + * Returns timeseries publication data for compared institutions, countries, and regions. + * @endpoint get /api/inse-service/university-rankings/trend + * @param topics List of topics to analyze + * @param keywords List of raw keywords corresponding to topics + * @param fuzzy True if using mapped topics, False if using raw keywords + * @param institutions List of OpenAlex Institution IDs + * @param countries List of country codes + * @param regions List of region identifiers + * @param authors List of OpenAlex Author IDs + * @param searchType + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTrendApiInseServiceUniversityRankingsTrendGet(topics: Array, keywords?: Array, fuzzy?: boolean, institutions?: Array, countries?: Array, regions?: Array, authors?: Array, searchType?: TrendSearchType, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (topics === null || topics === undefined) { + throw new Error('Required parameter topics was null or undefined when calling getTrendApiInseServiceUniversityRankingsTrendGet.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topics) { + topics.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topics'); + }) + } + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'keywords'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fuzzy, 'fuzzy'); + if (institutions) { + institutions.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institutions'); + }) + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'countries'); + }) + } + if (regions) { + regions.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'regions'); + }) + } + if (authors) { + authors.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'authors'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchType, 'search_type'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/university-rankings/trend`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - if (authors) { - authors.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'authors', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchType, - 'search_type', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/university-rankings/trend`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } } diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index 693477db..935ceba4 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,24 +9,20 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AuthorWorkPurposes } from '../model/authorWorkPurposes'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore +import { InseModelsOpenalexWorkPageWorkPage } from '../model/inseModelsOpenalexWorkPageWorkPage'; +// @ts-ignore import { SpecificWorkPurpose } from '../model/specificWorkPurpose'; // @ts-ignore import { TopicCount } from '../model/topicCount'; @@ -35,883 +31,472 @@ import { TopicsByTime } from '../model/topicsByTime'; // @ts-ignore import { Work } from '../model/work'; // @ts-ignore -import { WorkPage } from '../model/workPage'; -// @ts-ignore import { WorksListResponse } from '../model/worksListResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class WorksService extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns all works for an author. - * @endpoint get /api/works/{author_id}/all - * @param authorId The author id, for example A5023888391. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAllAuthorWorks( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAllAuthorWorks( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllAuthorWorks( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAllAuthorWorks( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getAllAuthorWorks.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarHeaders = this.defaultHeaders; + /** + * Returns all works for an author. + * @endpoint get /api/works/{author_id}/all + * @param authorId The author id, for example A5023888391. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllAuthorWorks(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAllAuthorWorks(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllAuthorWorks(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAllAuthorWorks(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getAllAuthorWorks.'); + } - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } + let localVarHeaders = this.defaultHeaders; - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarPath = `/api/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/all`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - /** - * Returns the purposes of an author based on their ID. - * @endpoint get /api/purpose/{raw_oa_author_id}/purposes - * @param rawOaAuthorId The raw OpenAlex author 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 getAuthorWorkPurposes( - rawOaAuthorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorWorkPurposes( - rawOaAuthorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorkPurposes( - rawOaAuthorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorkPurposes( - rawOaAuthorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPurposes.', - ); - } + let responseType_: '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/purpose/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/purposes`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a page of works for an author. - * @endpoint get /api/works/{author_id} - * @param authorId The author id, for example A5023888391. - * @param page The page number. - * @param size The page size. - * @param publicationYear Filter by publication year. Can be repeated. - * @param type Filter by publication type. Can be repeated. - * @param language Filter by language code. Can be repeated. - * @param institutionId Filter by OpenAlex institution id. Can be repeated. - * @param topicId Filter by OpenAlex topic id. Can be repeated. - * @param sort Sort order: by publication year or by citation count. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorks( - authorId: string, - page?: number, - size?: number, - publicationYear?: Array, - type?: Array, - language?: Array, - institutionId?: Array, - topicId?: Array, - sort?: 'year' | 'citations', - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getAuthorWorks.', - ); - } - - let 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 the purposes of an author based on their ID. + * @endpoint get /api/purpose/{raw_oa_author_id}/purposes + * @param rawOaAuthorId The raw OpenAlex author 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 getAuthorWorkPurposes(rawOaAuthorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorWorkPurposes(rawOaAuthorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorkPurposes(rawOaAuthorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorkPurposes(rawOaAuthorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPurposes.'); + } + + 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/purpose/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/purposes`; + 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 (language) { - language.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language', + + /** + * Returns a page of works for an author. + * @endpoint get /api/works/{author_id} + * @param authorId The author id, for example A5023888391. + * @param page The page number. + * @param size The page size. + * @param publicationYear Filter by publication year. Can be repeated. + * @param type Filter by publication type. Can be repeated. + * @param language Filter by language code. Can be repeated. + * @param institutionId Filter by OpenAlex institution id. Can be repeated. + * @param topicId Filter by OpenAlex topic id. Can be repeated. + * @param sort Sort order: by publication year or by citation count. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, sort?: 'year' | 'citations', observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getAuthorWorks.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (publicationYear) { + publicationYear.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_year'); + }) + } + if (type) { + type.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'type'); + }) + } + if (language) { + language.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language'); + }) + } + if (institutionId) { + institutionId.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_id'); + }) + } + if (topicId) { + topicId.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_id'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sort, 'sort'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (institutionId) { - institutionId.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_id', + + /** + * Returns work counts per primary topic for an author. + * @endpoint get /api/works/{author_id}/primary-topic-counts + * @param authorId The author id, for example A5023888391. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPrimaryTopicCountsByAuthor(authorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getPrimaryTopicCountsByAuthor(authorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getPrimaryTopicCountsByAuthor(authorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getPrimaryTopicCountsByAuthor(authorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getPrimaryTopicCountsByAuthor.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/primary-topic-counts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (topicId) { - topicId.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_id', + + /** + * Returns topics grouped by publication year for an author. + * @endpoint get /api/works/{author_id}/topics-by-time + * @param authorId The author id, for example A5023888391. + * @param maxTopicsPerYear The maximum number of topics per year. + * @param targetPublications Target number of publications used for the timeline. Complete years are always included. + * @param includeAll If true, all publications are used for the timeline. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (authorId === null || authorId === undefined) { + throw new Error('Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + maxTopicsPerYear, 'max_topics_per_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + targetPublications, 'target_publications'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + includeAll, 'include_all'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/topics-by-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sort, - 'sort', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); + /** + * Returns one publication by OpenAlex ID or DOI. + * @endpoint get /api/works/detail/{identifier} + * @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication. + * @param title Do we want to fallback to title search if ID and DOI dont work? + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWork(identifier: string, title?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWork(identifier: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWork(identifier: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWork(identifier: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (identifier === null || identifier === undefined) { + throw new Error('Required parameter identifier was null or undefined when calling getWork.'); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + title, 'title'); - let responseType_: '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/works/detail/${this.configuration.encodeParam({name: "identifier", value: identifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); } - 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 the purpose of a work based on its ID. + * @endpoint get /api/purpose/{raw_oa_work_id}/purpose + * @param rawOaWorkId The raw OpenAlex work id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWorkPurpose(rawOaWorkId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getWorkPurpose(rawOaWorkId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkPurpose(rawOaWorkId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkPurpose(rawOaWorkId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaWorkId === null || rawOaWorkId === undefined) { + throw new Error('Required parameter rawOaWorkId was null or undefined when calling getWorkPurpose.'); + } - /** - * Returns work counts per primary topic for an author. - * @endpoint get /api/works/{author_id}/primary-topic-counts - * @param authorId The author id, for example A5023888391. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getPrimaryTopicCountsByAuthor( - authorId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getPrimaryTopicCountsByAuthor.', - ); + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/purpose/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/purpose`; + 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; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-topic-counts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns topics grouped by publication year for an author. - * @endpoint get /api/works/{author_id}/topics-by-time - * @param authorId The author id, for example A5023888391. - * @param maxTopicsPerYear The maximum number of topics per year. - * @param targetPublications Target number of publications used for the timeline. Complete years are always included. - * @param includeAll If true, all publications are used for the timeline. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getTopicsByTimeByAuthor( - authorId: string, - maxTopicsPerYear?: number, - targetPublications?: number, - includeAll?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (authorId === null || authorId === undefined) { - throw new Error( - 'Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - maxTopicsPerYear, - 'max_topics_per_year', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - targetPublications, - 'target_publications', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - includeAll, - 'include_all', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/topics-by-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns one publication by OpenAlex ID or DOI. - * @endpoint get /api/works/detail/{identifier} - * @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication. - * @param title Do we want to fallback to title search if ID and DOI dont work? - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWork( - identifier: string, - title?: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWork( - identifier: string, - title?: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWork( - identifier: string, - title?: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWork( - identifier: string, - title?: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (identifier === null || identifier === undefined) { - throw new Error( - 'Required parameter identifier was null or undefined when calling getWork.', - ); - } - - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - title, - 'title', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/detail/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }); - } - - /** - * Returns the purpose of a work based on its ID. - * @endpoint get /api/purpose/{raw_oa_work_id}/purpose - * @param rawOaWorkId The raw OpenAlex work id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWorkPurpose( - rawOaWorkId: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getWorkPurpose( - rawOaWorkId: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkPurpose( - rawOaWorkId: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkPurpose( - rawOaWorkId: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaWorkId === null || rawOaWorkId === undefined) { - throw new Error( - 'Required parameter rawOaWorkId was null or undefined when calling getWorkPurpose.', - ); - } - - 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/purpose/${this.configuration.encodeParam({ name: 'rawOaWorkId', value: rawOaWorkId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/purpose`; - 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/worksV2.service.ts b/webapp/src/app/api/api/worksV2.service.ts index 077b468c..0eb2b89c 100644 --- a/webapp/src/app/api/api/worksV2.service.ts +++ b/webapp/src/app/api/api/worksV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,24 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpHeaders, - HttpParams, - HttpResponse, - HttpEvent, - HttpParameterCodec, - HttpContext, -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; -// @ts-ignore -import { AuthorWorkPage } from '../model/authorWorkPage'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore +import { InseWorksV2ModelWorkPage } from '../model/inseWorksV2ModelWorkPage'; +// @ts-ignore import { Institution } from '../model/institution'; // @ts-ignore import { SortDirection } from '../model/sortDirection'; @@ -36,450 +30,246 @@ import { WorkSortBy } from '../model/workSortBy'; import { WorkTopic } from '../model/workTopic'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; + + @Injectable({ - providedIn: 'root', + providedIn: 'root' }) export class WorksV2Service extends BaseService { - constructor( - protected httpClient: HttpClient, - @Optional() @Inject(BASE_PATH) basePath: string | string[], - @Optional() configuration?: Configuration, - ) { - super(basePath, configuration); - } - /** - * Returns a paginated list of works for a given author based on their ID. - * @endpoint get /api/v2/works/{raw_oa_author_id} - * @param rawOaAuthorId The raw OpenAlex author id. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable; - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getAuthorWorkPage( - rawOaAuthorId: string, - page?: number, - size?: number, - publicationYears?: Array, - publicationTypes?: Array, - institutionIds?: Array, - topicIds?: Array, - languageCodes?: Array, - sortBy?: WorkSortBy, - sortOrder?: SortDirection, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error( - 'Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPage.', - ); + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); } - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - page, - 'page', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - size, - 'size', - ); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_years', + /** + * Returns a paginated list of works for a given author based on their ID. + * @endpoint get /api/v2/works/{raw_oa_author_id} + * @param rawOaAuthorId The raw OpenAlex author id. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPage.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + page, 'page'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + size, 'size'); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_years'); + }) + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'publication_types'); + }) + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'language_codes'); + }) + } + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sort_by'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortOrder, 'sort_order'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/v2/works/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'publication_types', + + /** + * Returns a list of institutions based on their IDs. + * @endpoint get /api/v2/works/institutions/search + * @param institutionIds A list of institution IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionsByIds(institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getInstitutionsByIds(institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getInstitutionsByIds(institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getInstitutionsByIds(institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'institution_ids'); + }) + } + + let 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/v2/works/institutions/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', + + /** + * Returns a list of work topics based on their IDs. + * @endpoint get /api/v2/works/topics/search + * @param topicIds A list of topic IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWorkTopicsByIds(topicIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getWorkTopicsByIds(topicIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getWorkTopicsByIds(topicIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public getWorkTopicsByIds(topicIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic_ids'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/v2/works/topics/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } ); - }); - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'language_codes', - ); - }); - } - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sort_by', - ); - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortOrder, - 'sort_order', - ); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); } - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/v2/works/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a list of institutions based on their IDs. - * @endpoint get /api/v2/works/institutions/search - * @param institutionIds A list of institution IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionsByIds( - institutionIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getInstitutionsByIds( - institutionIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getInstitutionsByIds( - institutionIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getInstitutionsByIds( - institutionIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'institution_ids', - ); - }); - } - - let 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/v2/works/institutions/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>( - 'get', - `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined - ? { transferCache: localVarTransferCache } - : {}), - reportProgress: reportProgress, - }, - ); - } - - /** - * Returns a list of work topics based on their IDs. - * @endpoint get /api/v2/works/topics/search - * @param topicIds A list of topic IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWorkTopicsByIds( - topicIds?: Array, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>; - public getWorkTopicsByIds( - topicIds?: Array, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getWorkTopicsByIds( - topicIds?: Array, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable>>; - public getWorkTopicsByIds( - topicIds?: Array, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'application/json'; - context?: HttpContext; - transferCache?: boolean; - }, - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - element, - 'topic_ids', - ); - }); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = - options?.httpHeaderAccept ?? - this.configuration.selectHeaderAccept(['application/json']); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected, - ); - } - - const localVarHttpContext: HttpContext = - options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/v2/works/topics/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/configuration.ts b/webapp/src/app/api/configuration.ts index 17a7070e..2b8c80f7 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 HTTPBearer credential - if (!this.credentials['HTTPBearer']) { - this.credentials['HTTPBearer'] = () => { - return typeof this.accessToken === 'function' - ? this.accessToken() - : this.accessToken; - }; - } - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType(contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; + // init default HTTPBearer credential + if (!this.credentials['HTTPBearer']) { + this.credentials['HTTPBearer'] = () => { + 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/accessResponse.ts b/webapp/src/app/api/model/accessResponse.ts index 2a188f73..6a36e872 100644 --- a/webapp/src/app/api/model/accessResponse.ts +++ b/webapp/src/app/api/model/accessResponse.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 { AccessToken } from './accessToken'; -export interface AccessResponse { - /** - * The access token issued upon successful authentication. - */ - access_token: AccessToken; + +export interface AccessResponse { + /** + * The access token issued upon successful authentication. + */ + access_token: AccessToken; } + diff --git a/webapp/src/app/api/model/accessToken.ts b/webapp/src/app/api/model/accessToken.ts index 9505d3c6..f3fe259d 100644 --- a/webapp/src/app/api/model/accessToken.ts +++ b/webapp/src/app/api/model/accessToken.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,46 +10,50 @@ import { TokenType } from './tokenType'; import { UserRole } from './userRole'; -export interface AccessToken { - /** - * The unique identifier of the real account associated with this token. - */ - real_account_id: string; - /** - * The timestamp indicating when the token will expire. - */ - expires_at: string; - /** - * The epoch value for the token. Used for versioning of tokens. - */ - epoch?: number; - /** - * The type of the token, which is always ACCESS_TOKEN for this class. - */ - token_type?: TokenType; - /** - * A unique fingerprint of the user, used for additional security checks. - */ - user_fingerprint_hash: string; - /** - * The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation. - */ - effective_account_id: string; - /** - * The specific role this access token grants within its organization. - */ - effective_role?: UserRole; - /** - * The roles this access token grants within its organization. - */ - effective_roles?: Array; - /** - * The unique identifier of the organization associated with this access token. - */ - effective_organization_id: string; - /** - * The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes. - */ - raw_token: string; + +export interface AccessToken { + /** + * The unique identifier of the real account associated with this token. + */ + real_account_id: string; + /** + * The timestamp indicating when the token will expire. + */ + expires_at: string; + /** + * The epoch value for the token. Used for versioning of tokens. + */ + epoch?: number; + /** + * The type of the token, which is always ACCESS_TOKEN for this class. + */ + token_type?: TokenType; + /** + * A unique fingerprint of the user, used for additional security checks. + */ + user_fingerprint_hash: string; + /** + * The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation. + */ + effective_account_id: string; + /** + * The specific role this access token grants within its organization. + */ + effective_role?: UserRole; + /** + * The roles this access token grants within its organization. + */ + effective_roles?: Array; + /** + * The unique identifier of the organization associated with this access token. + */ + effective_organization_id: string; + /** + * The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes. + */ + raw_token: string; } -export namespace AccessToken {} +export namespace AccessToken { +} + + diff --git a/webapp/src/app/api/model/accountPage.ts b/webapp/src/app/api/model/accountPage.ts index 64c7f969..c92c4ba3 100644 --- a/webapp/src/app/api/model/accountPage.ts +++ b/webapp/src/app/api/model/accountPage.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 { AccountProfile } from './accountProfile'; -export interface AccountPage { - items: Array; - total: number; - page: number; - page_size: number; + +export interface AccountPage { + items: Array; + total: number; + page: number; + page_size: number; } + diff --git a/webapp/src/app/api/model/accountProfile.ts b/webapp/src/app/api/model/accountProfile.ts index a61b98ae..a7d7afa5 100644 --- a/webapp/src/app/api/model/accountProfile.ts +++ b/webapp/src/app/api/model/accountProfile.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,16 +9,18 @@ */ import { UserRole } from './userRole'; -export interface AccountProfile { - id: string; - email: string; - name: string; - roles: Array; - organization_id: string; - organization_name: string; - deleted: boolean; - activated: boolean; - is_current?: boolean; - is_real_account?: boolean; - is_impersonating?: boolean; + +export interface AccountProfile { + id: string; + email: string; + name: string; + roles: Array; + organization_id: string; + organization_name: string; + deleted: boolean; + activated: boolean; + is_current?: boolean; + is_real_account?: boolean; + is_impersonating?: boolean; } + diff --git a/webapp/src/app/api/model/allPatentsResponse.ts b/webapp/src/app/api/model/allPatentsResponse.ts index f9b5e8ad..dfe6fb24 100644 --- a/webapp/src/app/api/model/allPatentsResponse.ts +++ b/webapp/src/app/api/model/allPatentsResponse.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 { PatentEntry } from './patentEntry'; -export interface AllPatentsResponse { - total: number; - page: number; - size: number; - patents: Array; + +export interface AllPatentsResponse { + total: number; + page: number; + size: number; + patents: Array; } + diff --git a/webapp/src/app/api/model/author.ts b/webapp/src/app/api/model/author.ts index 0a050590..9ba12273 100644 --- a/webapp/src/app/api/model/author.ts +++ b/webapp/src/app/api/model/author.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,25 +15,27 @@ 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/authorWork.ts b/webapp/src/app/api/model/authorWork.ts deleted file mode 100644 index 93fd5c8d..00000000 --- a/webapp/src/app/api/model/authorWork.ts +++ /dev/null @@ -1,46 +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 { AuthorWorkInstitution } from './authorWorkInstitution'; -import { WorkTopic } from './workTopic'; - -export interface AuthorWork { - /** - * The ID of the work - */ - id: string; - /** - * The title of the work - */ - title: string; - /** - * The type of the work - */ - type: string; - /** - * The year the work was published - */ - publication_year: number; - /** - * The language code of the work - */ - language_code: string; - /** - * A list of institutions associated with the work - */ - institutions: Array; - /** - * A list of topics associated with the work - */ - topics: Array; - /** - * The number of citations the work has received - */ - cited_by_count: number; -} diff --git a/webapp/src/app/api/model/authorWorkInstitution.ts b/webapp/src/app/api/model/authorWorkInstitution.ts deleted file mode 100644 index 3bf46577..00000000 --- a/webapp/src/app/api/model/authorWorkInstitution.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 AuthorWorkInstitution { - /** - * The ID of the institution associated with the work - */ - institution_id: string; - /** - * The name of the institution associated with the work - */ - institution_name: string; - /** - * The country code of the institution associated with the work - */ - institution_country_code: string; -} diff --git a/webapp/src/app/api/model/authorWorkPage.ts b/webapp/src/app/api/model/authorWorkPage.ts deleted file mode 100644 index 3090ee70..00000000 --- a/webapp/src/app/api/model/authorWorkPage.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 { AuthorWork } from './authorWork'; - -export interface AuthorWorkPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; -} diff --git a/webapp/src/app/api/model/authorWorkPurposes.ts b/webapp/src/app/api/model/authorWorkPurposes.ts index e773989e..bbe4289a 100644 --- a/webapp/src/app/api/model/authorWorkPurposes.ts +++ b/webapp/src/app/api/model/authorWorkPurposes.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,20 +9,22 @@ */ import { SpecificWorkPurpose } from './specificWorkPurpose'; + /** * Represents the purposes of an author, including their ID and a list of specific work purposes. */ -export interface AuthorWorkPurposes { - /** - * The raw OpenAlex author id. - */ - raw_oa_author_id: string; - /** - * The total number of works for the author. - */ - total?: number; - /** - * The list of specific work purposes. - */ - purposes?: Array; +export interface AuthorWorkPurposes { + /** + * The raw OpenAlex author id. + */ + raw_oa_author_id: string; + /** + * The total number of works for the author. + */ + total?: number; + /** + * The list of specific work purposes. + */ + purposes?: Array; } + 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 f1b9d48e..db3a0bf0 100644 --- a/webapp/src/app/api/model/authorship.ts +++ b/webapp/src/app/api/model/authorship.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 { 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/autocompleteLocationItem.ts b/webapp/src/app/api/model/autocompleteLocationItem.ts index b07e699e..56a10e09 100644 --- a/webapp/src/app/api/model/autocompleteLocationItem.ts +++ b/webapp/src/app/api/model/autocompleteLocationItem.ts @@ -1,23 +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 AutocompleteLocationItem { - id: string; - display_name: string; - code: string; - type: AutocompleteLocationItem.TypeEnum; + +export interface AutocompleteLocationItem { + id: string; + display_name: string; + code: string; + type: AutocompleteLocationItem.TypeEnum; } export namespace AutocompleteLocationItem { - export const TypeEnum = { - Country: 'country', - Continent: 'continent', - } as const; - export type TypeEnum = (typeof TypeEnum)[keyof typeof TypeEnum]; + export const TypeEnum = { + Country: 'country', + Continent: 'continent' + } as const; + export type TypeEnum = typeof TypeEnum[keyof typeof TypeEnum]; } + + 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/bodyChangePassword.ts b/webapp/src/app/api/model/bodyChangePassword.ts index c76bafc4..b6454f0e 100644 --- a/webapp/src/app/api/model/bodyChangePassword.ts +++ b/webapp/src/app/api/model/bodyChangePassword.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 BodyChangePassword { - /** - * Current password - */ - current_password: string; - /** - * New password - */ - new_password: string; + +export interface BodyChangePassword { + /** + * Current password + */ + current_password: string; + /** + * New password + */ + new_password: string; } + diff --git a/webapp/src/app/api/model/bodyGetAccessToken.ts b/webapp/src/app/api/model/bodyGetAccessToken.ts index 3314146a..8e5df2ed 100644 --- a/webapp/src/app/api/model/bodyGetAccessToken.ts +++ b/webapp/src/app/api/model/bodyGetAccessToken.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 BodyGetAccessToken { - /** - * User\'s account ID - */ - real_account_id: string; - /** - * Effective account ID for the access token - */ - effective_account_id: string; + +export interface BodyGetAccessToken { + /** + * User\'s account ID + */ + real_account_id: string; + /** + * Effective account ID for the access token + */ + effective_account_id: string; } + diff --git a/webapp/src/app/api/model/bodyLogin.ts b/webapp/src/app/api/model/bodyLogin.ts index e4e8efd6..f4022b0b 100644 --- a/webapp/src/app/api/model/bodyLogin.ts +++ b/webapp/src/app/api/model/bodyLogin.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 BodyLogin { - /** - * User\'s account ID - */ - account_id: string; - /** - * One-time code sent to user\'s email - */ - email_code: string; + +export interface BodyLogin { + /** + * User\'s account ID + */ + account_id: string; + /** + * One-time code sent to user\'s email + */ + email_code: string; } + diff --git a/webapp/src/app/api/model/bodyRequestOtk.ts b/webapp/src/app/api/model/bodyRequestOtk.ts index 1600a002..ba1a396d 100644 --- a/webapp/src/app/api/model/bodyRequestOtk.ts +++ b/webapp/src/app/api/model/bodyRequestOtk.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 BodyRequestOtk { - /** - * User\'s email address - */ - email: string; - /** - * User\'s password - */ - password: string; + +export interface BodyRequestOtk { + /** + * User\'s email address + */ + email: string; + /** + * User\'s password + */ + password: string; } + diff --git a/webapp/src/app/api/model/bodyRequestPasswordReset.ts b/webapp/src/app/api/model/bodyRequestPasswordReset.ts index ec3222b5..2c9b4b13 100644 --- a/webapp/src/app/api/model/bodyRequestPasswordReset.ts +++ b/webapp/src/app/api/model/bodyRequestPasswordReset.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 BodyRequestPasswordReset { - /** - * User\'s email address - */ - email: string; + +export interface BodyRequestPasswordReset { + /** + * User\'s email address + */ + email: string; } + diff --git a/webapp/src/app/api/model/bodyResetPassword.ts b/webapp/src/app/api/model/bodyResetPassword.ts index 0e3b74aa..03e63c44 100644 --- a/webapp/src/app/api/model/bodyResetPassword.ts +++ b/webapp/src/app/api/model/bodyResetPassword.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 BodyResetPassword { - /** - * Password reset token from the reset link - */ - reset_token: string; - /** - * New password - */ - new_password: string; + +export interface BodyResetPassword { + /** + * Password reset token from the reset link + */ + reset_token: string; + /** + * New password + */ + new_password: string; } + diff --git a/webapp/src/app/api/model/bundProject.ts b/webapp/src/app/api/model/bundProject.ts index 9f291399..3463aa78 100644 --- a/webapp/src/app/api/model/bundProject.ts +++ b/webapp/src/app/api/model/bundProject.ts @@ -1,40 +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; + +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/bundProjectDetails.ts b/webapp/src/app/api/model/bundProjectDetails.ts index b61df06b..2193563c 100644 --- a/webapp/src/app/api/model/bundProjectDetails.ts +++ b/webapp/src/app/api/model/bundProjectDetails.ts @@ -1,55 +1,57 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Clean summary model for a Bund (federal) project, consolidating all fields into semantic English names with proper native types. */ -export interface BundProjectDetails { - /** - * The ID of the Bund project - */ - id: string; - funding_reference?: string | null; - title?: string | null; - description?: string | null; - joint_project?: string | null; - funding_type?: string | null; - funding_profile?: string | null; - funding_amount?: number | null; - funding_start_date?: string | null; - funding_end_date?: string | null; - duration?: string | null; - performance_plan_code?: string | null; - performance_plan_fullname?: string | null; - executing_agency?: string | null; - funding_recipient?: string | null; - project_agency?: string | null; - project_agency_fullname?: string | null; - department?: string | null; - department_fullname?: string | null; - division?: string | null; - location?: string | null; - municipality?: string | null; - state?: string | null; - country?: string | null; - municipality_code?: string | null; - publication_date?: string | null; - is_new?: boolean | null; - record_date?: string | null; - unix_timestamp?: number | null; - /** - * All persons associated with the Bund project (from nested Arb object) - */ - associated_persons?: Array; - /** - * All institutions associated with the Bund project - */ - institutions?: Array; +export interface BundProjectDetails { + /** + * The ID of the Bund project + */ + id: string; + funding_reference?: string | null; + title?: string | null; + description?: string | null; + joint_project?: string | null; + funding_type?: string | null; + funding_profile?: string | null; + funding_amount?: number | null; + funding_start_date?: string | null; + funding_end_date?: string | null; + duration?: string | null; + performance_plan_code?: string | null; + performance_plan_fullname?: string | null; + executing_agency?: string | null; + funding_recipient?: string | null; + project_agency?: string | null; + project_agency_fullname?: string | null; + department?: string | null; + department_fullname?: string | null; + division?: string | null; + location?: string | null; + municipality?: string | null; + state?: string | null; + country?: string | null; + municipality_code?: string | null; + publication_date?: string | null; + is_new?: boolean | null; + record_date?: string | null; + unix_timestamp?: number | null; + /** + * All persons associated with the Bund project (from nested Arb object) + */ + associated_persons?: Array; + /** + * All institutions associated with the Bund project + */ + institutions?: Array; } + diff --git a/webapp/src/app/api/model/bundProjectPage.ts b/webapp/src/app/api/model/bundProjectPage.ts index 6c38e7a6..10514bce 100644 --- a/webapp/src/app/api/model/bundProjectPage.ts +++ b/webapp/src/app/api/model/bundProjectPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,21 +9,23 @@ */ import { BundProject } from './bundProject'; -export interface BundProjectPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The bund projects on this page. - */ - elements?: Array; + +export interface BundProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The bund projects on this page. + */ + elements?: Array; } + diff --git a/webapp/src/app/api/model/careerMetrics.ts b/webapp/src/app/api/model/careerMetrics.ts index eb84c19f..abb58689 100644 --- a/webapp/src/app/api/model/careerMetrics.ts +++ b/webapp/src/app/api/model/careerMetrics.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 CareerMetrics { - first_publication_year?: number | null; - last_publication_year?: number | null; - career_age?: number | null; - career_span?: number | null; - career_stage?: string | null; - /** - * Number of distinct years with at least one publication. - */ - active_years?: number; - /** - * Number of publications used for career metrics. - */ - publication_count?: number; - publications_per_active_year?: number | null; - publications_per_career_year?: number | null; - years_since_last_publication?: number | null; - /** - * True if publication years look suspicious. - */ - has_suspicious_publication_years?: boolean; + +export interface CareerMetrics { + first_publication_year?: number | null; + last_publication_year?: number | null; + career_age?: number | null; + career_span?: number | null; + career_stage?: string | null; + /** + * Number of distinct years with at least one publication. + */ + active_years?: number; + /** + * Number of publications used for career metrics. + */ + publication_count?: number; + publications_per_active_year?: number | null; + publications_per_career_year?: number | null; + years_since_last_publication?: number | null; + /** + * True if publication years look suspicious. + */ + has_suspicious_publication_years?: boolean; } + 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/companyConnection.ts b/webapp/src/app/api/model/companyConnection.ts index 2824c543..4ce31814 100644 --- a/webapp/src/app/api/model/companyConnection.ts +++ b/webapp/src/app/api/model/companyConnection.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,17 +9,19 @@ */ import { MatchedOfficer } from './matchedOfficer'; -export interface CompanyConnection { - company_number?: string | null; - company_name?: string | null; - company_status?: string | null; - register_art?: string | null; - register_nummer?: string | null; - native_company_number?: string | null; - registrar?: string | null; - registered_office?: string | null; - registered_address?: string | null; - retrieved_at?: string | null; - matched_officers?: Array; - officers?: Array; + +export interface CompanyConnection { + company_number?: string | null; + company_name?: string | null; + company_status?: string | null; + register_art?: string | null; + register_nummer?: string | null; + native_company_number?: string | null; + registrar?: string | null; + registered_office?: string | null; + registered_address?: string | null; + retrieved_at?: string | null; + matched_officers?: Array; + officers?: Array; } + diff --git a/webapp/src/app/api/model/companyConnectionsResponse.ts b/webapp/src/app/api/model/companyConnectionsResponse.ts index f4f5f42f..9beabd1e 100644 --- a/webapp/src/app/api/model/companyConnectionsResponse.ts +++ b/webapp/src/app/api/model/companyConnectionsResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,15 +9,17 @@ */ import { CompanyConnection } from './companyConnection'; -export interface CompanyConnectionsResponse { - author_id: string; - display_name?: string | null; - is_ude_author: boolean; - institution_scope?: string | null; - matching_institutions?: Array; - matching_method?: string | null; - company_count: number; - has_more_results: boolean; - common_name_warning: boolean; - connections?: Array; + +export interface CompanyConnectionsResponse { + author_id: string; + display_name?: string | null; + is_ude_author: boolean; + institution_scope?: string | null; + matching_institutions?: Array; + matching_method?: string | null; + company_count: number; + has_more_results: boolean; + common_name_warning: boolean; + connections?: Array; } + diff --git a/webapp/src/app/api/model/cordisEuProject.ts b/webapp/src/app/api/model/cordisEuProject.ts index 8d408ad6..f18dd3d4 100644 --- a/webapp/src/app/api/model/cordisEuProject.ts +++ b/webapp/src/app/api/model/cordisEuProject.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,30 +10,32 @@ import { Keywords } from './keywords'; import { Topics } from './topics'; -export interface CordisEuProject { - /** - * Unique identifier for the project, typically the CORDIS ID - */ - id: string; - rcn?: string | null; - acronym?: string | null; - title?: string | null; - objective?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - subCall?: string | null; - topics?: Topics | null; - nature?: string | null; - status?: string | null; - ecMaxContribution?: number | null; - totalCost?: number | null; - startDate?: string | null; - endDate?: string | null; - ecSignatureDate?: string | null; - contentUpdateDate?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - keywords?: Keywords | null; + +export interface CordisEuProject { + /** + * Unique identifier for the project, typically the CORDIS ID + */ + id: string; + rcn?: string | null; + acronym?: string | null; + title?: string | null; + objective?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + subCall?: string | null; + topics?: Topics | null; + nature?: string | null; + status?: string | null; + ecMaxContribution?: number | null; + totalCost?: number | null; + startDate?: string | null; + endDate?: string | null; + ecSignatureDate?: string | null; + contentUpdateDate?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + keywords?: Keywords | null; } + diff --git a/webapp/src/app/api/model/cordisEuProjectPage.ts b/webapp/src/app/api/model/cordisEuProjectPage.ts index 8dc900f7..393f6db8 100644 --- a/webapp/src/app/api/model/cordisEuProjectPage.ts +++ b/webapp/src/app/api/model/cordisEuProjectPage.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 { CordisEuProject } from './cordisEuProject'; -export interface CordisEuProjectPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The CORDIS EU projects on this page. - */ - elements?: Array; + +export interface CordisEuProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The CORDIS EU projects on this page. + */ + elements?: Array; } + 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/createAccountRequest.ts b/webapp/src/app/api/model/createAccountRequest.ts index c38fce15..b2393cc2 100644 --- a/webapp/src/app/api/model/createAccountRequest.ts +++ b/webapp/src/app/api/model/createAccountRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,11 +9,13 @@ */ import { UserRole } from './userRole'; -export interface CreateAccountRequest { - email: string; - name: string; - roles?: Array; - organization_id: string; - password: string; - openalex_person_id?: string | null; + +export interface CreateAccountRequest { + email: string; + name: string; + roles?: Array; + organization_id: string; + password: string; + openalex_person_id?: string | null; } + diff --git a/webapp/src/app/api/model/createOrganizationRequest.ts b/webapp/src/app/api/model/createOrganizationRequest.ts index 94aacb80..fffb5457 100644 --- a/webapp/src/app/api/model/createOrganizationRequest.ts +++ b/webapp/src/app/api/model/createOrganizationRequest.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface CreateOrganizationRequest { - name: string; - other_inst_id?: string | null; + +export interface CreateOrganizationRequest { + name: string; + other_inst_id?: string | null; } + diff --git a/webapp/src/app/api/model/createPersonBookmark.ts b/webapp/src/app/api/model/createPersonBookmark.ts index d9d69bea..e2e196dd 100644 --- a/webapp/src/app/api/model/createPersonBookmark.ts +++ b/webapp/src/app/api/model/createPersonBookmark.ts @@ -1,13 +1,15 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface CreatePersonBookmark { - person_name?: string | null; + +export interface CreatePersonBookmark { + person_name?: string | null; } + diff --git a/webapp/src/app/api/model/customAuthor.ts b/webapp/src/app/api/model/customAuthor.ts index 6fd54c51..0cf7eb21 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 @@ -16,24 +16,26 @@ 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; - career_metrics?: CareerMetrics | 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; + career_metrics?: CareerMetrics | null; } + diff --git a/webapp/src/app/api/model/customAuthorsListResponse.ts b/webapp/src/app/api/model/customAuthorsListResponse.ts index 71f691a2..3c80ddf5 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 @@ -11,9 +11,11 @@ import { Meta } from './meta'; import { CustomAuthor } from './customAuthor'; 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/dashboardStatisticValue.ts b/webapp/src/app/api/model/dashboardStatisticValue.ts index 7666aee8..928bdd76 100644 --- a/webapp/src/app/api/model/dashboardStatisticValue.ts +++ b/webapp/src/app/api/model/dashboardStatisticValue.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DashboardStatisticValue { - institution_id: string; - organization_name: string; - value: number; + +export interface DashboardStatisticValue { + institution_id: string; + organization_name: string; + value: number; } + diff --git a/webapp/src/app/api/model/dashboardStatistics.ts b/webapp/src/app/api/model/dashboardStatistics.ts index 28d2527c..ba33382d 100644 --- a/webapp/src/app/api/model/dashboardStatistics.ts +++ b/webapp/src/app/api/model/dashboardStatistics.ts @@ -1,20 +1,22 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface DashboardStatistics { - institution_id: string; - organization_name: string; - publications: number; - persons: number; - projects: number; - dfg_projects: number; - eu_projects: number; - bmbf_projects: number; + +export interface DashboardStatistics { + institution_id: string; + organization_name: string; + publications: number; + persons: number; + projects: number; + dfg_projects: number; + eu_projects: number; + bmbf_projects: number; } + diff --git a/webapp/src/app/api/model/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/dfgProjectDetails.ts b/webapp/src/app/api/model/dfgProjectDetails.ts index 58ece5f7..5fe29ff9 100644 --- a/webapp/src/app/api/model/dfgProjectDetails.ts +++ b/webapp/src/app/api/model/dfgProjectDetails.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. */ + /** * Clean summary model for a DFG project, consolidating all person roles and institution references into unified lists. */ -export interface DfgProjectDetails { - /** - * The ID of the DFG project - */ - id: string; - link?: string | null; - title?: string | null; - description?: string | null; - project_identifier?: string | null; - funding_start_date?: string | null; - funding_end_date?: string | null; - dfg_procedure?: string | null; - subject_area?: string | null; - funding_type?: string | null; - international_reference?: string | null; - website?: string | null; - /** - * All persons associated with the DFG project (any role) - */ - associated_persons?: Array; - /** - * All institutions associated with the DFG project - */ - institutions?: Array; - subproject_of?: string | null; +export interface DfgProjectDetails { + /** + * The ID of the DFG project + */ + id: string; + link?: string | null; + title?: string | null; + description?: string | null; + project_identifier?: string | null; + funding_start_date?: string | null; + funding_end_date?: string | null; + dfg_procedure?: string | null; + subject_area?: string | null; + funding_type?: string | null; + international_reference?: string | null; + website?: string | null; + /** + * All persons associated with the DFG project (any role) + */ + associated_persons?: Array; + /** + * All institutions associated with the DFG project + */ + institutions?: Array; + subproject_of?: string | null; } + diff --git a/webapp/src/app/api/model/dfgProjectPage.ts b/webapp/src/app/api/model/dfgProjectPage.ts index a05d81d2..8f67e170 100644 --- a/webapp/src/app/api/model/dfgProjectPage.ts +++ b/webapp/src/app/api/model/dfgProjectPage.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 { DfgProjectSummary } from './dfgProjectSummary'; -export interface DfgProjectPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The DFG projects on this page. - */ - elements?: Array; + +export interface DfgProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The DFG projects on this page. + */ + elements?: Array; } + diff --git a/webapp/src/app/api/model/dfgProjectSummary.ts b/webapp/src/app/api/model/dfgProjectSummary.ts index 10c05a08..145dba4a 100644 --- a/webapp/src/app/api/model/dfgProjectSummary.ts +++ b/webapp/src/app/api/model/dfgProjectSummary.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. */ -export interface DfgProjectSummary { - /** - * The unique identifier of the DFG project. - */ - id: string; - link?: string | null; - title?: string | null; - professional_classification?: string | null; - funding_start?: string | null; - funding_end?: string | null; - /** - * The names of the researchers involved in the DFG project. - */ - names?: Array; + +export interface DfgProjectSummary { + /** + * The unique identifier of the DFG project. + */ + id: string; + link?: string | null; + title?: string | null; + professional_classification?: string | null; + funding_start?: string | null; + funding_end?: string | null; + /** + * The names of the researchers involved in the DFG project. + */ + names?: Array; } + diff --git a/webapp/src/app/api/model/euCordisProjectResponse.ts b/webapp/src/app/api/model/euCordisProjectResponse.ts index f0dc272a..63e9084d 100644 --- a/webapp/src/app/api/model/euCordisProjectResponse.ts +++ b/webapp/src/app/api/model/euCordisProjectResponse.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,15 +9,17 @@ */ import { EuProjectData } from './euProjectData'; + /** * Response model for EU Cordis project endpoints. */ -export interface EuCordisProjectResponse { - /** - * Indicates if the request was successful - */ - success: boolean; - project_type?: string | null; - eu_project_data?: EuProjectData | null; - error?: string | null; +export interface EuCordisProjectResponse { + /** + * Indicates if the request was successful + */ + success: boolean; + project_type?: string | null; + eu_project_data?: EuProjectData | null; + error?: string | null; } + diff --git a/webapp/src/app/api/model/euOrganizationProjectSummary.ts b/webapp/src/app/api/model/euOrganizationProjectSummary.ts index af085ff3..3cc10f0a 100644 --- a/webapp/src/app/api/model/euOrganizationProjectSummary.ts +++ b/webapp/src/app/api/model/euOrganizationProjectSummary.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. */ -export interface EuOrganizationProjectSummary { - /** - * The unique identifier of the organization. - */ - organization_id: string; - /** - * The unique identifier of the project. - */ - project_id: string; - title?: string | null; - start_date?: string | null; - end_date?: string | null; - acronym?: string | null; - ec_contribution?: number | null; + +export interface EuOrganizationProjectSummary { + /** + * The unique identifier of the organization. + */ + organization_id: string; + /** + * The unique identifier of the project. + */ + project_id: string; + title?: string | null; + start_date?: string | null; + end_date?: string | null; + acronym?: string | null; + ec_contribution?: number | null; } + diff --git a/webapp/src/app/api/model/euOrganizationProjectSummaryPage.ts b/webapp/src/app/api/model/euOrganizationProjectSummaryPage.ts index 90166a7e..9d57d5b4 100644 --- a/webapp/src/app/api/model/euOrganizationProjectSummaryPage.ts +++ b/webapp/src/app/api/model/euOrganizationProjectSummaryPage.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 { EuOrganizationProjectSummary } from './euOrganizationProjectSummary'; -export interface EuOrganizationProjectSummaryPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The organization project summaries on this page. - */ - elements?: Array; + +export interface EuOrganizationProjectSummaryPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The organization project summaries on this page. + */ + elements?: Array; } + diff --git a/webapp/src/app/api/model/euProjectData.ts b/webapp/src/app/api/model/euProjectData.ts index 34639d19..6acedaf5 100644 --- a/webapp/src/app/api/model/euProjectData.ts +++ b/webapp/src/app/api/model/euProjectData.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,47 +23,49 @@ import { Fp7ReportSummary } from './fp7ReportSummary'; import { HEUReportSummary } from './hEUReportSummary'; import { HEUProjectDetails } from './hEUProjectDetails'; + /** * The project data */ -export interface EuProjectData { - acronym?: string; - contentUpdateDate?: string; - ecMaxContribution?: number; - ecSignatureDate?: string; - endDate?: string; - frameworkProgramme?: string; - fundingScheme?: string; - grantDoi?: string; - humanValidated?: boolean; - id?: string; - keywords?: string; - legalBasis?: string; - masterCall?: string; - nature?: string; - objective?: string; - rcn?: string; - startDate?: string; - status?: string; - subCall?: string; - title?: string; - topics?: string; - totalCost?: number; - organizations?: Array; - publications?: Array; - iprs?: Array; - report_summaries?: Array; - topicsList?: Array; - web_links?: Array; - eurosciVoc?: Array; - legalBasisList?: Array; - organizationCount?: number; - publicationCount?: number; - iprCount?: number; - deliverables?: Array; - reportSummaries?: Array; - webLinks?: Array; - ercPrincipalInvestigators?: Array; - deliverableCount?: number; - ercPiCount?: number; +export interface EuProjectData { + acronym?: string; + contentUpdateDate?: string; + ecMaxContribution?: number; + ecSignatureDate?: string; + endDate?: string; + frameworkProgramme?: string; + fundingScheme?: string; + grantDoi?: string; + humanValidated?: boolean; + id?: string; + keywords?: string; + legalBasis?: string; + masterCall?: string; + nature?: string; + objective?: string; + rcn?: string; + startDate?: string; + status?: string; + subCall?: string; + title?: string; + topics?: string; + totalCost?: number; + organizations?: Array; + publications?: Array; + iprs?: Array; + report_summaries?: Array; + topicsList?: Array; + web_links?: Array; + eurosciVoc?: Array; + legalBasisList?: Array; + organizationCount?: number; + publicationCount?: number; + iprCount?: number; + deliverables?: Array; + reportSummaries?: Array; + webLinks?: Array; + ercPrincipalInvestigators?: Array; + deliverableCount?: number; + ercPiCount?: number; } + diff --git a/webapp/src/app/api/model/extractedKeywords.ts b/webapp/src/app/api/model/extractedKeywords.ts index 4038c211..8e74c6e0 100644 --- a/webapp/src/app/api/model/extractedKeywords.ts +++ b/webapp/src/app/api/model/extractedKeywords.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,17 +9,19 @@ */ import { KeywordEntryWithTopic } from './keywordEntryWithTopic'; -export interface ExtractedKeywords { - /** - * The extracted broad keywords from text. - */ - broad_keywords: Array; - /** - * The extracted coarse-grained keywords from text. - */ - coarse_grained: Array; - /** - * The extracted fine-grained keywords from text. - */ - fine_grained: Array; + +export interface ExtractedKeywords { + /** + * The extracted broad keywords from text. + */ + broad_keywords: Array; + /** + * The extracted coarse-grained keywords from text. + */ + coarse_grained: Array; + /** + * The extracted fine-grained keywords from text. + */ + fine_grained: Array; } + diff --git a/webapp/src/app/api/model/extractedKeywordsLLM.ts b/webapp/src/app/api/model/extractedKeywordsLLM.ts index b49b98d7..b12957f6 100644 --- a/webapp/src/app/api/model/extractedKeywordsLLM.ts +++ b/webapp/src/app/api/model/extractedKeywordsLLM.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,17 +9,19 @@ */ import { KeywordEntry } from './keywordEntry'; -export interface ExtractedKeywordsLLM { - /** - * The extracted broad keywords from text. - */ - broad_keywords: Array; - /** - * The extracted coarse-grained keywords from text. - */ - coarse_grained: Array; - /** - * The extracted fine-grained keywords from text. - */ - fine_grained: Array; + +export interface ExtractedKeywordsLLM { + /** + * The extracted broad keywords from text. + */ + broad_keywords: Array; + /** + * The extracted coarse-grained keywords from text. + */ + coarse_grained: Array; + /** + * The extracted fine-grained keywords from text. + */ + fine_grained: Array; } + diff --git a/webapp/src/app/api/model/extractedKeywordsResponse.ts b/webapp/src/app/api/model/extractedKeywordsResponse.ts index 8fe10a5f..43731b7c 100644 --- a/webapp/src/app/api/model/extractedKeywordsResponse.ts +++ b/webapp/src/app/api/model/extractedKeywordsResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,17 +10,19 @@ import { ExtractedKeywordsLLM } from './extractedKeywordsLLM'; import { ExtractedKeywords } from './extractedKeywords'; -export interface ExtractedKeywordsResponse { - results_llm?: ExtractedKeywordsLLM | null; - results?: ExtractedKeywords | null; - /** - * The source of the input text, e.g., \'url\', \'text\', or \'keywords\'. - */ - source: string; - source_url?: string | null; - /** - * The actual content from which keywords were extracted. - */ - source_content: string; - duration?: number | null; + +export interface ExtractedKeywordsResponse { + results_llm?: ExtractedKeywordsLLM | null; + results?: ExtractedKeywords | null; + /** + * The source of the input text, e.g., \'url\', \'text\', or \'keywords\'. + */ + source: string; + source_url?: string | null; + /** + * The actual content from which keywords were extracted. + */ + source_content: string; + duration?: number | null; } + diff --git a/webapp/src/app/api/model/fileUpload.ts b/webapp/src/app/api/model/fileUpload.ts index 921db4c3..61722b2f 100644 --- a/webapp/src/app/api/model/fileUpload.ts +++ b/webapp/src/app/api/model/fileUpload.ts @@ -1,24 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface FileUpload { - /** - * The name of the uploaded file. - */ - filename: string; - /** - * The base64-encoded content of the uploaded file. - */ - content_base64: string; - /** - * The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc. - */ - mime_type: string; + +export interface FileUpload { + /** + * The name of the uploaded file. + */ + filename: string; + /** + * The base64-encoded content of the uploaded file. + */ + content_base64: string; + /** + * The MIME type of the uploaded file, e.g., \'application/pdf\', \'image/png\', etc. + */ + mime_type: string; } + diff --git a/webapp/src/app/api/model/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/fp7EurosciVoc.ts b/webapp/src/app/api/model/fp7EurosciVoc.ts index 14ae95bc..fb7e8deb 100644 --- a/webapp/src/app/api/model/fp7EurosciVoc.ts +++ b/webapp/src/app/api/model/fp7EurosciVoc.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. */ + /** * Fp7EurosciVoc */ -export interface Fp7EurosciVoc { - code?: string | null; - description?: string | null; - id?: string | null; - path?: string | null; - projectID?: string | null; - title?: string | null; +export interface Fp7EurosciVoc { + code?: string | null; + description?: string | null; + id?: string | null; + path?: string | null; + projectID?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/fp7LegalBasis.ts b/webapp/src/app/api/model/fp7LegalBasis.ts index bf5ef53e..89a05742 100644 --- a/webapp/src/app/api/model/fp7LegalBasis.ts +++ b/webapp/src/app/api/model/fp7LegalBasis.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. */ + /** * Fp7LegalBasis */ -export interface Fp7LegalBasis { - id?: string | null; - legalBasis?: string | null; - projectID?: string | null; - title?: string | null; - uniqueProgrammePart?: string | null; +export interface Fp7LegalBasis { + id?: string | null; + legalBasis?: string | null; + projectID?: string | null; + title?: string | null; + uniqueProgrammePart?: string | null; } + diff --git a/webapp/src/app/api/model/fp7Organization.ts b/webapp/src/app/api/model/fp7Organization.ts index a46d9d02..2989a873 100644 --- a/webapp/src/app/api/model/fp7Organization.ts +++ b/webapp/src/app/api/model/fp7Organization.ts @@ -1,41 +1,43 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Fp7Organization */ -export interface Fp7Organization { - SME?: boolean | null; - active?: boolean | null; - activityType?: string | null; - city?: string | null; - contactForm?: string | null; - contentUpdateDate?: string | null; - country?: string | null; - ecContribution?: number | null; - endOfParticipation?: boolean | null; - geolocation?: string | null; - id?: string | null; - name?: string | null; - netEcContribution?: number | null; - nutsCode?: string | null; - order?: number | null; - organisationID?: string | null; - organizationURL?: string | null; - postCode?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - role?: string | null; - shortName?: string | null; - street?: string | null; - totalCost?: number | null; - vatNumber?: string | null; +export interface Fp7Organization { + SME?: boolean | null; + active?: boolean | null; + activityType?: string | null; + city?: string | null; + contactForm?: string | null; + contentUpdateDate?: string | null; + country?: string | null; + ecContribution?: number | null; + endOfParticipation?: boolean | null; + geolocation?: string | null; + id?: string | null; + name?: string | null; + netEcContribution?: number | null; + nutsCode?: string | null; + order?: number | null; + organisationID?: string | null; + organizationURL?: string | null; + postCode?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + role?: string | null; + shortName?: string | null; + street?: string | null; + totalCost?: number | null; + vatNumber?: string | null; } + diff --git a/webapp/src/app/api/model/fp7ProjectDetails.ts b/webapp/src/app/api/model/fp7ProjectDetails.ts index 034a986d..a7dce634 100644 --- a/webapp/src/app/api/model/fp7ProjectDetails.ts +++ b/webapp/src/app/api/model/fp7ProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,41 +16,43 @@ import { Fp7ProjectIPR } from './fp7ProjectIPR'; import { Fp7Organization } from './fp7Organization'; import { Fp7LegalBasis } from './fp7LegalBasis'; + /** * Comprehensive FP7 Project model combining all related entities. This model extends the base Fp7Project with all associated data. */ -export interface Fp7ProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - iprs?: Array | null; - report_summaries?: Array | null; - topicsList?: Array | null; - web_links?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - iprCount?: number | null; +export interface Fp7ProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + iprs?: Array | null; + report_summaries?: Array | null; + topicsList?: Array | null; + web_links?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + iprCount?: number | null; } + diff --git a/webapp/src/app/api/model/fp7ProjectIPR.ts b/webapp/src/app/api/model/fp7ProjectIPR.ts index 37040026..f35487c4 100644 --- a/webapp/src/app/api/model/fp7ProjectIPR.ts +++ b/webapp/src/app/api/model/fp7ProjectIPR.ts @@ -1,34 +1,36 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Fp7ProjectIPR */ -export interface Fp7ProjectIPR { - applicantName?: string | null; - applicationDate?: string | null; - applicationIdentifier?: string | null; - applicationKind?: string | null; - applicationPrefix?: string | null; - awardDate?: string | null; - awardIdentifier?: string | null; - awardKind?: string | null; - awardPrefix?: string | null; - epoAppUrl?: string | null; - epoPubUrl?: string | null; - id?: string | null; - organisationID?: string | null; - patentFamilyIdentifier?: string | null; - patentType?: string | null; - priorityDate?: string | null; - projectID?: string | null; - title?: string | null; - type?: string | null; +export interface Fp7ProjectIPR { + applicantName?: string | null; + applicationDate?: string | null; + applicationIdentifier?: string | null; + applicationKind?: string | null; + applicationPrefix?: string | null; + awardDate?: string | null; + awardIdentifier?: string | null; + awardKind?: string | null; + awardPrefix?: string | null; + epoAppUrl?: string | null; + epoPubUrl?: string | null; + id?: string | null; + organisationID?: string | null; + patentFamilyIdentifier?: string | null; + patentType?: string | null; + priorityDate?: string | null; + projectID?: string | null; + title?: string | null; + type?: string | null; } + diff --git a/webapp/src/app/api/model/fp7Publication.ts b/webapp/src/app/api/model/fp7Publication.ts index 34fba260..fd0e2491 100644 --- a/webapp/src/app/api/model/fp7Publication.ts +++ b/webapp/src/app/api/model/fp7Publication.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. */ + /** * Fp7Publication */ -export interface Fp7Publication { - authors?: string | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface Fp7Publication { + authors?: string | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } + diff --git a/webapp/src/app/api/model/fp7ReportSummary.ts b/webapp/src/app/api/model/fp7ReportSummary.ts index 084d2ba8..f0413439 100644 --- a/webapp/src/app/api/model/fp7ReportSummary.ts +++ b/webapp/src/app/api/model/fp7ReportSummary.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. */ + /** * Fp7ReportSummary */ -export interface Fp7ReportSummary { - attachments?: string | null; - contentUpdateDate?: string | null; - id?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - title?: string | null; +export interface Fp7ReportSummary { + attachments?: string | null; + contentUpdateDate?: string | null; + id?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/fp7Topic.ts b/webapp/src/app/api/model/fp7Topic.ts index 4202cdb0..f39a021e 100644 --- a/webapp/src/app/api/model/fp7Topic.ts +++ b/webapp/src/app/api/model/fp7Topic.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. */ + /** * Fp7Topic */ -export interface Fp7Topic { - id?: string | null; - projectID?: string | null; - title?: string | null; - topic?: string | null; +export interface Fp7Topic { + id?: string | null; + projectID?: string | null; + title?: string | null; + topic?: string | null; } + diff --git a/webapp/src/app/api/model/fp7WebLink.ts b/webapp/src/app/api/model/fp7WebLink.ts index 67071bb8..eeaff7ab 100644 --- a/webapp/src/app/api/model/fp7WebLink.ts +++ b/webapp/src/app/api/model/fp7WebLink.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. */ + /** * Fp7WebLink */ -export interface Fp7WebLink { - archivedDate?: string | null; - availableLanguages?: string | null; - id?: string | null; - linkId?: string | null; - projectID?: string | null; - represents?: string | null; - source?: string | null; - status?: string | null; - type?: string | null; - url?: string | null; +export interface Fp7WebLink { + archivedDate?: string | null; + availableLanguages?: string | null; + id?: string | null; + linkId?: string | null; + projectID?: string | null; + represents?: string | null; + source?: string | null; + status?: string | null; + type?: string | null; + url?: string | null; } + diff --git a/webapp/src/app/api/model/funderByAuthor.ts b/webapp/src/app/api/model/funderByAuthor.ts index c62110e7..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 @@ -11,13 +11,15 @@ 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 }; - publication_details?: { [key: string]: 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; }; + publication_details?: { [key: string]: PublicationDetailByFunder; }; } + 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/fundingProject.ts b/webapp/src/app/api/model/fundingProject.ts index fb8204e3..a53c64f1 100644 --- a/webapp/src/app/api/model/fundingProject.ts +++ b/webapp/src/app/api/model/fundingProject.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,19 +9,23 @@ */ import { ProjectType } from './projectType'; -export interface FundingProject { - /** - * The type of the project. - */ - type: ProjectType; - /** - * The unique identifier of the project. - */ - id: string; - title?: string | null; - acronym?: string | null; - start_date?: string | null; - end_date?: string | null; - funding_amount?: number | null; + +export interface FundingProject { + /** + * The type of the project. + */ + type: ProjectType; + /** + * The unique identifier of the project. + */ + id: string; + title?: string | null; + acronym?: string | null; + start_date?: string | null; + end_date?: string | null; + funding_amount?: number | null; } -export namespace FundingProject {} +export namespace FundingProject { +} + + diff --git a/webapp/src/app/api/model/fundingProjectPage.ts b/webapp/src/app/api/model/fundingProjectPage.ts index e0996525..db43c9c4 100644 --- a/webapp/src/app/api/model/fundingProjectPage.ts +++ b/webapp/src/app/api/model/fundingProjectPage.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 { FundingProject } from './fundingProject'; -export interface FundingProjectPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The funding projects on this page. - */ - elements?: Array; + +export interface FundingProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The funding projects on this page. + */ + elements?: 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/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/h2020Deliverable.ts b/webapp/src/app/api/model/h2020Deliverable.ts index ccb837a1..390d2c7a 100644 --- a/webapp/src/app/api/model/h2020Deliverable.ts +++ b/webapp/src/app/api/model/h2020Deliverable.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. */ + /** * H2020Deliverable */ -export interface H2020Deliverable { - collection?: string | null; - contentUpdateDate?: string | null; - deliverableType?: string | null; - description?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - url?: string | null; +export interface H2020Deliverable { + collection?: string | null; + contentUpdateDate?: string | null; + deliverableType?: string | null; + description?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + url?: string | null; } + diff --git a/webapp/src/app/api/model/h2020ErcPI.ts b/webapp/src/app/api/model/h2020ErcPI.ts index d6e2324e..48ae3ff0 100644 --- a/webapp/src/app/api/model/h2020ErcPI.ts +++ b/webapp/src/app/api/model/h2020ErcPI.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. */ + /** * H2020ErcPI */ -export interface H2020ErcPI { - firstName?: string | null; - fundingScheme?: string | null; - id?: string | null; - lastName?: string | null; - organisationID?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - title?: string | null; +export interface H2020ErcPI { + firstName?: string | null; + fundingScheme?: string | null; + id?: string | null; + lastName?: string | null; + organisationID?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/h2020EurosciVoc.ts b/webapp/src/app/api/model/h2020EurosciVoc.ts index b275e94e..7d1ea931 100644 --- a/webapp/src/app/api/model/h2020EurosciVoc.ts +++ b/webapp/src/app/api/model/h2020EurosciVoc.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. */ + /** * H2020EurosciVoc */ -export interface H2020EurosciVoc { - code?: string | null; - description?: string | null; - id?: string | null; - path?: string | null; - projectID?: string | null; - title?: string | null; +export interface H2020EurosciVoc { + code?: string | null; + description?: string | null; + id?: string | null; + path?: string | null; + projectID?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/h2020LegalBasis.ts b/webapp/src/app/api/model/h2020LegalBasis.ts index e5846466..d247488d 100644 --- a/webapp/src/app/api/model/h2020LegalBasis.ts +++ b/webapp/src/app/api/model/h2020LegalBasis.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. */ + /** * H2020LegalBasis */ -export interface H2020LegalBasis { - id?: string | null; - legalBasis?: string | null; - projectID?: string | null; - title?: string | null; - uniqueProgrammePart?: string | null; +export interface H2020LegalBasis { + id?: string | null; + legalBasis?: string | null; + projectID?: string | null; + title?: string | null; + uniqueProgrammePart?: string | null; } + diff --git a/webapp/src/app/api/model/h2020Organization.ts b/webapp/src/app/api/model/h2020Organization.ts index 26a5acb9..003a00ed 100644 --- a/webapp/src/app/api/model/h2020Organization.ts +++ b/webapp/src/app/api/model/h2020Organization.ts @@ -1,41 +1,43 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * H2020Organization */ -export interface H2020Organization { - SME?: boolean | null; - active?: boolean | null; - activityType?: string | null; - city?: string | null; - contactForm?: string | null; - contentUpdateDate?: string | null; - country?: string | null; - ecContribution?: number | null; - endOfParticipation?: boolean | null; - geolocation?: string | null; - id?: string | null; - name?: string | null; - netEcContribution?: number | null; - nutsCode?: string | null; - order?: number | null; - organisationID?: string | null; - organizationURL?: string | null; - postCode?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - role?: string | null; - shortName?: string | null; - street?: string | null; - totalCost?: number | null; - vatNumber?: string | null; +export interface H2020Organization { + SME?: boolean | null; + active?: boolean | null; + activityType?: string | null; + city?: string | null; + contactForm?: string | null; + contentUpdateDate?: string | null; + country?: string | null; + ecContribution?: number | null; + endOfParticipation?: boolean | null; + geolocation?: string | null; + id?: string | null; + name?: string | null; + netEcContribution?: number | null; + nutsCode?: string | null; + order?: number | null; + organisationID?: string | null; + organizationURL?: string | null; + postCode?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + role?: string | null; + shortName?: string | null; + street?: string | null; + totalCost?: number | null; + vatNumber?: string | null; } + diff --git a/webapp/src/app/api/model/h2020ProjectDetails.ts b/webapp/src/app/api/model/h2020ProjectDetails.ts index f06b2fe5..7d08134e 100644 --- a/webapp/src/app/api/model/h2020ProjectDetails.ts +++ b/webapp/src/app/api/model/h2020ProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -17,43 +17,45 @@ import { H2020Topic } from './h2020Topic'; import { H2020EurosciVoc } from './h2020EurosciVoc'; import { H2020Organization } from './h2020Organization'; + /** * Comprehensive Horizon 2020 Project model combining all related entities. This model extends the base H2020Project with all associated data. */ -export interface H2020ProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - deliverables?: Array | null; - reportSummaries?: Array | null; - topicsList?: Array | null; - webLinks?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - ercPrincipalInvestigators?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - deliverableCount?: number | null; - ercPiCount?: number | null; +export interface H2020ProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + deliverables?: Array | null; + reportSummaries?: Array | null; + topicsList?: Array | null; + webLinks?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + ercPrincipalInvestigators?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + deliverableCount?: number | null; + ercPiCount?: number | null; } + diff --git a/webapp/src/app/api/model/h2020Publication.ts b/webapp/src/app/api/model/h2020Publication.ts index bb84dd6e..945e22d2 100644 --- a/webapp/src/app/api/model/h2020Publication.ts +++ b/webapp/src/app/api/model/h2020Publication.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. */ + /** * H2020Publication */ -export interface H2020Publication { - authors?: string | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface H2020Publication { + authors?: string | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } + diff --git a/webapp/src/app/api/model/h2020ReportSummary.ts b/webapp/src/app/api/model/h2020ReportSummary.ts index 2a9989c8..a5975ffb 100644 --- a/webapp/src/app/api/model/h2020ReportSummary.ts +++ b/webapp/src/app/api/model/h2020ReportSummary.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. */ + /** * H2020ReportSummary */ -export interface H2020ReportSummary { - attachments?: string | null; - contentUpdateDate?: string | null; - id?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - title?: string | null; +export interface H2020ReportSummary { + attachments?: string | null; + contentUpdateDate?: string | null; + id?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/h2020Topic.ts b/webapp/src/app/api/model/h2020Topic.ts index 8573a661..8ddb1991 100644 --- a/webapp/src/app/api/model/h2020Topic.ts +++ b/webapp/src/app/api/model/h2020Topic.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. */ + /** * H2020Topic */ -export interface H2020Topic { - id?: string | null; - projectID?: string | null; - title?: string | null; - topic?: string | null; +export interface H2020Topic { + id?: string | null; + projectID?: string | null; + title?: string | null; + topic?: string | null; } + diff --git a/webapp/src/app/api/model/h2020WebLink.ts b/webapp/src/app/api/model/h2020WebLink.ts index ce8e8f93..26d54599 100644 --- a/webapp/src/app/api/model/h2020WebLink.ts +++ b/webapp/src/app/api/model/h2020WebLink.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. */ + /** * H2020WebLink */ -export interface H2020WebLink { - archivedDate?: string | null; - availableLanguages?: string | null; - id?: string | null; - linkId?: string | null; - projectID?: string | null; - represents?: string | null; - source?: string | null; - status?: string | null; - type?: string | null; - url?: string | null; +export interface H2020WebLink { + archivedDate?: string | null; + availableLanguages?: string | null; + id?: string | null; + linkId?: string | null; + projectID?: string | null; + represents?: string | null; + source?: string | null; + status?: string | null; + type?: string | null; + url?: string | null; } + diff --git a/webapp/src/app/api/model/hEUDeliverable.ts b/webapp/src/app/api/model/hEUDeliverable.ts index 4645913d..05d8c5ba 100644 --- a/webapp/src/app/api/model/hEUDeliverable.ts +++ b/webapp/src/app/api/model/hEUDeliverable.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. */ + /** * HEUDeliverable */ -export interface HEUDeliverable { - collection?: string | null; - contentUpdateDate?: string | null; - deliverableType?: string | null; - description?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - url?: string | null; +export interface HEUDeliverable { + collection?: string | null; + contentUpdateDate?: string | null; + deliverableType?: string | null; + description?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + url?: string | null; } + diff --git a/webapp/src/app/api/model/hEUEurosciVoc.ts b/webapp/src/app/api/model/hEUEurosciVoc.ts index 38fe125e..93921ab7 100644 --- a/webapp/src/app/api/model/hEUEurosciVoc.ts +++ b/webapp/src/app/api/model/hEUEurosciVoc.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. */ + /** * HEUEurosciVoc */ -export interface HEUEurosciVoc { - code?: string | null; - description?: string | null; - id?: string | null; - path?: string | null; - projectID?: string | null; - title?: string | null; +export interface HEUEurosciVoc { + code?: string | null; + description?: string | null; + id?: string | null; + path?: string | null; + projectID?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/hEULegalBasis.ts b/webapp/src/app/api/model/hEULegalBasis.ts index a02eebd0..e3cb66ca 100644 --- a/webapp/src/app/api/model/hEULegalBasis.ts +++ b/webapp/src/app/api/model/hEULegalBasis.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. */ + /** * HEULegalBasis */ -export interface HEULegalBasis { - id?: string | null; - legalBasis?: string | null; - projectID?: string | null; - title?: string | null; - uniqueProgrammePart?: string | null; +export interface HEULegalBasis { + id?: string | null; + legalBasis?: string | null; + projectID?: string | null; + title?: string | null; + uniqueProgrammePart?: string | null; } + diff --git a/webapp/src/app/api/model/hEUOrganization.ts b/webapp/src/app/api/model/hEUOrganization.ts index 1dcd1615..6bb193ef 100644 --- a/webapp/src/app/api/model/hEUOrganization.ts +++ b/webapp/src/app/api/model/hEUOrganization.ts @@ -1,41 +1,43 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * HEUOrganization */ -export interface HEUOrganization { - SME?: boolean | null; - active?: boolean | null; - activityType?: string | null; - city?: string | null; - contactForm?: string | null; - contentUpdateDate?: string | null; - country?: string | null; - ecContribution?: number | null; - endOfParticipation?: boolean | null; - geolocation?: string | null; - id?: string | null; - name?: string | null; - netEcContribution?: number | null; - nutsCode?: string | null; - order?: number | null; - organisationID?: string | null; - organizationURL?: string | null; - postCode?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - role?: string | null; - shortName?: string | null; - street?: string | null; - totalCost?: number | null; - vatNumber?: string | null; +export interface HEUOrganization { + SME?: boolean | null; + active?: boolean | null; + activityType?: string | null; + city?: string | null; + contactForm?: string | null; + contentUpdateDate?: string | null; + country?: string | null; + ecContribution?: number | null; + endOfParticipation?: boolean | null; + geolocation?: string | null; + id?: string | null; + name?: string | null; + netEcContribution?: number | null; + nutsCode?: string | null; + order?: number | null; + organisationID?: string | null; + organizationURL?: string | null; + postCode?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + role?: string | null; + shortName?: string | null; + street?: string | null; + totalCost?: number | null; + vatNumber?: string | null; } + diff --git a/webapp/src/app/api/model/hEUProjectDetails.ts b/webapp/src/app/api/model/hEUProjectDetails.ts index f7a46271..8a897435 100644 --- a/webapp/src/app/api/model/hEUProjectDetails.ts +++ b/webapp/src/app/api/model/hEUProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -16,41 +16,43 @@ import { HEUReportSummary } from './hEUReportSummary'; import { HEUDeliverable } from './hEUDeliverable'; import { HEUEurosciVoc } from './hEUEurosciVoc'; + /** * Comprehensive Horizon Europe Project model combining all related entities. This model extends the base HEUProject with all associated data. */ -export interface HEUProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - deliverables?: Array | null; - reportSummaries?: Array | null; - topicsList?: Array | null; - webLinks?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - deliverableCount?: number | null; +export interface HEUProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + deliverables?: Array | null; + reportSummaries?: Array | null; + topicsList?: Array | null; + webLinks?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + deliverableCount?: number | null; } + diff --git a/webapp/src/app/api/model/hEUPublication.ts b/webapp/src/app/api/model/hEUPublication.ts index 86d59473..4d067177 100644 --- a/webapp/src/app/api/model/hEUPublication.ts +++ b/webapp/src/app/api/model/hEUPublication.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. */ + /** * HEUPublication */ -export interface HEUPublication { - authors?: string | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface HEUPublication { + authors?: string | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } + diff --git a/webapp/src/app/api/model/hEUReportSummary.ts b/webapp/src/app/api/model/hEUReportSummary.ts index 94f58b4c..b9e1a299 100644 --- a/webapp/src/app/api/model/hEUReportSummary.ts +++ b/webapp/src/app/api/model/hEUReportSummary.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. */ + /** * HEUReportSummary */ -export interface HEUReportSummary { - attachments?: string | null; - contentUpdateDate?: string | null; - id?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - rcn?: string | null; - title?: string | null; +export interface HEUReportSummary { + attachments?: string | null; + contentUpdateDate?: string | null; + id?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + rcn?: string | null; + title?: string | null; } + diff --git a/webapp/src/app/api/model/hEUTopic.ts b/webapp/src/app/api/model/hEUTopic.ts index ccd60c27..a0a5e764 100644 --- a/webapp/src/app/api/model/hEUTopic.ts +++ b/webapp/src/app/api/model/hEUTopic.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. */ + /** * HEUTopic */ -export interface HEUTopic { - id?: string | null; - projectID?: string | null; - title?: string | null; - topic?: string | null; +export interface HEUTopic { + id?: string | null; + projectID?: string | null; + title?: string | null; + topic?: string | null; } + diff --git a/webapp/src/app/api/model/hEUWebLink.ts b/webapp/src/app/api/model/hEUWebLink.ts index 1159d2a6..81c5d60f 100644 --- a/webapp/src/app/api/model/hEUWebLink.ts +++ b/webapp/src/app/api/model/hEUWebLink.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. */ + /** * HEUWebLink */ -export interface HEUWebLink { - archivedDate?: string | null; - availableLanguages?: string | null; - id?: string | null; - linkId?: string | null; - projectID?: string | null; - represents?: string | null; - source?: string | null; - status?: string | null; - type?: string | null; - url?: string | null; +export interface HEUWebLink { + archivedDate?: string | null; + availableLanguages?: string | null; + id?: string | null; + linkId?: string | null; + projectID?: string | null; + represents?: string | null; + source?: string | null; + status?: string | null; + type?: string | null; + url?: string | 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/idTokenMetadata.ts b/webapp/src/app/api/model/idTokenMetadata.ts index ab99fb1c..5398083d 100644 --- a/webapp/src/app/api/model/idTokenMetadata.ts +++ b/webapp/src/app/api/model/idTokenMetadata.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,22 +9,26 @@ */ import { TokenType } from './tokenType'; -export interface IdTokenMetadata { - /** - * The unique identifier of the real account associated with this token. - */ - real_account_id: string; - /** - * The timestamp indicating when the token will expire. - */ - expires_at: string; - /** - * The epoch value for the token. Used for versioning of tokens. - */ - epoch?: number; - /** - * The type of the token, which is always ID_TOKEN for this class. - */ - token_type?: TokenType; + +export interface IdTokenMetadata { + /** + * The unique identifier of the real account associated with this token. + */ + real_account_id: string; + /** + * The timestamp indicating when the token will expire. + */ + expires_at: string; + /** + * The epoch value for the token. Used for versioning of tokens. + */ + epoch?: number; + /** + * The type of the token, which is always ID_TOKEN for this class. + */ + token_type?: TokenType; } -export namespace IdTokenMetadata {} +export namespace IdTokenMetadata { +} + + diff --git a/webapp/src/app/api/model/inseAccountManagementModelOrganizationProfile.ts b/webapp/src/app/api/model/inseAccountManagementModelOrganizationProfile.ts index 47235351..c67acc71 100644 --- a/webapp/src/app/api/model/inseAccountManagementModelOrganizationProfile.ts +++ b/webapp/src/app/api/model/inseAccountManagementModelOrganizationProfile.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 InseAccountManagementModelOrganizationProfile { - id: string; - name: string; - openalex_institution_id?: string | null; + +export interface InseAccountManagementModelOrganizationProfile { + id: string; + name: string; + openalex_institution_id?: string | null; } + diff --git a/webapp/src/app/api/model/inseModelsOpenalexWorkPageWorkPage.ts b/webapp/src/app/api/model/inseModelsOpenalexWorkPageWorkPage.ts new file mode 100644 index 00000000..ee69dead --- /dev/null +++ b/webapp/src/app/api/model/inseModelsOpenalexWorkPageWorkPage.ts @@ -0,0 +1,35 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Work } from './work'; + + +export interface InseModelsOpenalexWorkPageWorkPage { + /** + * 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/inseOrganizationManagementModelOrganizationProfile.ts b/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts index 8f9f0e6b..404df0f9 100644 --- a/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts +++ b/webapp/src/app/api/model/inseOrganizationManagementModelOrganizationProfile.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface InseOrganizationManagementModelOrganizationProfile { - id: string; - name: string; - other_inst_id?: string | null; - deleted: boolean; - member_count: number; + +export interface InseOrganizationManagementModelOrganizationProfile { + id: string; + name: string; + other_inst_id?: string | null; + deleted: boolean; + member_count: number; } + diff --git a/webapp/src/app/api/model/inseWorksV2ModelWorkPage.ts b/webapp/src/app/api/model/inseWorksV2ModelWorkPage.ts new file mode 100644 index 00000000..77c44c5a --- /dev/null +++ b/webapp/src/app/api/model/inseWorksV2ModelWorkPage.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 { Work } from './work'; + + +export interface InseWorksV2ModelWorkPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; +} + diff --git a/webapp/src/app/api/model/institution.ts b/webapp/src/app/api/model/institution.ts index c099fc57..6b1a5778 100644 --- a/webapp/src/app/api/model/institution.ts +++ b/webapp/src/app/api/model/institution.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,28 +12,30 @@ 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/institutionFunderSummary.ts b/webapp/src/app/api/model/institutionFunderSummary.ts index cf15754a..48d147b2 100644 --- a/webapp/src/app/api/model/institutionFunderSummary.ts +++ b/webapp/src/app/api/model/institutionFunderSummary.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 { ProjectType } from './projectType'; -export interface InstitutionFunderSummary { - /** - * The type of funding data (e.g., \'bund\', \'eu\', \'dfg\'). - */ - type: ProjectType; - /** - * A dictionary mapping years to total funding amounts for that year. - */ - funding_per_year?: object; - /** - * The average annual funding over the continuous period covered by the data. - */ - annual_average_over_period?: number; + +export interface InstitutionFunderSummary { + /** + * The type of funding data (e.g., \'bund\', \'eu\', \'dfg\'). + */ + type: ProjectType; + /** + * A dictionary mapping years to total funding amounts for that year. + */ + funding_per_year?: object; + /** + * The average annual funding over the continuous period covered by the data. + */ + annual_average_over_period?: number; } -export namespace InstitutionFunderSummary {} +export namespace InstitutionFunderSummary { +} + + 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/institutionPage.ts b/webapp/src/app/api/model/institutionPage.ts index b7640651..01267ee3 100644 --- a/webapp/src/app/api/model/institutionPage.ts +++ b/webapp/src/app/api/model/institutionPage.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 { Institution } from './institution'; -export interface InstitutionPage { - /** - * List of institutions in the current page. - */ - elements?: Array; - /** - * Current page number. (0-indexed) - */ - page?: number; - /** - * Number of institutions per page. - */ - size?: number; - /** - * Total number of institutions matching the search criteria. - */ - total?: number; + +export interface InstitutionPage { + /** + * List of institutions in the current page. + */ + elements?: Array; + /** + * Current page number. (0-indexed) + */ + page?: number; + /** + * Number of institutions per page. + */ + size?: number; + /** + * Total number of institutions matching the search criteria. + */ + total?: number; } + 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/ipcClassification.ts b/webapp/src/app/api/model/ipcClassification.ts index b7e65c0d..74805329 100644 --- a/webapp/src/app/api/model/ipcClassification.ts +++ b/webapp/src/app/api/model/ipcClassification.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface IpcClassification { - symbol: string; - section?: string | null; - class?: string | null; - subclass?: string | null; - main_group?: string | null; - subgroup?: string | null; + +export interface IpcClassification { + symbol: string; + section?: string | null; + 'class'?: string | null; + subclass?: string | null; + main_group?: string | null; + subgroup?: string | null; } + diff --git a/webapp/src/app/api/model/keywordEntry.ts b/webapp/src/app/api/model/keywordEntry.ts index 94dd6e18..e8e9cc5c 100644 --- a/webapp/src/app/api/model/keywordEntry.ts +++ b/webapp/src/app/api/model/keywordEntry.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 KeywordEntry { - /** - * The extracted keyword. - */ - keyword: string; - /** - * The relevance score of the keyword. - */ - relevance_score: number; + +export interface KeywordEntry { + /** + * The extracted keyword. + */ + keyword: string; + /** + * The relevance score of the keyword. + */ + relevance_score: number; } + diff --git a/webapp/src/app/api/model/keywordEntryWithTopic.ts b/webapp/src/app/api/model/keywordEntryWithTopic.ts index 4670f554..6680e773 100644 --- a/webapp/src/app/api/model/keywordEntryWithTopic.ts +++ b/webapp/src/app/api/model/keywordEntryWithTopic.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 { KeywordEntry } from './keywordEntry'; import { KeywordTopicMatch } from './keywordTopicMatch'; -export interface KeywordEntryWithTopic { - /** - * The keyword extracted by the LLM. - */ - llm_keyword: KeywordEntry; - topic_mapping?: KeywordTopicMatch | null; + +export interface KeywordEntryWithTopic { + /** + * The keyword extracted by the LLM. + */ + llm_keyword: KeywordEntry; + topic_mapping?: KeywordTopicMatch | null; } + diff --git a/webapp/src/app/api/model/keywordPatentSearchItem.ts b/webapp/src/app/api/model/keywordPatentSearchItem.ts index ef706532..bae1a0a6 100644 --- a/webapp/src/app/api/model/keywordPatentSearchItem.ts +++ b/webapp/src/app/api/model/keywordPatentSearchItem.ts @@ -1,35 +1,37 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface KeywordPatentSearchItem { - /** - * Extracted keyword text. - */ - keyword: string; - keyword_level?: KeywordPatentSearchItem.KeywordLevelEnum | null; - topic_id?: string | null; - topic_display_name?: string | null; - subfield_name?: string | null; - field_name?: string | null; - /** - * LLM relevance score for the keyword. - */ - relevance_score?: number; + +export interface KeywordPatentSearchItem { + /** + * Extracted keyword text. + */ + keyword: string; + keyword_level?: KeywordPatentSearchItem.KeywordLevelEnum | null; + topic_id?: string | null; + topic_display_name?: string | null; + subfield_name?: string | null; + field_name?: string | null; + /** + * LLM relevance score for the keyword. + */ + relevance_score?: number; } export namespace KeywordPatentSearchItem { - export const KeywordLevelEnum = { - Broad: 'broad', - Coarse: 'coarse', - Fine: 'fine', - Custom: 'custom', - } as const; - export type KeywordLevelEnum = - (typeof KeywordLevelEnum)[keyof typeof KeywordLevelEnum]; + export const KeywordLevelEnum = { + Broad: 'broad', + Coarse: 'coarse', + Fine: 'fine', + Custom: 'custom' + } as const; + export type KeywordLevelEnum = typeof KeywordLevelEnum[keyof typeof KeywordLevelEnum]; } + + diff --git a/webapp/src/app/api/model/keywordTopicMatch.ts b/webapp/src/app/api/model/keywordTopicMatch.ts index ee4c8326..f9c2ab49 100644 --- a/webapp/src/app/api/model/keywordTopicMatch.ts +++ b/webapp/src/app/api/model/keywordTopicMatch.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,7 +9,9 @@ */ import { Topic } from './topic'; -export interface KeywordTopicMatch { - keyword: string; - topic?: Topic | null; + +export interface KeywordTopicMatch { + keyword: string; + topic?: Topic | null; } + diff --git a/webapp/src/app/api/model/keywords.ts b/webapp/src/app/api/model/keywords.ts index d93b5fe0..c65c7600 100644 --- a/webapp/src/app/api/model/keywords.ts +++ b/webapp/src/app/api/model/keywords.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. */ + /** * Keywords associated with the project */ -export interface Keywords {} +export interface Keywords { +} + diff --git a/webapp/src/app/api/model/keywordsRequest.ts b/webapp/src/app/api/model/keywordsRequest.ts index 094ed97b..8acb7082 100644 --- a/webapp/src/app/api/model/keywordsRequest.ts +++ b/webapp/src/app/api/model/keywordsRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,20 @@ */ import { FileUpload } from './fileUpload'; -export interface KeywordsRequest { - /** - * The input text from which to extract keywords. - */ - query: string; - files?: Array | null; - /** - * The mode of keyword extraction, e.g., \'url\', \'text\', or \'keywords\'. - */ - mode: string; - /** - * The maximum number of keywords to extract. - */ - limit?: number; + +export interface KeywordsRequest { + /** + * The input text from which to extract keywords. + */ + query: string; + files?: Array | null; + /** + * The mode of keyword extraction, e.g., \'url\', \'text\', or \'keywords\'. + */ + mode: string; + /** + * The maximum number of keywords to extract. + */ + limit?: number; } + diff --git a/webapp/src/app/api/model/keywordsTopicsRequest.ts b/webapp/src/app/api/model/keywordsTopicsRequest.ts index 883ed079..8810bf5f 100644 --- a/webapp/src/app/api/model/keywordsTopicsRequest.ts +++ b/webapp/src/app/api/model/keywordsTopicsRequest.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 KeywordsTopicsRequest { - /** - * List of keywords/sentences to query by similarity. - */ - keywords: Array; + +export interface KeywordsTopicsRequest { + /** + * List of keywords/sentences to query by similarity. + */ + keywords: Array; } + diff --git a/webapp/src/app/api/model/keywordsTopicsResponse.ts b/webapp/src/app/api/model/keywordsTopicsResponse.ts index 78a2f9d2..4aee622f 100644 --- a/webapp/src/app/api/model/keywordsTopicsResponse.ts +++ b/webapp/src/app/api/model/keywordsTopicsResponse.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 { KeywordTopicMatch } from './keywordTopicMatch'; -export interface KeywordsTopicsResponse { - /** - * Top matching topics for each keyword in the requested list. - */ - results: Array; + +export interface KeywordsTopicsResponse { + /** + * Top matching topics for each keyword in the requested list. + */ + results: Array; } + 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 f92e2ffb..f207d751 100644 --- a/webapp/src/app/api/model/location.ts +++ b/webapp/src/app/api/model/location.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,17 +9,19 @@ */ import { 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/loginResponse.ts b/webapp/src/app/api/model/loginResponse.ts index b0ccb902..c91eb493 100644 --- a/webapp/src/app/api/model/loginResponse.ts +++ b/webapp/src/app/api/model/loginResponse.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 { IdTokenMetadata } from './idTokenMetadata'; -export interface LoginResponse { - /** - * The ID token issued upon successful login. - */ - id_token: IdTokenMetadata; + +export interface LoginResponse { + /** + * The ID token issued upon successful login. + */ + id_token: IdTokenMetadata; } + 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/matchedAuthor.ts b/webapp/src/app/api/model/matchedAuthor.ts index 311e2184..6194df94 100644 --- a/webapp/src/app/api/model/matchedAuthor.ts +++ b/webapp/src/app/api/model/matchedAuthor.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface MatchedAuthor { - openalex_author_id: string; - author_name: string; + +export interface MatchedAuthor { + openalex_author_id: string; + author_name: string; } + diff --git a/webapp/src/app/api/model/matchedOfficer.ts b/webapp/src/app/api/model/matchedOfficer.ts index a9f00939..4ad5c354 100644 --- a/webapp/src/app/api/model/matchedOfficer.ts +++ b/webapp/src/app/api/model/matchedOfficer.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. */ -export interface MatchedOfficer { - name?: string | null; - firstname?: string | null; - lastname?: string | null; - city?: string | null; - position?: string | null; - start_date?: string | null; - type?: string | null; - flag?: string | null; - is_matched_person?: boolean; + +export interface MatchedOfficer { + name?: string | null; + firstname?: string | null; + lastname?: string | null; + city?: string | null; + position?: string | null; + start_date?: string | null; + type?: string | null; + flag?: string | null; + is_matched_person?: boolean; } + diff --git a/webapp/src/app/api/model/matchedTopic.ts b/webapp/src/app/api/model/matchedTopic.ts index 52de9018..64e54ab3 100644 --- a/webapp/src/app/api/model/matchedTopic.ts +++ b/webapp/src/app/api/model/matchedTopic.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface MatchedTopic { - id?: string | null; - display_name?: string | null; - subfield_name?: string | null; - field_name?: string | null; - domain_name?: string | null; - source_keyword?: string | null; + +export interface MatchedTopic { + id?: string | null; + display_name?: string | null; + subfield_name?: string | null; + field_name?: string | null; + domain_name?: string | null; + source_keyword?: string | null; } + diff --git a/webapp/src/app/api/model/mentionedPerson.ts b/webapp/src/app/api/model/mentionedPerson.ts index dad21357..6141b12a 100644 --- a/webapp/src/app/api/model/mentionedPerson.ts +++ b/webapp/src/app/api/model/mentionedPerson.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 MentionedPerson { - name: string; - is_ude?: boolean; - person_id?: string | null; + +export interface MentionedPerson { + name: string; + is_ude?: boolean; + person_id?: string | null; } + diff --git a/webapp/src/app/api/model/meta.ts b/webapp/src/app/api/model/meta.ts index f9f56443..8481062a 100644 --- a/webapp/src/app/api/model/meta.ts +++ b/webapp/src/app/api/model/meta.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,15 +9,17 @@ */ 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 f3122d41..3ed9f10e 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -11,9 +11,6 @@ export * from './authorNetworkNode'; export * from './authorParsedLongestName'; export * from './authorPositionCount'; export * from './authorSummaryStats'; -export * from './authorWork'; -export * from './authorWorkInstitution'; -export * from './authorWorkPage'; export * from './authorWorkPurposes'; export * from './authorsFilterProperties'; export * from './authorsListResponse'; @@ -102,7 +99,9 @@ export * from './hEUWebLink'; export * from './hTTPValidationError'; export * from './idTokenMetadata'; export * from './inseAccountManagementModelOrganizationProfile'; +export * from './inseModelsOpenalexWorkPageWorkPage'; export * from './inseOrganizationManagementModelOrganizationProfile'; +export * from './inseWorksV2ModelWorkPage'; export * from './institution'; export * from './institutionFunderSummary'; export * from './institutionGeo'; @@ -199,7 +198,6 @@ export * from './workIds'; export * from './workKeyword'; export * from './workMeshInner'; export * from './workNetworkNode'; -export * from './workPage'; export * from './workPurpose'; export * from './workSortBy'; export * from './workSustainableDevelopmentGoalsInner'; diff --git a/webapp/src/app/api/model/newsArticle.ts b/webapp/src/app/api/model/newsArticle.ts index e04f0029..ab48810d 100644 --- a/webapp/src/app/api/model/newsArticle.ts +++ b/webapp/src/app/api/model/newsArticle.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 NewsArticle { - id: string; - date?: string | null; - maintitle?: string | null; - author?: string | null; - url?: string | null; - relevant?: boolean | null; - snippet?: string | null; - related?: boolean | null; + +export interface NewsArticle { + id: string; + date?: string | null; + maintitle?: string | null; + author?: string | null; + url?: string | null; + relevant?: boolean | null; + snippet?: string | null; + related?: boolean | null; } + diff --git a/webapp/src/app/api/model/newsArticleDetail.ts b/webapp/src/app/api/model/newsArticleDetail.ts index 09962000..171a14ff 100644 --- a/webapp/src/app/api/model/newsArticleDetail.ts +++ b/webapp/src/app/api/model/newsArticleDetail.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,17 +10,19 @@ import { MatchedTopic } from './matchedTopic'; import { MentionedPerson } from './mentionedPerson'; -export interface NewsArticleDetail { - id: string; - date?: string | null; - maintitle?: string | null; - author?: string | null; - url?: string | null; - relevant?: boolean | null; - snippet?: string | null; - related?: boolean | null; - full_content?: string | null; - authors?: Array; - keywords?: Array; - topics?: Array; + +export interface NewsArticleDetail { + id: string; + date?: string | null; + maintitle?: string | null; + author?: string | null; + url?: string | null; + relevant?: boolean | null; + snippet?: string | null; + related?: boolean | null; + full_content?: string | null; + authors?: Array; + keywords?: Array; + topics?: Array; } + diff --git a/webapp/src/app/api/model/newsPage.ts b/webapp/src/app/api/model/newsPage.ts index bbb74122..da7f26ab 100644 --- a/webapp/src/app/api/model/newsPage.ts +++ b/webapp/src/app/api/model/newsPage.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 { NewsArticle } from './newsArticle'; -export interface NewsPage { - total: number; - page: number; - page_size: number; - results: Array; + +export interface NewsPage { + total: number; + page: number; + page_size: number; + results: Array; } + 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/openAlexTopicTag.ts b/webapp/src/app/api/model/openAlexTopicTag.ts index 0e6f538a..dece79c5 100644 --- a/webapp/src/app/api/model/openAlexTopicTag.ts +++ b/webapp/src/app/api/model/openAlexTopicTag.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 OpenAlexTopicTag { - topic_id?: string | null; - topic_display_name: string; - field_name?: string | null; - domain_name?: string | null; + +export interface OpenAlexTopicTag { + topic_id?: string | null; + topic_display_name: string; + field_name?: string | null; + domain_name?: string | null; } + diff --git a/webapp/src/app/api/model/orgPatentEntry.ts b/webapp/src/app/api/model/orgPatentEntry.ts index e26782e4..762e1968 100644 --- a/webapp/src/app/api/model/orgPatentEntry.ts +++ b/webapp/src/app/api/model/orgPatentEntry.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,38 +11,40 @@ import { MatchedAuthor } from './matchedAuthor'; import { OpenAlexTopicTag } from './openAlexTopicTag'; import { IpcClassification } from './ipcClassification'; -export interface OrgPatentEntry { - patent_id: string; - source: string; - title?: string | null; - abstract?: string | null; - publication_date?: string | null; - publication_year?: string | null; - application_number?: string | null; - application_date?: string | null; - kind?: string | null; - application_type?: string | null; - number_of_claims?: number | null; - status?: string | null; - inventors?: Array; - assignees?: Array; - ipc?: Array; - ipc_descriptions?: Array; - cpc?: Array; - cpc_descriptions?: Array; - country?: string | null; - openalex_topics?: Array; - institution_id: string; - institution_name?: string | null; - match_type: OrgPatentEntry.MatchTypeEnum; - matched_authors?: Array; + +export interface OrgPatentEntry { + patent_id: string; + source: string; + title?: string | null; + 'abstract'?: string | null; + publication_date?: string | null; + publication_year?: string | null; + application_number?: string | null; + application_date?: string | null; + kind?: string | null; + application_type?: string | null; + number_of_claims?: number | null; + status?: string | null; + inventors?: Array; + assignees?: Array; + ipc?: Array; + ipc_descriptions?: Array; + cpc?: Array; + cpc_descriptions?: Array; + country?: string | null; + openalex_topics?: Array; + institution_id: string; + institution_name?: string | null; + match_type: OrgPatentEntry.MatchTypeEnum; + matched_authors?: Array; } export namespace OrgPatentEntry { - export const MatchTypeEnum = { - Institution: 'institution', - Name: 'name', - Both: 'both', - } as const; - export type MatchTypeEnum = - (typeof MatchTypeEnum)[keyof typeof MatchTypeEnum]; + export const MatchTypeEnum = { + Institution: 'institution', + Name: 'name', + Both: 'both' + } as const; + export type MatchTypeEnum = typeof MatchTypeEnum[keyof typeof MatchTypeEnum]; } + + diff --git a/webapp/src/app/api/model/orgPatentsResponse.ts b/webapp/src/app/api/model/orgPatentsResponse.ts index 68b2be7a..96697088 100644 --- a/webapp/src/app/api/model/orgPatentsResponse.ts +++ b/webapp/src/app/api/model/orgPatentsResponse.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 { OrgPatentEntry } from './orgPatentEntry'; -export interface OrgPatentsResponse { - institution_id: string; - institution_name?: string | null; - patent_count: number; - page?: number; - size?: number; - patents: Array; + +export interface OrgPatentsResponse { + institution_id: string; + institution_name?: string | null; + patent_count: number; + page?: number; + size?: number; + patents: Array; } + diff --git a/webapp/src/app/api/model/organizationPage.ts b/webapp/src/app/api/model/organizationPage.ts index fccb1081..5b8294b1 100644 --- a/webapp/src/app/api/model/organizationPage.ts +++ b/webapp/src/app/api/model/organizationPage.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 { InseOrganizationManagementModelOrganizationProfile } from './inseOrganizationManagementModelOrganizationProfile'; -export interface OrganizationPage { - items: Array; - total: number; - page: number; - page_size: number; + +export interface OrganizationPage { + items: Array; + total: number; + page: number; + page_size: number; } + diff --git a/webapp/src/app/api/model/otkResponse.ts b/webapp/src/app/api/model/otkResponse.ts index 3b69c11d..7d956289 100644 --- a/webapp/src/app/api/model/otkResponse.ts +++ b/webapp/src/app/api/model/otkResponse.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 OtkResponse { - /** - * The status of the one-time code (OTC) request. - */ - status: string; - /** - * The unique identifier of the account for which the OTC was requested. - */ - account_id: string; + +export interface OtkResponse { + /** + * The status of the one-time code (OTC) request. + */ + status: string; + /** + * The unique identifier of the account for which the OTC was requested. + */ + account_id: string; } + diff --git a/webapp/src/app/api/model/patentEntry.ts b/webapp/src/app/api/model/patentEntry.ts index 809c558b..7f6d7809 100644 --- a/webapp/src/app/api/model/patentEntry.ts +++ b/webapp/src/app/api/model/patentEntry.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,25 +10,27 @@ import { OpenAlexTopicTag } from './openAlexTopicTag'; import { IpcClassification } from './ipcClassification'; -export interface PatentEntry { - patent_id: string; - source: string; - title?: string | null; - abstract?: string | null; - publication_date?: string | null; - publication_year?: string | null; - application_number?: string | null; - application_date?: string | null; - kind?: string | null; - application_type?: string | null; - number_of_claims?: number | null; - status?: string | null; - inventors?: Array; - assignees?: Array; - ipc?: Array; - ipc_descriptions?: Array; - cpc?: Array; - cpc_descriptions?: Array; - country?: string | null; - openalex_topics?: Array; + +export interface PatentEntry { + patent_id: string; + source: string; + title?: string | null; + 'abstract'?: string | null; + publication_date?: string | null; + publication_year?: string | null; + application_number?: string | null; + application_date?: string | null; + kind?: string | null; + application_type?: string | null; + number_of_claims?: number | null; + status?: string | null; + inventors?: Array; + assignees?: Array; + ipc?: Array; + ipc_descriptions?: Array; + cpc?: Array; + cpc_descriptions?: Array; + country?: string | null; + openalex_topics?: Array; } + diff --git a/webapp/src/app/api/model/patentsByAuthorResponse.ts b/webapp/src/app/api/model/patentsByAuthorResponse.ts index ed970c7a..eca819ed 100644 --- a/webapp/src/app/api/model/patentsByAuthorResponse.ts +++ b/webapp/src/app/api/model/patentsByAuthorResponse.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 { PatentEntry } from './patentEntry'; -export interface PatentsByAuthorResponse { - author_id: string; - author_name?: string | null; - patent_count: number; - patents: Array; + +export interface PatentsByAuthorResponse { + author_id: string; + author_name?: string | null; + patent_count: number; + patents: Array; } + diff --git a/webapp/src/app/api/model/patentsByInstitutionResponse.ts b/webapp/src/app/api/model/patentsByInstitutionResponse.ts index d80972d0..b167c48b 100644 --- a/webapp/src/app/api/model/patentsByInstitutionResponse.ts +++ b/webapp/src/app/api/model/patentsByInstitutionResponse.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 { PatentEntry } from './patentEntry'; -export interface PatentsByInstitutionResponse { - institution_id: string; - institution_name?: string | null; - patent_count: number; - patents: Array; + +export interface PatentsByInstitutionResponse { + institution_id: string; + institution_name?: string | null; + patent_count: number; + patents: Array; } + diff --git a/webapp/src/app/api/model/patentsByKeywordsRequest.ts b/webapp/src/app/api/model/patentsByKeywordsRequest.ts index fcafaee0..1e9d3021 100644 --- a/webapp/src/app/api/model/patentsByKeywordsRequest.ts +++ b/webapp/src/app/api/model/patentsByKeywordsRequest.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 { KeywordPatentSearchItem } from './keywordPatentSearchItem'; -export interface PatentsByKeywordsRequest { - /** - * Keywords to match against patents_openalex_keywords. - */ - keywords: Array; + +export interface PatentsByKeywordsRequest { + /** + * Keywords to match against patents_openalex_keywords. + */ + keywords: Array; } + diff --git a/webapp/src/app/api/model/patentsByKeywordsResponse.ts b/webapp/src/app/api/model/patentsByKeywordsResponse.ts index fe9bec64..1e31acb5 100644 --- a/webapp/src/app/api/model/patentsByKeywordsResponse.ts +++ b/webapp/src/app/api/model/patentsByKeywordsResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,7 +9,9 @@ */ import { KeywordPatentMatch } from './keywordPatentMatch'; -export interface PatentsByKeywordsResponse { - patent_count: number; - patents: Array; + +export interface PatentsByKeywordsResponse { + patent_count: number; + patents: Array; } + 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/personBookmarkResponse.ts b/webapp/src/app/api/model/personBookmarkResponse.ts index b40bdc71..5227060a 100644 --- a/webapp/src/app/api/model/personBookmarkResponse.ts +++ b/webapp/src/app/api/model/personBookmarkResponse.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface PersonBookmarkResponse { - person_id: string; - person_name: string | null; - created_at: string; + +export interface PersonBookmarkResponse { + person_id: string; + person_name: string | null; + created_at: string; } + diff --git a/webapp/src/app/api/model/projectType.ts b/webapp/src/app/api/model/projectType.ts index 08df30c4..a01a743c 100644 --- a/webapp/src/app/api/model/projectType.ts +++ b/webapp/src/app/api/model/projectType.ts @@ -1,16 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const ProjectType = { - Bund: 'bund', - Eu: 'eu', - Dfg: 'dfg', + Bund: 'bund', + Eu: 'eu', + Dfg: 'dfg' } as const; -export type ProjectType = (typeof ProjectType)[keyof typeof ProjectType]; +export type ProjectType = typeof ProjectType[keyof typeof ProjectType]; + diff --git a/webapp/src/app/api/model/projectsFilteringProperties.ts b/webapp/src/app/api/model/projectsFilteringProperties.ts index c0cebe63..7ce7cfc2 100644 --- a/webapp/src/app/api/model/projectsFilteringProperties.ts +++ b/webapp/src/app/api/model/projectsFilteringProperties.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,28 +11,32 @@ import { SortDirection } from './sortDirection'; import { ProjectsSortBy } from './projectsSortBy'; import { ProjectType } from './projectType'; -export interface ProjectsFilteringProperties { - /** - * The type of projects to filter by. - */ - project_type: ProjectType; - /** - * The page number for pagination. - */ - page: number; - /** - * The page size for pagination. - */ - size: number; - raw_oa_institution_id?: string | null; - query?: string | null; - /** - * The field to sort by. - */ - sort_by?: ProjectsSortBy; - /** - * The sort direction (asc or desc). - */ - sort_direction?: SortDirection; + +export interface ProjectsFilteringProperties { + /** + * The type of projects to filter by. + */ + project_type: ProjectType; + /** + * The page number for pagination. + */ + page: number; + /** + * The page size for pagination. + */ + size: number; + raw_oa_institution_id?: string | null; + query?: string | null; + /** + * The field to sort by. + */ + sort_by?: ProjectsSortBy; + /** + * The sort direction (asc or desc). + */ + sort_direction?: SortDirection; } -export namespace ProjectsFilteringProperties {} +export namespace ProjectsFilteringProperties { +} + + diff --git a/webapp/src/app/api/model/projectsSortBy.ts b/webapp/src/app/api/model/projectsSortBy.ts index 26400b22..79824096 100644 --- a/webapp/src/app/api/model/projectsSortBy.ts +++ b/webapp/src/app/api/model/projectsSortBy.ts @@ -1,18 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const ProjectsSortBy = { - Title: 'title', - FundingStart: 'funding_start', - FundingEnd: 'funding_end', - FundingAmount: 'funding_amount', + Title: 'title', + FundingStart: 'funding_start', + FundingEnd: 'funding_end', + FundingAmount: 'funding_amount' } as const; -export type ProjectsSortBy = - (typeof ProjectsSortBy)[keyof typeof ProjectsSortBy]; +export type ProjectsSortBy = typeof ProjectsSortBy[keyof typeof ProjectsSortBy]; + diff --git a/webapp/src/app/api/model/publicationDetailByFunder.ts b/webapp/src/app/api/model/publicationDetailByFunder.ts index 0fd6b7c5..123ded7e 100644 --- a/webapp/src/app/api/model/publicationDetailByFunder.ts +++ b/webapp/src/app/api/model/publicationDetailByFunder.ts @@ -1,43 +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; + +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/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/rankingResponse.ts b/webapp/src/app/api/model/rankingResponse.ts index 5be090a2..099ec660 100644 --- a/webapp/src/app/api/model/rankingResponse.ts +++ b/webapp/src/app/api/model/rankingResponse.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,7 +10,9 @@ import { UniversityRanking } from './universityRanking'; import { UniversityTopicData } from './universityTopicData'; -export interface RankingResponse { - timeseries: Array; - rankings: Array; + +export interface RankingResponse { + timeseries: Array; + rankings: Array; } + diff --git a/webapp/src/app/api/model/rebuildResponse.ts b/webapp/src/app/api/model/rebuildResponse.ts index d2f002fb..13e6c910 100644 --- a/webapp/src/app/api/model/rebuildResponse.ts +++ b/webapp/src/app/api/model/rebuildResponse.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 RebuildResponse { - status: string; - institution_id: string; - message: string; + +export interface RebuildResponse { + status: string; + institution_id: string; + message: string; } + 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/sortDirection.ts b/webapp/src/app/api/model/sortDirection.ts index 49933995..4f9362f2 100644 --- a/webapp/src/app/api/model/sortDirection.ts +++ b/webapp/src/app/api/model/sortDirection.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 const SortDirection = { - Asc: 'asc', - Desc: 'desc', + Asc: 'asc', + Desc: 'desc' } as const; -export type SortDirection = (typeof SortDirection)[keyof typeof SortDirection]; +export type SortDirection = typeof SortDirection[keyof typeof SortDirection]; + diff --git a/webapp/src/app/api/model/specificWorkPurpose.ts b/webapp/src/app/api/model/specificWorkPurpose.ts index 20261914..0deaf6cb 100644 --- a/webapp/src/app/api/model/specificWorkPurpose.ts +++ b/webapp/src/app/api/model/specificWorkPurpose.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,19 +9,23 @@ */ import { WorkPurpose } from './workPurpose'; + /** * Represents the purpose of a specific work, including its ID, purpose, and optional reasoning. */ -export interface SpecificWorkPurpose { - /** - * The raw OpenAlex work id. - */ - raw_oa_work_id: string; - publication_year?: number | null; - /** - * The purpose of the work. - */ - purpose: WorkPurpose; - reasoning?: string | null; +export interface SpecificWorkPurpose { + /** + * The raw OpenAlex work id. + */ + raw_oa_work_id: string; + publication_year?: number | null; + /** + * The purpose of the work. + */ + purpose: WorkPurpose; + reasoning?: string | null; } -export namespace SpecificWorkPurpose {} +export namespace SpecificWorkPurpose { +} + + diff --git a/webapp/src/app/api/model/tokenType.ts b/webapp/src/app/api/model/tokenType.ts index 88512eb6..a0efdc46 100644 --- a/webapp/src/app/api/model/tokenType.ts +++ b/webapp/src/app/api/model/tokenType.ts @@ -1,16 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const TokenType = { - IdToken: 'ID_TOKEN', - RefreshToken: 'REFRESH_TOKEN', - AccessToken: 'ACCESS_TOKEN', + IdToken: 'ID_TOKEN', + RefreshToken: 'REFRESH_TOKEN', + AccessToken: 'ACCESS_TOKEN' } as const; -export type TokenType = (typeof TokenType)[keyof typeof TokenType]; +export type TokenType = typeof TokenType[keyof typeof TokenType]; + diff --git a/webapp/src/app/api/model/topAuthor.ts b/webapp/src/app/api/model/topAuthor.ts index bc431723..6a74fa91 100644 --- a/webapp/src/app/api/model/topAuthor.ts +++ b/webapp/src/app/api/model/topAuthor.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopAuthor { - id?: string | null; - name: string; - count: number; + +export interface TopAuthor { + id?: string | null; + name: string; + count: number; } + diff --git a/webapp/src/app/api/model/topAuthorStatistics.ts b/webapp/src/app/api/model/topAuthorStatistics.ts index 1c912edb..6ea5990a 100644 --- a/webapp/src/app/api/model/topAuthorStatistics.ts +++ b/webapp/src/app/api/model/topAuthorStatistics.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,10 +9,12 @@ */ import { TopAuthor } from './topAuthor'; -export interface TopAuthorStatistics { - institution_id: string; - works: Array; - projects: Array; - patents: Array; - news: Array; + +export interface TopAuthorStatistics { + institution_id: string; + works: Array; + projects: Array; + patents: Array; + news: Array; } + diff --git a/webapp/src/app/api/model/topInstitutionItem.ts b/webapp/src/app/api/model/topInstitutionItem.ts index a98f52b8..a9367bae 100644 --- a/webapp/src/app/api/model/topInstitutionItem.ts +++ b/webapp/src/app/api/model/topInstitutionItem.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 TopInstitutionItem { - id?: string | null; - display_name?: string | null; - ror?: string | null; - country_code?: string | null; - type?: string | null; - lineage?: Array | null; - works_count?: number | null; - exact_topic_count?: number | null; + +export interface TopInstitutionItem { + id?: string | null; + display_name?: string | null; + ror?: string | null; + country_code?: string | null; + type?: string | null; + lineage?: Array | null; + works_count?: number | null; + exact_topic_count?: number | null; } + diff --git a/webapp/src/app/api/model/topTopicItem.ts b/webapp/src/app/api/model/topTopicItem.ts index e6a151d4..2ae026c1 100644 --- a/webapp/src/app/api/model/topTopicItem.ts +++ b/webapp/src/app/api/model/topTopicItem.ts @@ -1,14 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopTopicItem { - name: string; - count: number; + +export interface TopTopicItem { + name: string; + count: number; } + diff --git a/webapp/src/app/api/model/topTopicsResponse.ts b/webapp/src/app/api/model/topTopicsResponse.ts index 4bac3de8..7f109033 100644 --- a/webapp/src/app/api/model/topTopicsResponse.ts +++ b/webapp/src/app/api/model/topTopicsResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,6 +9,8 @@ */ import { TopTopicItem } from './topTopicItem'; -export interface TopTopicsResponse { - items: Array; + +export interface TopTopicsResponse { + items: Array; } + diff --git a/webapp/src/app/api/model/topic.ts b/webapp/src/app/api/model/topic.ts index eaac16f6..9fc0ee63 100644 --- a/webapp/src/app/api/model/topic.ts +++ b/webapp/src/app/api/model/topic.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,21 +12,23 @@ 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 1d2abe90..b929a51d 100644 --- a/webapp/src/app/api/model/topicCount.ts +++ b/webapp/src/app/api/model/topicCount.ts @@ -1,31 +1,33 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicCount { - id?: string | null; - /** - * The topic display name. - */ - name: string; - /** - * The number of occurrences. - */ - count?: number; - description?: string | null; - subfield_id?: string | null; - subfield_name?: string | null; - subfield_description?: string | null; - field_id?: string | null; - field_name?: string | null; - field_description?: string | null; - domain_id?: string | null; - domain_name?: string | null; - domain_description?: string | null; + +export interface TopicCount { + id?: string | null; + /** + * The topic display name. + */ + name: string; + /** + * The number of occurrences. + */ + count?: number; + description?: string | null; + subfield_id?: string | null; + subfield_name?: string | null; + subfield_description?: string | null; + field_id?: string | null; + field_name?: string | null; + field_description?: string | null; + domain_id?: string | null; + domain_name?: string | null; + domain_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/topicHeatmap.ts b/webapp/src/app/api/model/topicHeatmap.ts index 64e915a5..be36dc40 100644 --- a/webapp/src/app/api/model/topicHeatmap.ts +++ b/webapp/src/app/api/model/topicHeatmap.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,11 @@ */ import { TopicHeatmapField } from './topicHeatmapField'; -export interface TopicHeatmap { - institution_id: string; - organization_name: string; - years: Array; - fields: Array; + +export interface TopicHeatmap { + institution_id: string; + organization_name: string; + years: Array; + fields: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmapField.ts b/webapp/src/app/api/model/topicHeatmapField.ts index 4c35a17e..1687c6d9 100644 --- a/webapp/src/app/api/model/topicHeatmapField.ts +++ b/webapp/src/app/api/model/topicHeatmapField.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,11 @@ */ import { TopicHeatmapValue } from './topicHeatmapValue'; -export interface TopicHeatmapField { - id: string; - name: string; - total: number; - values: Array; + +export interface TopicHeatmapField { + id: string; + name: string; + total: number; + values: Array; } + diff --git a/webapp/src/app/api/model/topicHeatmapValue.ts b/webapp/src/app/api/model/topicHeatmapValue.ts index 2f5a01d9..f840b938 100644 --- a/webapp/src/app/api/model/topicHeatmapValue.ts +++ b/webapp/src/app/api/model/topicHeatmapValue.ts @@ -1,15 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicHeatmapValue { - year: number; - count: number; - share: number; + +export interface TopicHeatmapValue { + year: number; + count: number; + share: number; } + diff --git a/webapp/src/app/api/model/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/topicYearlyData.ts b/webapp/src/app/api/model/topicYearlyData.ts index a1fdbdc2..7dc05940 100644 --- a/webapp/src/app/api/model/topicYearlyData.ts +++ b/webapp/src/app/api/model/topicYearlyData.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface TopicYearlyData { - year: number; - raw: number; - normalized: number; - cumulative: number; - institutions_count: number; + +export interface TopicYearlyData { + year: number; + raw: number; + normalized: number; + cumulative: number; + institutions_count: number; } + diff --git a/webapp/src/app/api/model/topics.ts b/webapp/src/app/api/model/topics.ts index cf40ff1d..44f0eb98 100644 --- a/webapp/src/app/api/model/topics.ts +++ b/webapp/src/app/api/model/topics.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 Topics {} + +export interface Topics { +} + diff --git a/webapp/src/app/api/model/topicsByTime.ts b/webapp/src/app/api/model/topicsByTime.ts index 007dc43d..8af7c9bb 100644 --- a/webapp/src/app/api/model/topicsByTime.ts +++ b/webapp/src/app/api/model/topicsByTime.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 { 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/trendResponse.ts b/webapp/src/app/api/model/trendResponse.ts index e6b291c9..c7819dd7 100644 --- a/webapp/src/app/api/model/trendResponse.ts +++ b/webapp/src/app/api/model/trendResponse.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 { TrendSeries } from './trendSeries'; -export interface TrendResponse { - series: Array; - years: Array; - location_mappings?: { [key: string]: Array } | null; + +export interface TrendResponse { + series: Array; + years: Array; + location_mappings?: { [key: string]: Array; } | null; } + diff --git a/webapp/src/app/api/model/trendSearchType.ts b/webapp/src/app/api/model/trendSearchType.ts index bde11a52..5495800e 100644 --- a/webapp/src/app/api/model/trendSearchType.ts +++ b/webapp/src/app/api/model/trendSearchType.ts @@ -1,20 +1,21 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const TrendSearchType = { - Publications: 'publications', - Authors: 'authors', - Patents: 'patents', - Projects: 'projects', - News: 'news', - All: 'all', + Publications: 'publications', + Authors: 'authors', + Patents: 'patents', + Projects: 'projects', + News: 'news', + All: 'all' } as const; -export type TrendSearchType = - (typeof TrendSearchType)[keyof typeof TrendSearchType]; +export type TrendSearchType = typeof TrendSearchType[keyof typeof TrendSearchType]; + diff --git a/webapp/src/app/api/model/trendSeries.ts b/webapp/src/app/api/model/trendSeries.ts index b8ce939f..312dee1c 100644 --- a/webapp/src/app/api/model/trendSeries.ts +++ b/webapp/src/app/api/model/trendSeries.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,20 +9,22 @@ */ import { TopicYearlyData } from './topicYearlyData'; -export interface TrendSeries { - entity_id: string; - entity_name: string; - entity_type: TrendSeries.EntityTypeEnum; - country_code?: string | null; - topic_data: { [key: string]: Array }; + +export interface TrendSeries { + entity_id: string; + entity_name: string; + entity_type: TrendSeries.EntityTypeEnum; + country_code?: string | null; + topic_data: { [key: string]: Array; }; } export namespace TrendSeries { - export const EntityTypeEnum = { - Institution: 'institution', - Country: 'country', - Region: 'region', - Author: 'author', - } as const; - export type EntityTypeEnum = - (typeof EntityTypeEnum)[keyof typeof EntityTypeEnum]; + export const EntityTypeEnum = { + Institution: 'institution', + Country: 'country', + Region: 'region', + Author: 'author' + } as const; + export type EntityTypeEnum = typeof EntityTypeEnum[keyof typeof EntityTypeEnum]; } + + diff --git a/webapp/src/app/api/model/universityRanking.ts b/webapp/src/app/api/model/universityRanking.ts index 5c9d0d05..3099e73e 100644 --- a/webapp/src/app/api/model/universityRanking.ts +++ b/webapp/src/app/api/model/universityRanking.ts @@ -1,27 +1,30 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ -export interface UniversityRanking { - rank: number; - university: string; - publications: number; - citations: number; - growth_rate: number; - trend: UniversityRanking.TrendEnum; - is_top_mover: boolean; + +export interface UniversityRanking { + rank: number; + university: string; + publications: number; + citations: number; + growth_rate: number; + trend: UniversityRanking.TrendEnum; + is_top_mover: boolean; } export namespace UniversityRanking { - export const TrendEnum = { - Up: 'up', - Down: 'down', - Stable: 'stable', - } as const; - export type TrendEnum = (typeof TrendEnum)[keyof typeof TrendEnum]; + export const TrendEnum = { + Up: 'up', + Down: 'down', + Stable: 'stable' + } as const; + export type TrendEnum = typeof TrendEnum[keyof typeof TrendEnum]; } + + diff --git a/webapp/src/app/api/model/universityTopicData.ts b/webapp/src/app/api/model/universityTopicData.ts index 3bf43088..ea31291d 100644 --- a/webapp/src/app/api/model/universityTopicData.ts +++ b/webapp/src/app/api/model/universityTopicData.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,8 +10,10 @@ import { YearlyData } from './yearlyData'; import { Topic } from './topic'; -export interface UniversityTopicData { - university: string; - topic: Topic; - yearly_data: Array; + +export interface UniversityTopicData { + university: string; + topic: Topic; + yearly_data: Array; } + diff --git a/webapp/src/app/api/model/updateAccountRequest.ts b/webapp/src/app/api/model/updateAccountRequest.ts index db502fd9..574f5d0d 100644 --- a/webapp/src/app/api/model/updateAccountRequest.ts +++ b/webapp/src/app/api/model/updateAccountRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,13 +9,15 @@ */ import { UserRole } from './userRole'; -export interface UpdateAccountRequest { - email?: string | null; - name?: string | null; - roles?: Array | null; - organization_id?: string | null; - password?: string | null; - openalex_person_id?: string | null; - deleted?: boolean | null; - activated?: boolean | null; + +export interface UpdateAccountRequest { + email?: string | null; + name?: string | null; + roles?: Array | null; + organization_id?: string | null; + password?: string | null; + openalex_person_id?: string | null; + deleted?: boolean | null; + activated?: boolean | null; } + diff --git a/webapp/src/app/api/model/updateOrganizationRequest.ts b/webapp/src/app/api/model/updateOrganizationRequest.ts index a56b51e7..e12063b6 100644 --- a/webapp/src/app/api/model/updateOrganizationRequest.ts +++ b/webapp/src/app/api/model/updateOrganizationRequest.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 UpdateOrganizationRequest { - name?: string | null; - other_inst_id?: string | null; - deleted?: boolean | null; + +export interface UpdateOrganizationRequest { + name?: string | null; + other_inst_id?: string | null; + deleted?: boolean | null; } + diff --git a/webapp/src/app/api/model/userRole.ts b/webapp/src/app/api/model/userRole.ts index f6d08b53..83b5c595 100644 --- a/webapp/src/app/api/model/userRole.ts +++ b/webapp/src/app/api/model/userRole.ts @@ -1,17 +1,19 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const UserRole = { - SuperAdmin: 'SUPER_ADMIN', - Admin: 'ADMIN', - Manager: 'MANAGER', - User: 'USER', + SuperAdmin: 'SUPER_ADMIN', + Admin: 'ADMIN', + Manager: 'MANAGER', + User: 'USER' } as const; -export type UserRole = (typeof UserRole)[keyof typeof UserRole]; +export type UserRole = typeof UserRole[keyof typeof UserRole]; + 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.ts b/webapp/src/app/api/model/work.ts index 6c6ae99b..07d94a1c 100644 --- a/webapp/src/app/api/model/work.ts +++ b/webapp/src/app/api/model/work.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,46 +24,48 @@ import { WorkHasContent } from './workHasContent'; import { Location } from './location'; import { WorkBiblio } from './workBiblio'; + /** * A scholarly document (article, book, dataset, thesis, etc.) */ -export interface Work { - id?: string | null; - doi?: string | null; - title?: string | null; - display_name?: string | null; - publication_year?: number | null; - publication_date?: string | null; - type?: string | null; - language?: string | null; - cited_by_count?: number | null; - is_retracted?: boolean | null; - is_paratext?: boolean | null; - primary_location?: Location | null; - locations?: Array | null; - best_oa_location?: Location | null; - open_access?: OpenAccess | null; - authorships?: Array | null; - ids?: WorkIds | null; - biblio?: WorkBiblio | null; - abstract_inverted_index?: object | null; - referenced_works?: Array | null; - referenced_works_count?: number | null; - related_works?: Array | null; - topics?: Array | null; - primary_topic?: WorkTopic | null; - keywords?: Array | null; - funders?: Array | null; - awards?: Array | null; - fwci?: Fwci | null; - citation_normalized_percentile?: WorkCitationNormalizedPercentile | null; - cited_by_percentile_year?: WorkCitedByPercentileYear | null; - counts_by_year?: Array | null; - sustainable_development_goals?: Array | null; - mesh?: Array | null; - indexed_in?: Array | null; - has_content?: WorkHasContent | null; - content_url?: string | null; - created_date?: string | null; - updated_date?: string | null; +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 deleted file mode 100644 index 285d2065..00000000 --- a/webapp/src/app/api/model/workPage.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/workPurpose.ts b/webapp/src/app/api/model/workPurpose.ts index c31dc8a1..df980e6a 100644 --- a/webapp/src/app/api/model/workPurpose.ts +++ b/webapp/src/app/api/model/workPurpose.ts @@ -1,20 +1,23 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + /** * Represents the purpose of a work. */ export const WorkPurpose = { - BasicResearch: 'Basic Research', - AppliedResearch: 'Applied Research', - NonResearch: 'Non-Research', - ExperimentalDevelopment: 'Experimental Development', + BasicResearch: 'Basic Research', + AppliedResearch: 'Applied Research', + NonResearch: 'Non-Research', + ExperimentalDevelopment: 'Experimental Development', + NotClassified: 'Not Classified' } as const; -export type WorkPurpose = (typeof WorkPurpose)[keyof typeof WorkPurpose]; +export type WorkPurpose = typeof WorkPurpose[keyof typeof WorkPurpose]; + diff --git a/webapp/src/app/api/model/workSortBy.ts b/webapp/src/app/api/model/workSortBy.ts index 56f89162..7580ac82 100644 --- a/webapp/src/app/api/model/workSortBy.ts +++ b/webapp/src/app/api/model/workSortBy.ts @@ -1,18 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ + export const WorkSortBy = { - Title: 'title', - Type: 'type', - PublicationYear: 'publication_year', - Language: 'language', - CitedByCount: 'cited_by_count', + Title: 'title', + Type: 'type', + PublicationYear: 'publication_year', + Language: 'language', + CitedByCount: 'cited_by_count' } as const; -export type WorkSortBy = (typeof WorkSortBy)[keyof typeof WorkSortBy]; +export type WorkSortBy = typeof WorkSortBy[keyof typeof WorkSortBy]; + 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 4b365f33..f938cb25 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,15 +12,17 @@ import { WorkTopicDomain } from './workTopicDomain'; import { WorkTopicSubfield } from './workTopicSubfield'; import { WorkTopicField } from './workTopicField'; + /** * WorkTopic */ -export interface WorkTopic { - id?: string | null; - display_name?: string | null; - description?: string | null; - score?: Score | null; - subfield?: WorkTopicSubfield | null; - field?: WorkTopicField | null; - domain?: WorkTopicDomain | null; +export interface WorkTopic { + id?: string | null; + display_name?: string | null; + description?: 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/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/model/yearlyData.ts b/webapp/src/app/api/model/yearlyData.ts index d473f13e..3272805e 100644 --- a/webapp/src/app/api/model/yearlyData.ts +++ b/webapp/src/app/api/model/yearlyData.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 YearlyData { - year: number; - publications: number; - citations: number; + +export interface YearlyData { + year: number; + publications: number; + citations: number; } + 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 40f31992..3a33bf8c 100644 --- a/webapp/src/app/app.routes.ts +++ b/webapp/src/app/app.routes.ts @@ -29,7 +29,10 @@ import { KeywordsToNewsResultsComponent } from './modules/keywords-search/search import { KeywordsToWorksResultsComponent } from './modules/keywords-search/search-results/works-results/works-results.component'; import { UniTrendParentComponent } from './modules/university-ranking/uni-trend-parent/uni-trend-parent.component'; import { authorWorkPurposesResolver } from './resolvers/author-work-purposes.resolver'; -import { workPageResolver } from './resolvers/work-page.resolver'; +import { + RESOLVING_WORK_PAGE_FOR, + workPageResolver, +} from './resolvers/work-page.resolver'; import { selectedTopicsResolver } from './resolvers/selected-topics.resolver'; import { selectedInstitutionsResolver } from './resolvers/selected-institutions.resolver'; import { roleGuard } from './shared/guards/role.guard'; @@ -384,6 +387,9 @@ export const routes: Routes = [ authorWorkPage: workPageResolver, authorWorkPurposes: authorWorkPurposesResolver, }, + data: { + resolvingFor: RESOLVING_WORK_PAGE_FOR.PERSON, + }, }, { path: 'network', diff --git a/webapp/src/app/modules/person-publications/person-publications.component.html b/webapp/src/app/modules/person-publications/person-publications.component.html index 53a465c2..da7dc9f4 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.html +++ b/webapp/src/app/modules/person-publications/person-publications.component.html @@ -38,6 +38,9 @@ + @@ -215,153 +218,13 @@ Zurücksetzen - - @if ( - selectedInstitutionIdsQueryParams().length || - selectedTopicIdsQueryParams().length || - selectedYearsQueryParams().length || - selectedTypesQueryParams().length || - selectedLanguagesQueryParams().length - ) { -
- Aktive Filter: -
- @for (year of selectedYearsQueryParams(); track year) { - - - calendar_today - {{ year }} - - - - } - @for (type of selectedTypesQueryParams(); track type) { - - - category - {{ type }} - - - - } - @for ( - language of selectedLanguagesQueryParams(); - track language - ) { - - - translate - {{ - language | languageCode - }} - - - - } - @for (topic of selectedTopics(); track topic.id) { - - - label - {{ - topic.display_name - }} - - - - } - @for ( - institution of selectedInstitutions(); - track institution.id - ) { - @let instCountry = selectedInstitutionCountry(institution); - - - apartment - {{ - institution.display_name - }} - @if (instCountry) { - - {{ - instCountry.toUpperCase() - }} - } - open_in_new - - - - } -
-
- } -
- -
+ + + - - - {{ work.title }} - - - - @if (work.type) { - - } @else { - - - } - - - - @if (work.publication_year) { - - } @else { - - - } - - - - @if (work.language) { - - } @else { - - - } - - - - @let publicationInstitutions = work.institutions ?? []; - @let institutionsExpanded = isWorkInstitutionsExpanded(work); - @let visibleInstitutions = - institutionsExpanded - ? publicationInstitutions - : publicationInstitutions.slice(0, 3); -
- @for ( - institution of visibleInstitutions; - track institution.institution_id - ) { - - } @empty { - - - } - @if (publicationInstitutions.length > 3) { - - } -
-
- - - @let workTopics = work.topics ?? []; -
- @for (topic of workTopics; track topic.id) { - - - } @empty { - - - } -
-
- - - {{ work.cited_by_count ?? 0 }} - - - - - open_in_new - - diff --git a/webapp/src/app/modules/person-publications/person-publications.component.ts b/webapp/src/app/modules/person-publications/person-publications.component.ts index 885f9cdf..431bc9ff 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.ts +++ b/webapp/src/app/modules/person-publications/person-publications.component.ts @@ -2,23 +2,21 @@ import { Component, DestroyRef, OnInit, - TemplateRef, computed, effect, inject, input, - viewChild, } from '@angular/core'; import { HttpClient, HttpParams } from '@angular/common/http'; import { FormControl, ReactiveFormsModule } from '@angular/forms'; -import { ActivatedRoute, Router, RouterLink } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { MatAutocompleteModule, MatAutocompleteSelectedEvent, } from '@angular/material/autocomplete'; import { MatIconModule } from '@angular/material/icon'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; import { MatTableModule } from '@angular/material/table'; import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; @@ -37,20 +35,17 @@ import { } from 'rxjs'; import { - AuthorWork, - AuthorWorkInstitution, - AuthorWorkPage, AuthorWorkPurposes, + InseWorksV2ModelWorkPage, Institution, InstitutionsService, SpecificWorkPurpose, + Work, WorkPurpose, WorksService, WorkTopic, } from '../../api'; import { PaginationService } from '../../shared/services/pagination.service'; -import { ChipComponent } from '../../shared/ui/chip/chip.component'; -import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component'; import { topicHierarchyColor } from '../../resolvers/utils/topic-colors'; import { buildTopicHierarchyTooltip } from '../../resolvers/utils/topic-tooltip'; import { NgxEchartsDirective } from 'ngx-echarts'; @@ -64,14 +59,16 @@ import { CanvasRenderer } from 'echarts/renderers'; import { GraphChart } from 'echarts/charts'; import { MatCardModule } from '@angular/material/card'; import { MatExpansionModule } from '@angular/material/expansion'; -import { - GenericColumn, - DataTableComponent, -} from '../../shared/ui/data-table/data-table.component'; -import { WorkTypePipe } from '../../shared/pipes/work-type.pipe'; -import { LanguageCodePipe } from '../../shared/pipes/language-code.pipe'; +import { translateWorkType } from '../../shared/pipes/work-type.pipe'; +import { translateLanguageCode } from '../../shared/pipes/language-code.pipe'; import { QueryParamPaginatorComponent } from '../../shared/ui/query-param-paginator/query-param-paginator.component'; import { AppInfoCardComponent } from '../../shared/ui/app-info-card/app-info-card.component'; +import { PublicationTableComponent } from '../../shared/ui/publication-table/publication-table.component'; +import { workQueryParamKeys } from '../../resolvers/work-page.resolver'; +import { + FilterObserver, + SelectedFiltersComponent, +} from '../../shared/ui/selected-filters/selected-filters.component'; echarts.use([ GridComponent, CanvasRenderer, @@ -114,26 +111,28 @@ interface YearlyPurposeCounts { appliedResearch: number; nonResearch: number; experimentalDevelopment: number; + notClassified: number; } const PURPOSE_LABELS: Record< | 'BASIC_RESEARCH' | 'APPLIED_RESEARCH' | 'NON_RESEARCH' - | 'EXPERIMENTAL_DEVELOPMENT', + | 'EXPERIMENTAL_DEVELOPMENT' + | 'NOT_CLASSIFIED', string > = { BASIC_RESEARCH: 'Grundlagenforschung', APPLIED_RESEARCH: 'anwendungsbasierte Forschung', NON_RESEARCH: 'nicht-forschende Tätigkeit', EXPERIMENTAL_DEVELOPMENT: 'experimentelle Entwicklung', + NOT_CLASSIFIED: 'nicht klassifiziert', }; @Component({ selector: 'app-person-publications', imports: [ MatButtonModule, MatAutocompleteModule, - ChipComponent, MatIconModule, MatFormFieldModule, MatInputModule, @@ -143,16 +142,13 @@ const PURPOSE_LABELS: Record< MatTableModule, MatTooltipModule, ReactiveFormsModule, - RouterLink, - TopicChipComponent, NgxEchartsDirective, MatCardModule, MatExpansionModule, - DataTableComponent, - WorkTypePipe, - LanguageCodePipe, QueryParamPaginatorComponent, AppInfoCardComponent, + PublicationTableComponent, + SelectedFiltersComponent, ], templateUrl: './person-publications.component.html', styleUrl: './person-publications.component.scss', @@ -162,7 +158,7 @@ export class PersonPublicationsComponent implements OnInit { private readonly worksService = inject(WorksService); - authorWorkPage = input.required(); + authorWorkPage = input.required(); totalElements = computed(() => this.authorWorkPage().total ?? 0); elements = computed(() => this.authorWorkPage().elements ?? []); @@ -198,14 +194,69 @@ export class PersonPublicationsComponent implements OnInit { WorkPurpose.ExperimentalDevelopment, ); }); + notClassifiedAmmount = computed(() => { + return this.countPurpose( + this.authorWorkPurposes().purposes || [], + WorkPurpose.NotClassified, + ); + }); expandedWorkInstitutionsId: string[] = []; - isWorkInstitutionsExpanded(work: AuthorWork): boolean { + observers: FilterObserver[] = [ + { + id: 'types', + queryParamKey: workQueryParamKeys.types, + icon: 'category', + valueFormatter: (value: string) => { + return translateWorkType(value) || value; + }, + }, + { + id: 'years', + queryParamKey: workQueryParamKeys.years, + icon: 'calendar_today', + }, + + { + id: 'languages', + queryParamKey: workQueryParamKeys.language, + icon: 'translate', + valueFormatter: (value: string) => { + return translateLanguageCode(value) || value; + }, + }, + { + id: 'institutions', + queryParamKey: workQueryParamKeys.institutionId, + icon: 'apartment', + valueFormatter: (value: string) => { + const institution = this.selectedInstitutions().find( + (inst) => inst.id === value, + ); + return institution ? institution.display_name : value; + }, + }, + { + id: 'topics', + queryParamKey: workQueryParamKeys.topicId, + icon: 'label', + valueFormatter: (value: string) => { + const topic = this.selectedTopics().find((t) => t.id === value); + return topic ? topic.display_name : value; + }, + }, + ]; + + isWorkInstitutionsExpanded(work: Work): boolean { + if (!work.id) return false; + return this.expandedWorkInstitutionsId.includes(work.id); } - toggleWorkInstitutionsExpansion(work: AuthorWork): void { + toggleWorkInstitutionsExpansion(work: Work): void { + if (!work.id) return; + if (this.expandedWorkInstitutionsId.includes(work.id)) { this.expandedWorkInstitutionsId = this.expandedWorkInstitutionsId.filter( (id) => id !== work.id, @@ -230,16 +281,6 @@ export class PersonPublicationsComponent implements OnInit { chartOption!: echarts.EChartsCoreOption; - workColumns: GenericColumn[] = []; - titleTmp = viewChild.required>('titleTmp'); - typeTmp = viewChild.required>('typeTmp'); - yearTmp = viewChild.required>('yearTmp'); - languageTmp = viewChild.required>('languageTmp'); - institutionsTmp = viewChild.required>('institutionsTmp'); - topicsTmp = viewChild.required>('topicsTmp'); - citationsTmp = viewChild.required>('citationsTmp'); - actionsTmp = viewChild.required>('actionsTmp'); - institutionLookupLoading = false; topicLookupLoading = false; institutionOptions: InstitutionAutocompleteOption[] = []; @@ -258,20 +299,6 @@ export class PersonPublicationsComponent implements OnInit { readonly publicationYearOptions = this.createPublicationYearOptions(); - private readonly queryParamKeys = { - page: 'page', - pageSize: 'size', - years: 'publicationYear', - types: 'publicationType', - languages: 'publicationLanguage', - institutionIds: 'publicationInstitutionId', - institutionNames: 'publicationInstitutionName', - topicIds: 'publicationTopicId', - topicNames: 'publicationTopicName', - topicFields: 'publicationTopicField', - topicDomains: 'publicationTopicDomain', - } as const; - readonly typeOptions = [ { value: 'article', label: 'article' }, { value: 'book', label: 'book' }, @@ -304,7 +331,6 @@ export class PersonPublicationsComponent implements OnInit { private readonly router: Router, private readonly httpClient: HttpClient, public readonly paginationService: PaginationService, - private readonly snackBar: MatSnackBar, private readonly institutionsService: InstitutionsService, ) { effect(() => { @@ -320,28 +346,28 @@ export class PersonPublicationsComponent implements OnInit { }); selectedYearsQueryParams = computed(() => { - return this.queryParamMap().getAll(this.queryParamKeys.years).map(Number); + return this.queryParamMap().getAll(workQueryParamKeys.years).map(Number); }); handleYearSelectionChange(event: MatSelectChange): void { this.router.navigate([], { queryParams: { - [this.queryParamKeys.years]: event.value, - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.years]: event.value, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } selectedTypesQueryParams = computed(() => { - return this.queryParamMap().getAll(this.queryParamKeys.types); + return this.queryParamMap().getAll(workQueryParamKeys.types); }); handleTypeSelectionChange(event: MatSelectChange): void { this.router.navigate([], { queryParams: { - [this.queryParamKeys.types]: event.value, - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.types]: event.value, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -349,15 +375,19 @@ export class PersonPublicationsComponent implements OnInit { } selectedLanguagesQueryParams = computed(() => { - return this.queryParamMap().getAll(this.queryParamKeys.languages); + return this.queryParamMap().getAll(workQueryParamKeys.language); }); resolvedInstitutions = computed(() => { - const institutionMap = new Map(); + const institutionMap = new Map(); for (const work of this.elements()) { - for (const institution of work.institutions ?? []) { - if (!institutionMap.has(institution.institution_id)) { - institutionMap.set(institution.institution_id, institution); + for (const authorship of work.authorships ?? []) { + for (const institution of authorship.institutions ?? []) { + if (!institution.id) continue; + + if (!institutionMap.has(institution.id)) { + institutionMap.set(institution.id, institution); + } } } } @@ -367,8 +397,8 @@ export class PersonPublicationsComponent implements OnInit { handleLanguageSelectionChange(event: MatSelectChange): void { this.router.navigate([], { queryParams: { - [this.queryParamKeys.languages]: event.value, - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.language]: event.value, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -376,11 +406,11 @@ export class PersonPublicationsComponent implements OnInit { } selectedInstitutionIdsQueryParams = computed(() => { - return this.queryParamMap().getAll(this.queryParamKeys.institutionIds); + return this.queryParamMap().getAll(workQueryParamKeys.institutionId); }); selectedTopicIdsQueryParams = computed(() => { - return this.queryParamMap().getAll(this.queryParamKeys.topicIds); + return this.queryParamMap().getAll(workQueryParamKeys.topicId); }); getAuthorSpecificWorkPurposesByYear( @@ -411,6 +441,7 @@ export class PersonPublicationsComponent implements OnInit { appliedResearch: 0, nonResearch: 0, experimentalDevelopment: 0, + notClassified: 0, }; for (const purpose of purposes) { if (purpose.purpose == WorkPurpose.BasicResearch) { @@ -421,6 +452,8 @@ export class PersonPublicationsComponent implements OnInit { counts.nonResearch++; } else if (purpose.purpose == WorkPurpose.ExperimentalDevelopment) { counts.experimentalDevelopment++; + } else if (purpose.purpose == WorkPurpose.NotClassified) { + counts.notClassified++; } } return counts; @@ -437,6 +470,7 @@ export class PersonPublicationsComponent implements OnInit { PURPOSE_LABELS.APPLIED_RESEARCH, PURPOSE_LABELS.NON_RESEARCH, PURPOSE_LABELS.EXPERIMENTAL_DEVELOPMENT, + PURPOSE_LABELS.NOT_CLASSIFIED, ], bottom: 0, itemGap: 40, @@ -482,6 +516,13 @@ export class PersonPublicationsComponent implements OnInit { emphasis: { focus: 'series' }, data: data.map((d) => d.experimentalDevelopment), }, + { + name: PURPOSE_LABELS.NOT_CLASSIFIED, + type: 'bar', + stack: 'total', + emphasis: { focus: 'series' }, + data: data.map((d) => d.notClassified), + }, ], }; } @@ -489,61 +530,6 @@ export class PersonPublicationsComponent implements OnInit { ngOnInit(): void { this.setupInstitutionAutocomplete(); this.setupTopicAutocomplete(); - - this.workColumns = [ - { - id: 'title', - header: 'Titel', - type: 'accessor', - accessorKey: 'title', - cellTemplate: this.titleTmp(), - }, - { - id: 'type', - header: 'Typ', - type: 'accessor', - accessorKey: 'type', - cellTemplate: this.typeTmp(), - }, - { - id: 'publication_year', - header: 'Jahr', - type: 'accessor', - accessorKey: 'publication_year', - cellTemplate: this.yearTmp(), - }, - { - id: 'language', - header: 'Sprache', - type: 'display', - cellTemplate: this.languageTmp(), - }, - { - id: 'institutions', - header: 'Institutionen', - type: 'display', - cellTemplate: this.institutionsTmp(), - }, - { - id: 'topics', - header: 'Themen', - type: 'display', - cellTemplate: this.topicsTmp(), - }, - { - id: 'cited_by_count', - header: 'Zitiert von', - type: 'accessor', - accessorKey: 'cited_by_count', - cellTemplate: this.citationsTmp(), - }, - { - id: 'actions', - header: 'Aktionen', - type: 'display', - cellTemplate: this.actionsTmp(), - }, - ]; } clearFilters(): void { @@ -567,11 +553,11 @@ export class PersonPublicationsComponent implements OnInit { if (!this.selectedInstitutionIdsQueryParams().includes(institution.id)) { this.router.navigate([], { queryParams: { - [this.queryParamKeys.institutionIds]: [ + [workQueryParamKeys.institutionId]: [ ...this.selectedInstitutionIdsQueryParams(), institution.id, ], - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -581,11 +567,11 @@ export class PersonPublicationsComponent implements OnInit { removeInstitution(institution: InstitutionAutocompleteOption): void { this.router.navigate([], { queryParams: { - [this.queryParamKeys.institutionIds]: + [workQueryParamKeys.institutionId]: this.selectedInstitutionIdsQueryParams().filter( (id) => id !== institution.id, ), - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -597,21 +583,21 @@ export class PersonPublicationsComponent implements OnInit { if (selectedInstitutionIds.includes(institution.id)) { this.router.navigate([], { queryParams: { - [this.queryParamKeys.institutionIds]: selectedInstitutionIds.filter( + [workQueryParamKeys.institutionId]: selectedInstitutionIds.filter( (id) => id !== institution.id, ), - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } else { this.router.navigate([], { queryParams: { - [this.queryParamKeys.institutionIds]: [ + [workQueryParamKeys.institutionId]: [ ...selectedInstitutionIds, institution.id, ], - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -629,12 +615,11 @@ export class PersonPublicationsComponent implements OnInit { const authorWorkPage = this.authorWorkPage(); if (!authorWorkPage?.elements) return null; for (const publication of authorWorkPage.elements) { - for (const inst of publication.institutions ?? []) { - if ( - institution.id === inst.institution_id && - inst.institution_country_code - ) { - return inst.institution_country_code; + for (const authorship of publication.authorships ?? []) { + for (const inst of authorship.institutions ?? []) { + if (institution.id === inst.id && inst.country_code) { + return inst.country_code; + } } } } @@ -646,16 +631,16 @@ export class PersonPublicationsComponent implements OnInit { if (selectedYears.includes(year)) { this.router.navigate([], { queryParams: { - [this.queryParamKeys.years]: selectedYears.filter((y) => y !== year), - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.years]: selectedYears.filter((y) => y !== year), + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } else { this.router.navigate([], { queryParams: { - [this.queryParamKeys.years]: [...selectedYears, year], - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.years]: [...selectedYears, year], + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -667,16 +652,16 @@ export class PersonPublicationsComponent implements OnInit { if (selectedTopics.includes(type)) { this.router.navigate([], { queryParams: { - [this.queryParamKeys.types]: selectedTopics.filter((t) => t !== type), - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.types]: selectedTopics.filter((t) => t !== type), + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } else { this.router.navigate([], { queryParams: { - [this.queryParamKeys.types]: [...selectedTopics, type], - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.types]: [...selectedTopics, type], + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -688,18 +673,18 @@ export class PersonPublicationsComponent implements OnInit { if (selectedLanguages.includes(language)) { this.router.navigate([], { queryParams: { - [this.queryParamKeys.languages]: selectedLanguages.filter( + [workQueryParamKeys.language]: selectedLanguages.filter( (l) => l !== language, ), - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } else { this.router.navigate([], { queryParams: { - [this.queryParamKeys.languages]: [...selectedLanguages, language], - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.language]: [...selectedLanguages, language], + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); @@ -728,40 +713,29 @@ export class PersonPublicationsComponent implements OnInit { if (!this.selectedTopicIdsQueryParams().includes(topic.id)) { this.router.navigate([], { queryParams: { - [this.queryParamKeys.topicIds]: [ + [workQueryParamKeys.topicId]: [ ...this.selectedTopicIdsQueryParams(), topic.id, ], - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } } - private fieldNameFromHint( - hint: string | null | undefined, - ): string | undefined { - const fieldName = (hint ?? '').split('·')[0]?.trim(); - return fieldName || undefined; - } - removeTopic(topic: TopicAutocompleteOption): void { this.router.navigate([], { queryParams: { - [this.queryParamKeys.topicIds]: - this.selectedTopicIdsQueryParams().filter((id) => id !== topic.id), - [this.queryParamKeys.page]: 0, + [workQueryParamKeys.topicId]: this.selectedTopicIdsQueryParams().filter( + (id) => id !== topic.id, + ), + [workQueryParamKeys.page]: 0, }, queryParamsHandling: 'merge', }); } - doiUrl(doi: string | null | undefined): string | null { - if (!doi) return null; - return doi.startsWith('http') ? doi : `https://doi.org/${doi}`; - } - extractRawId(id: string | null | undefined): string | null { if (!id) return null; return id.split('/').filter(Boolean).pop() ?? null; @@ -801,80 +775,6 @@ export class PersonPublicationsComponent implements OnInit { }); } - getSelectedTopicTooltip(topic: TopicAutocompleteOption): string { - const workTopic = this.findPublicationTopic(topic.id); - - return buildTopicHierarchyTooltip({ - topicName: topic.display_name, - description: workTopic?.description, - subfieldName: workTopic?.subfield?.display_name, - fieldName: workTopic?.field?.display_name ?? topic.field_name, - domainName: workTopic?.domain?.display_name ?? topic.domain_name, - }); - } - - private findPublicationTopic( - topicId: string | null | undefined, - ): WorkTopic | undefined { - if (!topicId) return undefined; - - const authorWorkPage = this.authorWorkPage(); - if (!authorWorkPage?.elements) return undefined; - - for (const publication of authorWorkPage.elements) { - const topic = publication.topics?.find((item) => item.id === topicId); - if (topic) return topic; - } - - return undefined; - } - - getSelectedTopicColor(topic: TopicAutocompleteOption): string { - return topicHierarchyColor({ - id: topic.id, - name: topic.display_name, - field_id: topic.field_id, - field_name: topic.field_name, - domain_id: topic.domain_id, - domain_name: topic.domain_name, - }); - } - - isTopicActive(topic: WorkTopic): boolean { - return !!topic.id && this.selectedTopicIdsQueryParams().includes(topic.id); - } - - filterByTopic(topic: WorkTopic): void { - if (!topic.id) return; - const selectedTopicIds = this.selectedTopicIdsQueryParams(); - if (selectedTopicIds.includes(topic.id)) { - this.router.navigate([], { - queryParams: { - [this.queryParamKeys.topicIds]: selectedTopicIds.filter( - (id) => id !== topic.id, - ), - [this.queryParamKeys.page]: 0, - }, - queryParamsHandling: 'merge', - }); - } else { - this.router.navigate([], { - queryParams: { - [this.queryParamKeys.topicIds]: [...selectedTopicIds, topic.id], - [this.queryParamKeys.page]: 0, - }, - queryParamsHandling: 'merge', - }); - } - } - - typeColor(type: string | null | undefined): string { - const normalized = (type ?? '').toLowerCase(); - if (normalized.includes('conference')) return 'success'; - if (normalized.includes('book')) return 'help'; - return 'info'; - } - yearSelectionSummary(): string { return this.summarizeSelection(this.selectedYearsQueryParams().map(String)); } diff --git a/webapp/src/app/resolvers/selected-institutions.resolver.ts b/webapp/src/app/resolvers/selected-institutions.resolver.ts index d5a7cbb2..1caa739f 100644 --- a/webapp/src/app/resolvers/selected-institutions.resolver.ts +++ b/webapp/src/app/resolvers/selected-institutions.resolver.ts @@ -6,11 +6,13 @@ export const selectedInstitutionsResolver: ResolveFn> = ( route, state, ) => { - const institutionIds = route.queryParamMap.getAll('publicationInstitutionId'); + const institutionIdQueryParamKey = + (route.data['institutionIdQueryParamKey'] as string) || 'institutionId'; + + const institutionIds = route.queryParamMap.getAll(institutionIdQueryParamKey); if (institutionIds.length === 0) { return []; } - console.log('Resolving selected institutions for IDs:', institutionIds); return inject(WorksV2Service).getInstitutionsByIds( institutionIds.map((id) => id.trim()).filter((id) => id.length > 0), diff --git a/webapp/src/app/resolvers/selected-topics.resolver.ts b/webapp/src/app/resolvers/selected-topics.resolver.ts index f538d122..05bcc4aa 100644 --- a/webapp/src/app/resolvers/selected-topics.resolver.ts +++ b/webapp/src/app/resolvers/selected-topics.resolver.ts @@ -6,11 +6,13 @@ export const selectedTopicsResolver: ResolveFn> = ( route, state, ) => { - const topicIds = route.queryParamMap.getAll('publicationTopicId'); + const topicIdQueryParamKey = + (route.data['topicIdQueryParamKey'] as string) || 'topicId'; + + const topicIds = route.queryParamMap.getAll(topicIdQueryParamKey); if (topicIds.length === 0) { return []; } - console.log('Resolving selected topics for IDs:', topicIds); return inject(WorksV2Service).getWorkTopicsByIds( topicIds.map((id) => id.trim()).filter((id) => id.length > 0), diff --git a/webapp/src/app/resolvers/work-page.resolver.ts b/webapp/src/app/resolvers/work-page.resolver.ts index bf1a0d8d..b3e183b3 100644 --- a/webapp/src/app/resolvers/work-page.resolver.ts +++ b/webapp/src/app/resolvers/work-page.resolver.ts @@ -1,32 +1,71 @@ -import { ResolveFn } from '@angular/router'; import { - AuthorWorkPage, + ActivatedRouteSnapshot, + ResolveFn, + RouterStateSnapshot, +} from '@angular/router'; +import { + InseWorksV2ModelWorkPage, SortDirection, WorkSortBy, WorksV2Service, } from '../api'; import { inject } from '@angular/core'; -export const workPageResolver: ResolveFn = (route, state) => { +const RESOLVING_WORK_PAGE_FOR_KEY = 'resolvingFor'; +export const RESOLVING_WORK_PAGE_FOR = { + PERSON: 'PERSON', + INSTITUTION: 'INSTITUTION', +} as const; + +export const workQueryParamKeys = { + page: 'page', + size: 'size', + years: 'years', + types: 'types', + language: 'language', + authorId: 'authorId', + institutionId: 'institutionId', + topicId: 'topicId', + sortBy: 'sort_by', + sortDirection: 'sort_direction', +} as const; + +export const workPageResolver: ResolveFn = ( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot, +) => { + const resolvingFor: (typeof RESOLVING_WORK_PAGE_FOR)[keyof typeof RESOLVING_WORK_PAGE_FOR] = + route.data[RESOLVING_WORK_PAGE_FOR_KEY] || RESOLVING_WORK_PAGE_FOR.PERSON; + + console.log( + 'Resolving work page for', + resolvingFor, + 'with route data:', + route.data, + ); + const rawOaAuthorId = route.parent?.paramMap.get('id') || route.paramMap.get('id'); if (!rawOaAuthorId) { throw new Error('Author ID is required to resolve author work purposes.'); } - const page = Number(route.queryParamMap.get('page')) || 0; - const size = Number(route.queryParamMap.get('size')) || 10; + const page = Number(route.queryParamMap.get(workQueryParamKeys.page)) || 0; + const size = Number(route.queryParamMap.get(workQueryParamKeys.size)) || 10; const publicationYears = route.queryParamMap - .getAll('publicationYear') + .getAll(workQueryParamKeys.years) .map(Number); - const publicationTypes = route.queryParamMap.getAll('publicationType'); - const institutionIds = route.queryParamMap.getAll('publicationInstitutionId'); - const topicIds = route.queryParamMap.getAll('publicationTopicId'); - - const sortBy: WorkSortBy = (route.queryParamMap.get('sort_by') || - 'publication_year') as WorkSortBy; + const publicationTypes = route.queryParamMap.getAll(workQueryParamKeys.types); + const institutionIds = route.queryParamMap.getAll( + workQueryParamKeys.institutionId, + ); + const topicIds = route.queryParamMap.getAll(workQueryParamKeys.topicId); + const languages = route.queryParamMap.getAll(workQueryParamKeys.language); + const sortBy: WorkSortBy = (route.queryParamMap.get( + workQueryParamKeys.sortBy, + ) || 'publication_year') as WorkSortBy; const sortDirection: SortDirection = (route.queryParamMap.get( - 'sort_direction', + workQueryParamKeys.sortDirection, ) || 'desc') as SortDirection; return inject(WorksV2Service).getAuthorWorkPage( @@ -37,7 +76,7 @@ export const workPageResolver: ResolveFn = (route, state) => { publicationTypes, institutionIds, topicIds, - undefined, + languages, sortBy, sortDirection, ); diff --git a/webapp/src/app/shared/pipes/language-code.pipe.ts b/webapp/src/app/shared/pipes/language-code.pipe.ts index ea985af7..b4b3c809 100644 --- a/webapp/src/app/shared/pipes/language-code.pipe.ts +++ b/webapp/src/app/shared/pipes/language-code.pipe.ts @@ -1,5 +1,64 @@ import { Pipe, PipeTransform } from '@angular/core'; +export const translateLanguageCode = ( + languageCode: string | null | undefined, +): string => { + switch (languageCode) { + case 'en': + return 'Englisch'; + case 'de': + return 'Deutsch'; + case 'fr': + return 'Französisch'; + case 'es': + return 'Spanisch'; + case 'it': + return 'Italienisch'; + case 'pt': + return 'Portugiesisch'; + case 'ru': + return 'Russisch'; + case 'zh': + return 'Chinesisch'; + case 'ja': + return 'Japanisch'; + case 'ar': + return 'Arabisch'; + case 'ko': + return 'Koreanisch'; + case 'nl': + return 'Niederländisch'; + case 'sv': + return 'Schwedisch'; + case 'no': + return 'Norwegisch'; + case 'da': + return 'Dänisch'; + case 'fi': + return 'Finnisch'; + case 'pl': + return 'Polnisch'; + case 'cs': + return 'Tschechisch'; + case 'hu': + return 'Ungarisch'; + case 'tr': + return 'Türkisch'; + case 'el': + return 'Griechisch'; + case 'he': + return 'Hebräisch'; + case 'hi': + return 'Hindi'; + case 'th': + return 'Thailändisch'; + case 'vi': + return 'Vietnamesisch'; + default: + return languageCode ?? 'Unbekannte Sprache'; + } +}; + @Pipe({ name: 'languageCode', }) @@ -8,59 +67,6 @@ export class LanguageCodePipe implements PipeTransform { languageCode: string | null | undefined, ...args: unknown[] ): string { - switch (languageCode) { - case 'en': - return 'Englisch'; - case 'de': - return 'Deutsch'; - case 'fr': - return 'Französisch'; - case 'es': - return 'Spanisch'; - case 'it': - return 'Italienisch'; - case 'pt': - return 'Portugiesisch'; - case 'ru': - return 'Russisch'; - case 'zh': - return 'Chinesisch'; - case 'ja': - return 'Japanisch'; - case 'ar': - return 'Arabisch'; - case 'ko': - return 'Koreanisch'; - case 'nl': - return 'Niederländisch'; - case 'sv': - return 'Schwedisch'; - case 'no': - return 'Norwegisch'; - case 'da': - return 'Dänisch'; - case 'fi': - return 'Finnisch'; - case 'pl': - return 'Polnisch'; - case 'cs': - return 'Tschechisch'; - case 'hu': - return 'Ungarisch'; - case 'tr': - return 'Türkisch'; - case 'el': - return 'Griechisch'; - case 'he': - return 'Hebräisch'; - case 'hi': - return 'Hindi'; - case 'th': - return 'Thailändisch'; - case 'vi': - return 'Vietnamesisch'; - default: - return languageCode ?? 'Unbekannte Sprache'; - } + return translateLanguageCode(languageCode); } } diff --git a/webapp/src/app/shared/pipes/work-type.pipe.ts b/webapp/src/app/shared/pipes/work-type.pipe.ts index eebedae6..5c8634de 100644 --- a/webapp/src/app/shared/pipes/work-type.pipe.ts +++ b/webapp/src/app/shared/pipes/work-type.pipe.ts @@ -1,27 +1,31 @@ import { Pipe, PipeTransform } from '@angular/core'; +export const translateWorkType = (value: string | null | undefined): string => { + switch (value) { + case 'article': + return 'Artikel'; + case 'book': + return 'Buch'; + case 'book-chapter': + return 'Buchkapitel'; + case 'dataset': + return 'Datensatz'; + case 'dissertation': + return 'Dissertation'; + case 'report': + return 'Bericht'; + case 'preprint': + return 'Preprint'; + default: + return value ?? 'Unbekannter Typ'; + } +}; + @Pipe({ name: 'workType', }) export class WorkTypePipe implements PipeTransform { transform(value: string | null | undefined, ...args: unknown[]): string { - switch (value) { - case 'article': - return 'Artikel'; - case 'book': - return 'Buch'; - case 'book-chapter': - return 'Buchkapitel'; - case 'dataset': - return 'Datensatz'; - case 'dissertation': - return 'Dissertation'; - case 'report': - return 'Bericht'; - case 'preprint': - return 'Preprint'; - default: - return value ?? 'Unbekannter Typ'; - } + return translateWorkType(value); } } diff --git a/webapp/src/app/shared/ui/publication-table/publication-table.component.html b/webapp/src/app/shared/ui/publication-table/publication-table.component.html new file mode 100644 index 00000000..37442727 --- /dev/null +++ b/webapp/src/app/shared/ui/publication-table/publication-table.component.html @@ -0,0 +1,184 @@ + + + + {{ work.title }} + + + + @if (work.type) { + + } @else { + - + } + + + + @if (work.publication_year) { + + } @else { + - + } + + + + @if (work.language) { + + } @else { + - + } + + + + @let workAuthors = getWorkAuthors(work); + @let workAuthorsExpanded = isWorkAuthorsExpanded(work); + @let visibleAuthors = + workAuthorsExpanded ? workAuthors : workAuthors.slice(0, 3); +
+ @for (author of visibleAuthors; track author.id) { + + } @empty { + - + } + @if (workAuthors.length > 3) { + + } +
+
+ + + @let publicationInstitutions = getWorkInstitutions(work); + @let institutionsExpanded = isWorkInstitutionsExpanded(work); + @let visibleInstitutions = + institutionsExpanded + ? publicationInstitutions + : publicationInstitutions.slice(0, 3); +
+ @for (institution of visibleInstitutions; track institution.id) { + + } @empty { + - + } + @if (publicationInstitutions.length > 3) { + + } +
+
+ + + @let workTopics = work.topics ?? []; +
+ @for (topic of workTopics; track topic.id) { + + + } @empty { + - + } +
+
+ + + {{ work.cited_by_count ?? 0 }} + + + + + open_in_new + + diff --git a/webapp/src/app/shared/ui/publication-table/publication-table.component.scss b/webapp/src/app/shared/ui/publication-table/publication-table.component.scss new file mode 100644 index 00000000..fe4f1b94 --- /dev/null +++ b/webapp/src/app/shared/ui/publication-table/publication-table.component.scss @@ -0,0 +1,594 @@ +.page { + padding: 28px 32px 42px; + max-width: 100%; + margin: 0 auto; +} + +.publication-filter-stack { + display: flex; + align-items: flex-start; + flex-direction: column; + gap: 8px; + padding-top: 10px; + padding-bottom: 25px; +} + +.publication-filters { + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + align-items: center; + gap: 10px; +} + +.publication-filters mat-form-field { + width: 175px; +} + +.publication-filters .institution-filter, +.publication-filters .topic-filter { + flex: 1 1 200px; + width: auto; + min-width: 180px; + max-width: 320px; +} + +.publication-filters .sort-field { + width: 235px; +} + +.publication-filters .reset-filter-btn { + min-width: 132px; + height: 42px; + padding: 0 14px; + border-color: #d9e2f0; + border-radius: var(--sg-radius-sm); + color: var(--sg-text); + background: #fff; +} + +.publication-filters .reset-filter-btn mat-icon { + margin-right: 6px; + width: 20px; + height: 20px; + font-size: 20px; +} + +::ng-deep .publication-filters .mat-mdc-form-field-subscript-wrapper { + display: none; +} + +::ng-deep .publication-filters .mat-mdc-text-field-wrapper { + height: 42px; + background: var(--sg-surface-soft); + border: 1px solid var(--sg-border); + border-radius: var(--sg-radius-sm); + transition: + border-color 0.15s, + box-shadow 0.15s; +} + +::ng-deep .publication-filters .mat-focused .mat-mdc-text-field-wrapper { + border-color: var(--sg-primary); + box-shadow: 0 0 0 2px var(--sg-primary-soft); +} + +::ng-deep .publication-filters .mat-mdc-form-field-flex { + height: 100%; + align-items: center; +} + +::ng-deep .publication-filters .mat-mdc-form-field-infix { + min-height: 0; + padding-top: 0; + padding-bottom: 0; +} + +::ng-deep .publication-filters .mdc-notched-outline__leading, +::ng-deep .publication-filters .mdc-notched-outline__notch, +::ng-deep .publication-filters .mdc-notched-outline__trailing { + border: none; +} + +.filter-prefix-icon { + width: 18px; + height: 18px; + font-size: 18px; + color: var(--sg-text-soft); +} + +::ng-deep .publication-filters .mat-mdc-form-field-icon-prefix { + padding: 0 4px 0 10px; + color: var(--sg-text-soft); +} + +::ng-deep .publication-filters .mat-mdc-select-value, +::ng-deep .publication-filters input.mat-mdc-input-element { + color: var(--sg-text); + font-size: 14px; +} + +::ng-deep .publication-filters .mat-mdc-select-placeholder, +::ng-deep .publication-filters input.mat-mdc-input-element::placeholder { + color: var(--sg-text-muted); + opacity: 1; + font-size: 14px; +} + +::ng-deep .publication-filters .mat-mdc-form-field-icon-suffix, +::ng-deep .publication-filters .mat-mdc-select-arrow-wrapper { + transform: none; +} + +.active-filters-row { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 10px; + padding: 8px 16px; + border: 1px solid var(--sg-border); + border-radius: var(--sg-radius-sm); + background: var(--sg-surface); + font-size: 13px; +} + +.active-filters-label { + font-weight: 600; + color: var(--sg-text-muted); +} + +.chips-container { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 6px; +} + +.filter-meta-chip { + display: inline-flex; + align-items: center; + padding: 2px 8px; + border: 1px solid var(--sg-border-strong); + border-radius: 4px; + background: var(--sg-surface-soft); + color: var(--sg-text); + font-size: 11px; + font-weight: 600; +} + +.filter-topic-chip { + display: inline-flex; + align-items: center; + gap: 4px; + max-width: min(320px, 46vw); + padding: 3px 8px; + border-radius: 7px; + background: color-mix(in srgb, var(--topic-color) 22%, #ffffff); + color: color-mix(in srgb, var(--topic-color) 45%, #07163d); + font-size: 11px; + font-weight: 700; + box-shadow: inset 0 0 0 1px + color-mix(in srgb, var(--topic-color) 45%, transparent); +} + +.filter-topic-chip__icon { + flex: 0 0 auto; + width: 14px; + height: 14px; + font-size: 14px; +} + +.active-institution-filter, +.active-meta-filter { + display: inline-flex; + align-items: center; + gap: 4px; + max-width: 100%; +} + +.filter-institution-chip, +.publication-institution-tag { + display: inline-flex; + align-items: center; + padding: 2px 6px; + border: 1px solid var(--sg-primary-border, var(--sg-border)); + border-radius: 4px; + background: var(--sg-primary-soft); + color: var(--sg-primary); + font-size: 10px; + font-weight: 600; + line-height: normal; +} + +.filter-institution-chip { + max-width: 340px; +} + +.publication-institution-tag { + max-width: 100%; + margin: 0; + font-family: inherit; + cursor: pointer; + transition: all 0.2s ease; + + &:hover, + &:focus-visible { + background: var(--sg-primary); + color: #fff; + border-color: var(--sg-primary); + outline: none; + box-shadow: + 0 0 0 2px var(--sg-background), + 0 0 0 4px var(--sg-primary); + } + + &.active { + border-color: var(--sg-primary); + box-shadow: + 0 0 0 1px #ffffff, + 0 0 0 3px var(--sg-primary); + } + + &.active:hover, + &.active:focus-visible { + background: var(--sg-primary); + color: #fff; + } +} + +.filter-institution-chip .institution-icon, +.publication-institution-tag .institution-icon, +.filter-meta-chip__icon { + flex-shrink: 0; + width: 12px; + height: 12px; + margin-right: 4px; + font-size: 12px; +} + +.filter-meta-chip__icon { + color: var(--sg-text-soft); +} + +.filter-institution-chip .institution-name, +.publication-institution-tag .institution-name { + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; + min-width: 0; + white-space: normal; + overflow-wrap: anywhere; +} + +.filter-institution-chip .flag-img, +.publication-institution-tag .flag-img { + flex-shrink: 0; + margin-left: 6px; + border: 1px solid; +} + +.filter-institution-chip .country-code, +.publication-institution-tag .country-code { + flex-shrink: 0; + margin-left: 2px; + font-size: 9px; +} + +.filter-institution-chip .institution-open-icon, +.publication-institution-tag .institution-open-icon { + flex-shrink: 0; + width: 12px; + height: 12px; + margin-left: 5px; + font-size: 12px; + line-height: 1; + cursor: pointer; + opacity: 0; + transition: opacity 0.15s ease; +} + +.filter-institution-chip:hover .institution-open-icon, +.publication-institution-tag:hover .institution-open-icon { + opacity: 0.7; +} + +.filter-institution-chip .institution-open-icon:hover, +.publication-institution-tag .institution-open-icon:hover { + opacity: 1; +} + +.filter-meta-chip__label, +.filter-topic-chip__label { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + min-width: 0; +} + +.active-institution-filter button, +.active-meta-filter button { + display: flex; + padding: 0; + border: 0; + background: transparent; + color: var(--sg-text-soft); + cursor: pointer; + + &:hover { + color: var(--sg-text); + } +} + +.active-institution-filter button mat-icon, +.active-meta-filter button mat-icon { + width: 12px; + height: 12px; + font-size: 12px; +} + +.table-wrap { + position: relative; + overflow-x: auto; +} + +table { + width: 100%; + min-width: 1120px; + border-collapse: separate; + border-spacing: 0 10px; + box-shadow: none; + background: transparent; +} + +.title { + display: inline-block; + max-width: 520px; + line-height: 1.35; + color: var(--sg-text); + font-size: 14px; + font-weight: 700; + text-decoration: none; +} + +a.title:hover { + color: var(--sg-text); + text-decoration: underline; +} + +table.is-hidden { + display: none; +} + +.table-status { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 12px; + min-height: 240px; + padding: 32px; + color: var(--sg-text-muted); + font-size: 14px; + text-align: center; +} + +.empty-text { + color: rgba(0, 0, 0, 0.54); +} + +.cell-filter-pill { + display: inline-flex; + align-items: center; + margin: 0; + padding: 3px 10px; + border: 1px solid var(--sg-border); + border-radius: 999px; + background: #fff; + color: var(--sg-text); + font-family: inherit; + font-size: 12px; + line-height: 1.2; + cursor: pointer; + transition: all 0.2s ease; + + &:hover, + &:focus-visible { + border-color: var(--sg-primary); + background: var(--sg-surface-soft); + outline: none; + } + + &.active { + border-color: var(--sg-primary); + color: var(--sg-primary); + font-weight: 600; + box-shadow: + 0 0 0 1px #ffffff, + 0 0 0 3px var(--sg-primary); + } +} + +.type-filter-btn { + display: inline-flex; + margin: 0; + padding: 0; + border: 0; + border-radius: 7px; + background: transparent; + cursor: pointer; + transition: box-shadow 0.2s ease; + + &:hover, + &:focus-visible { + outline: none; + box-shadow: 0 0 0 1px var(--sg-primary); + } + + &.active { + box-shadow: + 0 0 0 1px #ffffff, + 0 0 0 3px var(--sg-primary); + } +} + +.topic-chips, +.institution-tags { + display: flex; + flex-wrap: wrap; + gap: 6px; +} + +.topic-chips { + max-width: 320px; +} + +.institution-tags { + align-items: flex-start; + max-width: 280px; +} + +.publication-institution-more, +.publication-topic-more { + display: inline-flex; + align-items: center; + min-height: 24px; + padding: 3px 8px; + border: 1px solid var(--sg-border); + border-radius: var(--sg-radius-sm); + background: #fff; + color: var(--sg-text-muted); + font-family: inherit; + font-size: 11px; + line-height: 1.2; + cursor: pointer; + transition: all 0.2s ease; + + &:hover, + &:focus-visible { + border-color: var(--sg-primary); + color: var(--sg-primary); + background: var(--sg-surface-soft); + outline: none; + } +} + +.publication-topic-more { + max-width: 180px; +} + +::ng-deep .mat-mdc-header-cell { + color: var(--sg-text-muted); + font-size: 12px; + font-weight: 700; +} + +::ng-deep .mat-mdc-row { + height: 86px; +} + +::ng-deep .mat-mdc-cell { + color: var(--sg-text); + border-bottom-color: var(--sg-border); + font-size: 13px; +} + +.table-wrap ::ng-deep { + .mat-column-type, + .mat-column-year, + .mat-column-language, + .mat-column-citations, + .mat-mdc-header-cell { + text-align: center; + } + + .mat-mdc-cell:not(:last-child), + .mat-mdc-header-cell:not(:last-child) { + border-right: 1px solid var(--sg-border); + } + + .mat-column-institutions, + .mat-column-topics { + overflow: visible; + } +} + +mat-paginator { + background: transparent; +} + +.table-footer { + display: flex; + align-items: center; + justify-content: space-between; + min-height: 66px; + padding: 0 22px 0 28px; + border: 0; + color: var(--sg-text-muted); + font-size: 13px; +} + +@media (max-width: 600px) { + .page { + padding: 16px; + } + + .table-footer { + align-items: stretch; + flex-direction: column; + } + + .publication-filter-stack { + align-items: stretch; + } + + .publication-filters { + justify-content: stretch; + max-width: none; + } + + .publication-filters mat-form-field, + .publication-filters button { + width: 100%; + } + + .publication-filters .institution-filter, + .publication-filters .topic-filter { + width: 100%; + } + + .active-filters-row { + align-self: stretch; + } +} + +mat-expansion-panel { + border: 1px solid var(--sg-border); + border-radius: var(--sg-radius-sm); + background: var(--sg-none); + box-shadow: none; +} + +mat-expansion-panel-header { + padding: 0 16px; + min-height: 48px; +} + +mat-panel-title { + font-size: 16px; + font-weight: 700; +} + +mat-panel-description { + font-size: 14px; + color: var(--sg-text-muted); +} +// ------------------------ + +.author-tags { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + align-items: flex-start; + max-width: 280px; +} diff --git a/webapp/src/app/shared/ui/publication-table/publication-table.component.ts b/webapp/src/app/shared/ui/publication-table/publication-table.component.ts new file mode 100644 index 00000000..99123503 --- /dev/null +++ b/webapp/src/app/shared/ui/publication-table/publication-table.component.ts @@ -0,0 +1,429 @@ +import { + Component, + computed, + inject, + input, + OnInit, + TemplateRef, + viewChild, +} from '@angular/core'; +import { + DataTableComponent, + GenericColumn, +} from '../data-table/data-table.component'; +import { + DehydratedAuthor, + InseWorksV2ModelWorkPage, + Institution, + Work, + WorkTopic, +} from '../../../api'; +import { TopicChipComponent } from '../topic-chip/topic-chip.component'; +import { MatIconModule } from '@angular/material/icon'; +import { toSignal } from '@angular/core/rxjs-interop'; +import { ActivatedRoute, Router, RouterModule } from '@angular/router'; +import { ChipComponent } from '../chip/chip.component'; +import { WorkTypePipe } from '../../pipes/work-type.pipe'; +import { LanguageCodePipe } from '../../pipes/language-code.pipe'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { topicHierarchyColor } from '../../../resolvers/utils/topic-colors'; +import { MatButtonModule } from '@angular/material/button'; +import { workQueryParamKeys } from '../../../resolvers/work-page.resolver'; + +@Component({ + selector: 'app-publication-table', + imports: [ + MatIconModule, + MatTooltipModule, + MatButtonModule, + RouterModule, + DataTableComponent, + TopicChipComponent, + ChipComponent, + WorkTypePipe, + LanguageCodePipe, + ], + templateUrl: './publication-table.component.html', + styleUrl: './publication-table.component.scss', +}) +export class PublicationTableComponent implements OnInit { + page = input.required(); + authorFilterEnabled = input(false); + institutionFilterEnabled = input(false); + + elements = computed(() => this.page().elements ?? []); + + columns: GenericColumn[] = []; + titleTmp = viewChild.required>('titleTmp'); + typeTmp = viewChild.required>('typeTmp'); + yearTmp = viewChild.required>('yearTmp'); + languageTmp = viewChild.required>('languageTmp'); + authorsTmp = viewChild.required>('authorsTmp'); + institutionsTmp = viewChild.required>('institutionsTmp'); + topicsTmp = viewChild.required>('topicsTmp'); + citationsTmp = viewChild.required>('citationsTmp'); + actionsTmp = viewChild.required>('actionsTmp'); + + private readonly activatedRoute = inject(ActivatedRoute); + private readonly router = inject(Router); + + queryParamMap = toSignal(this.activatedRoute.queryParamMap, { + initialValue: this.activatedRoute.snapshot.queryParamMap, + }); + + selectedYearsQueryParams = computed(() => { + return this.queryParamMap().getAll(workQueryParamKeys.years).map(Number); + }); + + selectedTypesQueryParams = computed(() => { + return this.queryParamMap().getAll(workQueryParamKeys.types); + }); + + selectedLanguagesQueryParams = computed(() => { + return this.queryParamMap().getAll(workQueryParamKeys.language); + }); + + selectedAuthorIdsQueryParams = computed(() => { + return this.queryParamMap().getAll(workQueryParamKeys.authorId); + }); + + selectedInstitutionIdsQueryParams = computed(() => { + return this.queryParamMap().getAll(workQueryParamKeys.institutionId); + }); + + selectedTopicIdsQueryParams = computed(() => { + return this.queryParamMap().getAll(workQueryParamKeys.topicId); + }); + + ngOnInit(): void { + this.columns = [ + { + id: 'title', + header: 'Titel', + type: 'accessor', + accessorKey: 'title', + cellTemplate: this.titleTmp(), + }, + { + id: 'type', + header: 'Typ', + type: 'accessor', + accessorKey: 'type', + cellTemplate: this.typeTmp(), + }, + { + id: 'publication_year', + header: 'Jahr', + type: 'accessor', + accessorKey: 'publication_year', + cellTemplate: this.yearTmp(), + }, + { + id: 'language', + header: 'Sprache', + type: 'accessor', + accessorKey: 'language', + cellTemplate: this.languageTmp(), + }, + { + id: 'authors', + header: 'Autoren', + type: 'display', + cellTemplate: this.authorsTmp(), + }, + { + id: 'institutions', + header: 'Institutionen', + type: 'display', + cellTemplate: this.institutionsTmp(), + }, + + { + id: 'topics', + header: 'Themen', + type: 'display', + cellTemplate: this.topicsTmp(), + }, + { + id: 'cited_by_count', + header: 'Zitiert von', + type: 'accessor', + accessorKey: 'cited_by_count', + cellTemplate: this.citationsTmp(), + }, + { + id: 'actions', + header: 'Aktionen', + type: 'display', + cellTemplate: this.actionsTmp(), + }, + ]; + } + + isTypeActive(type: string): boolean { + return this.selectedTypesQueryParams().includes(type); + } + + isAuthorActive(authorId: string): boolean { + return ( + !!authorId && + this.authorFilterEnabled() && + this.selectedAuthorIdsQueryParams().includes(authorId) + ); + } + + toggleTypeFilter(type: string): void { + const selectedTopics = this.selectedTypesQueryParams(); + if (selectedTopics.includes(type)) { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.types]: selectedTopics.filter((t) => t !== type), + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } else { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.types]: [...selectedTopics, type], + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } + } + + typeColor(type: string | null | undefined): string { + const normalized = (type ?? '').toLowerCase(); + if (normalized.includes('conference')) return 'success'; + if (normalized.includes('book')) return 'help'; + return 'info'; + } + + isYearActive(year: number): boolean { + return this.selectedYearsQueryParams().includes(year); + } + + toggleYearFilter(year: number): void { + const selectedYears = this.selectedYearsQueryParams(); + if (selectedYears.includes(year)) { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.years]: selectedYears.filter((y) => y !== year), + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } else { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.years]: [...selectedYears, year], + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } + } + + isLanguageActive(language: string): boolean { + return this.selectedLanguagesQueryParams().includes(language); + } + + toggleLanguageFilter(language: string): void { + const selectedLanguages = this.selectedLanguagesQueryParams(); + if (selectedLanguages.includes(language)) { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.language]: selectedLanguages.filter( + (l) => l !== language, + ), + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } else { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.language]: [...selectedLanguages, language], + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } + } + + expandedWorkInstitutionsId: string[] = []; + expandedWorkAuthorsId: string[] = []; + + isWorkInstitutionsExpanded(work: Work): boolean { + if (!work.id) return false; + + return this.expandedWorkInstitutionsId.includes(work.id); + } + + toggleWorkInstitutionsExpansion(work: Work): void { + if (!work.id) return; + + if (this.expandedWorkInstitutionsId.includes(work.id)) { + this.expandedWorkInstitutionsId = this.expandedWorkInstitutionsId.filter( + (id) => id !== work.id, + ); + } else { + this.expandedWorkInstitutionsId.push(work.id); + } + } + + isWorkAuthorsExpanded(work: Work): boolean { + if (!work.id) return false; + + return this.expandedWorkAuthorsId.includes(work.id); + } + + toggleWorkAuthorsExpansion(work: Work): void { + if (!work.id) return; + + if (this.expandedWorkAuthorsId.includes(work.id)) { + this.expandedWorkAuthorsId = this.expandedWorkAuthorsId.filter( + (id) => id !== work.id, + ); + } else { + this.expandedWorkAuthorsId.push(work.id); + } + } + + isInstitutionActive(id: string): boolean { + return !!id && this.selectedInstitutionIdsQueryParams().includes(id); + } + + filterByInstitution(institution: Institution): void { + if (!institution.id || !this.institutionFilterEnabled()) return; + const selectedInstitutionIds = this.selectedInstitutionIdsQueryParams(); + if (selectedInstitutionIds.includes(institution.id)) { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.institutionId]: selectedInstitutionIds.filter( + (id) => id !== institution.id, + ), + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } else { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.institutionId]: [ + ...selectedInstitutionIds, + institution.id, + ], + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } + } + + filterByAuthor(authorId: string): void { + if (!authorId || !this.authorFilterEnabled()) return; + const selectedAuthorIds = this.selectedAuthorIdsQueryParams(); + if (selectedAuthorIds.includes(authorId)) { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.authorId]: selectedAuthorIds.filter( + (id) => id !== authorId, + ), + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } else { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.authorId]: [...selectedAuthorIds, authorId], + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } + } + + getWorkTopicColor(topic: WorkTopic): string { + return topicHierarchyColor({ + id: topic.id, + name: topic.display_name, + field_id: topic.field?.id, + field_name: topic.field?.display_name, + domain_id: topic.domain?.id, + domain_name: topic.domain?.display_name, + }); + } + + isTopicActive(topic: WorkTopic): boolean { + return !!topic.id && this.selectedTopicIdsQueryParams().includes(topic.id); + } + + filterByTopic(topic: WorkTopic): void { + if (!topic.id) return; + const selectedTopicIds = this.selectedTopicIdsQueryParams(); + if (selectedTopicIds.includes(topic.id)) { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.topicId]: selectedTopicIds.filter( + (id) => id !== topic.id, + ), + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } else { + this.router.navigate([], { + queryParams: { + [workQueryParamKeys.topicId]: [...selectedTopicIds, topic.id], + [workQueryParamKeys.page]: 0, + }, + queryParamsHandling: 'merge', + }); + } + } + + extractRawId(id: string | null | undefined): string | null { + if (!id) return null; + + return id.split('/').filter(Boolean).pop() ?? null; + } + + getWorkInstitutions(work: Work): Institution[] { + const institutions = new Map(); + + for (const authorship of work.authorships ?? []) { + if (!authorship.institutions) continue; + + for (const institution of authorship.institutions) { + if (!institution.id) continue; + institutions.set(institution.id, institution); + } + } + return Array.from(institutions.values()); + } + + getWorkAuthors(work: Work): DehydratedAuthor[] { + return ( + work.authorships + ?.map((a) => a.author) + .filter((a): a is DehydratedAuthor => !!a) || [] + ); + } + + getAuthorTooltipText(author: DehydratedAuthor): string { + if (this.authorFilterEnabled()) { + return `Nach Autor filtern: ${author.display_name}`; + } + return `Autor: ${author.display_name}`; + } + + getInstitutionTooltipText(institution: Institution): string { + if (this.institutionFilterEnabled()) { + return `Nach Institution filtern: ${institution.display_name}`; + } + return `Institution: ${institution.display_name}`; + } +} diff --git a/webapp/src/app/shared/ui/selected-filters/selected-filters.component.html b/webapp/src/app/shared/ui/selected-filters/selected-filters.component.html new file mode 100644 index 00000000..3ee1a5cb --- /dev/null +++ b/webapp/src/app/shared/ui/selected-filters/selected-filters.component.html @@ -0,0 +1,40 @@ +@if (hasActiveFilters()) { +
+ Aktive Filter: +
+ @for (key of observedQueryParamValuesMap().keys(); track $index) { + @let observer = observerMap().get(key)!; + + @let tmp = observerMap().get(key)?.template; + @for (value of observedQueryParamValuesMap().get(key); track $index) { +
+ @if (tmp) { + + } @else { +
+ @if (observer.icon) { + {{ + observer.icon + }} + } + {{ + formatValue(observer, value) + }} +
+ } + +
+ } + } +
+
+} diff --git a/webapp/src/app/shared/ui/selected-filters/selected-filters.component.scss b/webapp/src/app/shared/ui/selected-filters/selected-filters.component.scss new file mode 100644 index 00000000..b602b881 --- /dev/null +++ b/webapp/src/app/shared/ui/selected-filters/selected-filters.component.scss @@ -0,0 +1,77 @@ +.active-filters-row { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 10px; + padding: 8px 16px; + border: 1px solid var(--sg-border); + border-radius: var(--sg-radius-sm); + background: var(--sg-surface); + font-size: 13px; +} + +@media (max-width: 600px) { + .active-filters-row { + align-self: stretch; + } +} + +.active-filters-label { + font-weight: 600; + color: var(--sg-text-muted); +} + +.chips-container { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 6px; +} + +.active-meta-filter { + display: inline-flex; + align-items: center; + gap: 4px; + max-width: 100%; +} + +.active-meta-filter button { + display: flex; + padding: 0; + border: 0; + background: transparent; + color: var(--sg-text-soft); + cursor: pointer; + + &:hover { + color: var(--sg-text); + } +} + +.filter-meta-chip__icon { + flex-shrink: 0; + width: 12px; + height: 12px; + margin-right: 4px; + font-size: 12px; + color: var(--sg-text-soft); +} + +.filter-meta-chip { + display: inline-flex; + align-items: center; + padding: 2px 8px; + border: 1px solid var(--sg-border-strong); + border-radius: 4px; + background: var(--sg-surface-soft); + color: var(--sg-text); + font-size: 11px; + font-weight: 600; +} + +.filter-meta-chip__label { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + min-width: 0; +} diff --git a/webapp/src/app/shared/ui/selected-filters/selected-filters.component.ts b/webapp/src/app/shared/ui/selected-filters/selected-filters.component.ts new file mode 100644 index 00000000..7a57a8f8 --- /dev/null +++ b/webapp/src/app/shared/ui/selected-filters/selected-filters.component.ts @@ -0,0 +1,91 @@ +import { Component, computed, input, TemplateRef } from '@angular/core'; +import { toSignal } from '@angular/core/rxjs-interop'; +import { ActivatedRoute, Router } from '@angular/router'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; +import { NgTemplateOutlet } from '@angular/common'; + +export interface FilterObserver { + id: string; + queryParamKey: string; + icon?: string; + valueFormatter?: (value: string) => string | null | undefined; + handleRemove?: (value: string) => void; + template?: TemplateRef; +} + +@Component({ + selector: 'app-selected-filters', + imports: [MatIconModule, MatButtonModule, NgTemplateOutlet], + templateUrl: './selected-filters.component.html', + styleUrl: './selected-filters.component.scss', +}) +export class SelectedFiltersComponent { + observers = input.required(); + + observedQueryParamKeys = computed(() => + this.observers().map((observer) => observer.queryParamKey), + ); + + observerMap = computed(() => { + const map = new Map(); + this.observers().forEach((observer) => { + map.set(observer.queryParamKey, observer); + }); + return map; + }); + + queryParamMap = toSignal(this.activatedRoute.queryParamMap, { + initialValue: this.activatedRoute.snapshot.queryParamMap, + }); + + observedQueryParamValuesMap = computed(() => { + const map = new Map(); + this.observedQueryParamKeys().forEach((key) => { + const values = this.queryParamMap().getAll(key); + if (values.length > 0) { + map.set(key, values); + } + }); + return map; + }); + + hasActiveFilters = computed( + () => this.observedQueryParamValuesMap().size > 0, + ); + + constructor( + private readonly activatedRoute: ActivatedRoute, + private readonly router: Router, + ) {} + + formatValue( + observer: FilterObserver, + value: string, + ): string | null | undefined { + if (observer.valueFormatter) { + return observer.valueFormatter(value); + } + return value; + } + + _handleRemove(observer: FilterObserver, value: string) { + if (observer.handleRemove) { + observer.handleRemove(value); + } else { + this.removeFilter(observer.queryParamKey, value); + } + } + + removeFilter(queryParamKey: string, value: string) { + this.router.navigate([], { + relativeTo: this.activatedRoute, + queryParams: { + [queryParamKey]: this.queryParamMap() + .getAll(queryParamKey) + .filter((v) => v !== value), + }, + queryParamsHandling: 'merge', + }); + } +}