diff --git a/.gitignore b/.gitignore index 50b40718..fb1f98b9 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,6 @@ angular-app/.angular # Ignore sentence-transformer local model cache service/sentence_transformer/models/ -llm_evaluations/bio_generation/.venv \ No newline at end of file +llm_evaluations/bio_generation/.venv + +.devcontainer diff --git a/service/src/main/inse/ranking/logic.py b/service/src/main/inse/ranking/logic.py index bde34bc2..e8aacfd5 100644 --- a/service/src/main/inse/ranking/logic.py +++ b/service/src/main/inse/ranking/logic.py @@ -28,6 +28,9 @@ from .model import ( RankingWeights, SubfieldShare, Timespan, + FieldNode, + SubfieldNode, + TopicNode, ) logger = logging.getLogger(__name__) @@ -487,6 +490,49 @@ def _topic_profile_query( "size": 10, }, }, + # topic treemap + "by_field": { + "terms": { + "field": "primary_topic.field.id", + "size": 30, + }, + "aggs": { + "field_name": { + "terms": { + "field": "primary_topic.field.display_name.keyword", + "size": 1, + }, + }, + "by_subfield": { + "terms": { + "field": "primary_topic.subfield.id", + "size": 30, + }, + "aggs": { + "subfield_name": { + "terms": { + "field": "primary_topic.subfield.display_name.keyword", + "size": 1, + }, + }, + "by_topic": { + "terms": { + "field": "primary_topic.id", + "size": 30, + }, + "aggs": { + "topic_name": { + "terms": { + "field": "primary_topic.display_name.keyword", + "size": 1, + }, + }, + }, + }, + }, + }, + }, + }, "distinct_topics": { "cardinality": {"field": "primary_topic.id"}, }, @@ -549,6 +595,30 @@ async def topic_profile_for_authors( ) for bucket in to_work.get("by_subfield", {}).get("buckets", []) ] + field_tree = [ + FieldNode( + id=field_bucket.get("key", ""), + name=_bucket_name(field_bucket, "field_name", field_bucket.get("key", "")), + count=field_bucket.get("doc_count", 0), + subfields=[ + SubfieldNode( + id=subfield_bucket.get("key", ""), + name=_bucket_name(subfield_bucket, "subfield_name", subfield_bucket.get("key", "")), + count=subfield_bucket.get("doc_count", 0), + topics=[ + TopicNode( + id=topic_bucket.get("key", ""), + name=_bucket_name(topic_bucket, "topic_name", topic_bucket.get("key", "")), + count=topic_bucket.get("doc_count", 0), + ) + for topic_bucket in subfield_bucket.get("by_topic", {}).get("buckets", []) + ], + ) + for subfield_bucket in field_bucket.get("by_subfield", {}).get("buckets", []) + ], + ) + for field_bucket in to_work.get("by_field", {}).get("buckets", []) + ] results.append( AuthorTopicProfile( author_id=author_bucket.get("key", ""), @@ -560,6 +630,7 @@ async def topic_profile_for_authors( distinct_subfields=to_work.get("distinct_subfields", {}).get("value", 0), distinct_fields=to_work.get("distinct_fields", {}).get("value", 0), subfields=subfields, + field_tree=field_tree, ) ) @@ -725,6 +796,14 @@ def _display_name_from_bucket(author_bucket: dict) -> str: return "" +def _bucket_name(bucket: dict, name_agg_key: str, fallback: str) -> str: + """Reads a display name out of a bucket's name sub-aggregation, falling back to its id.""" + name_buckets = bucket.get(name_agg_key, {}).get("buckets", []) + if name_buckets and name_buckets[0].get("key"): + return str(name_buckets[0]["key"]) + return fallback + + def _citations_from_bucket(author_bucket: dict) -> int: """Reads the summed citations out of the reverse_nested sub-aggregation.""" citations_value = ( diff --git a/service/src/main/inse/ranking/model.py b/service/src/main/inse/ranking/model.py index 918ce94a..75522114 100644 --- a/service/src/main/inse/ranking/model.py +++ b/service/src/main/inse/ranking/model.py @@ -282,6 +282,32 @@ class SubfieldShare(BaseModel): count: int = Field(description="Number of works whose primary topic belongs to this subfield.") +class TopicNode(BaseModel): + id: str = Field(description="The OpenAlex ID of the primary topic.") + name: str = Field(description="The primary-topic display name.") + count: int = Field(description="Number of works whose primary topic is this topic.") + + +class SubfieldNode(BaseModel): + id: str = Field(description="The OpenAlex ID of the subfield.") + name: str = Field(description="The subfield display name.") + count: int = Field(description="Number of works whose primary topic belongs to this subfield.") + topics: list[TopicNode] = Field( + default_factory=list, + description="Primary topics within this subfield, largest first.", + ) + + +class FieldNode(BaseModel): + id: str = Field(description="The OpenAlex ID of the field.") + name: str = Field(description="The field display name.") + count: int = Field(description="Number of works whose primary topic belongs to this field.") + subfields: list[SubfieldNode] = Field( + default_factory=list, + description="Subfields within this field, largest first.", + ) + + class AuthorTopicProfile(BaseModel): author_id: str = Field(description="The OpenAlex ID of the author.") display_name: str = Field(description="The name of the author.") @@ -308,6 +334,11 @@ class AuthorTopicProfile(BaseModel): default_factory=list, description="Top subfields over all works, by primary topic, largest first.", ) + field_tree: list[FieldNode] = Field( + default_factory=list, + description="Field -> subfield -> topic hierarchy over all works, by primary " + "topic, each level largest first. Drives the interactive topic treemap.", + ) class AuthorStaticStats(BaseModel): diff --git a/service/src/main/inse/ranking/ranking.http b/service/src/main/inse/ranking/ranking.http index 6fd0c062..d7e49ec3 100644 --- a/service/src/main/inse/ranking/ranking.http +++ b/service/src/main/inse/ranking/ranking.http @@ -116,6 +116,16 @@ Content-Type: application/json "timespan": { "from": 2018, "to": 2025 } } +### +POST http://localhost:8000/api/rank/topic-profile +Content-Type: application/json + +{ + "author_ids": ["https://openalex.org/A504035360", "https://openalex.org/A5019137844"], + "keywords": ["Augmented Reality Applications"], + "operator": "or" +} + ### GET https://project.nes.uni-due.de/elastic/_aliases Authorization: ApiKey am1wWXBaMEJEVWJoZkE5MnBaUlk6TWlvbW1LRlMzNjdDUHgzYmVkUmI5UQ== diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index ac982739..154e0dc5 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -48,4 +48,30 @@ export * from './works.service'; import { WorksService } from './works.service'; export * from './worksV2.service'; import { WorksV2Service } from './worksV2.service'; -export const APIS = [AuthService, AuthorsV2Service, BUNDInstitutionsService, BackgroundJobsService, BookmarksService, CompanyConnectionsService, DFGInstitutionsService, DFGPersonsService, DashboardService, FundingService, INSEServiceService, InstitutionsService, InstitutionsV2Service, KeywordsService, NewsService, OrganizationService, PatentsService, PersonsService, ProjectsService, RankingService, TopicsService, TopicsV2Service, UniversityRankingsService, WorksService, WorksV2Service]; +export const APIS = [ + AuthService, + AuthorsV2Service, + BUNDInstitutionsService, + BackgroundJobsService, + BookmarksService, + CompanyConnectionsService, + DFGInstitutionsService, + DFGPersonsService, + DashboardService, + FundingService, + INSEServiceService, + InstitutionsService, + InstitutionsV2Service, + KeywordsService, + NewsService, + OrganizationService, + PatentsService, + PersonsService, + ProjectsService, + RankingService, + TopicsService, + TopicsV2Service, + UniversityRankingsService, + WorksService, + WorksV2Service, +]; diff --git a/webapp/src/app/api/api/auth.service.ts b/webapp/src/app/api/api/auth.service.ts index a53f4427..535c7da5 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AccessResponse } from '../model/accessResponse'; @@ -50,1029 +56,1877 @@ 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); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Check if user can fetch GDPR-relevant data + * Check if the authenticated user can fetch GDPR-relevant data for a given author and institution. + * @endpoint get /api/auth/v2/can-fetch-gdpr-relevant-data + * @param rawOaAuthorId OpenAlex author ID to check access for + * @param rawOaInstitutionId OpenAlex institution ID to check access for + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public canFetchGdprRelevantData( + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public canFetchGdprRelevantData( + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public canFetchGdprRelevantData( + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public canFetchGdprRelevantData( + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaAuthorId, + 'raw_oa_author_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Check if user can fetch GDPR-relevant data - * Check if the authenticated user can fetch GDPR-relevant data for a given author and institution. - * @endpoint get /api/auth/v2/can-fetch-gdpr-relevant-data - * @param rawOaAuthorId OpenAlex author ID to check access for - * @param rawOaInstitutionId OpenAlex institution ID to check access for - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public canFetchGdprRelevantData(rawOaAuthorId?: string, rawOaInstitutionId?: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaAuthorId, 'raw_oa_author_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/can-fetch-gdpr-relevant-data`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Change Password - * Change the user\'s password and invalidate existing tokens. - * @endpoint post /api/auth/v2/change-password - * @param bodyChangePassword - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public changePassword(bodyChangePassword: BodyChangePassword, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (bodyChangePassword === null || bodyChangePassword === undefined) { - throw new Error('Required parameter bodyChangePassword was null or undefined when calling changePassword.'); - } + let localVarPath = `/api/auth/v2/can-fetch-gdpr-relevant-data`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/change-password`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyChangePassword, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + /** + * 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.', + ); } - /** - * 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; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: createAccountRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Delete Account - * @endpoint delete /api/accounts/{account_id} - * @param accountId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteAccount(accountId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteAccount(accountId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling deleteAccount.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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 - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); } - /** - * Get Access Token - * Retrieve an access token for the authenticated user. - * @endpoint post /api/auth/v2/access - * @param bodyGetAccessToken - * @param idToken - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAccessToken(bodyGetAccessToken: BodyGetAccessToken, idToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (bodyGetAccessToken === null || bodyGetAccessToken === undefined) { - throw new Error('Required parameter bodyGetAccessToken was null or undefined when calling getAccessToken.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/access`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyGetAccessToken, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let 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 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 localVarPath = `/api/auth/v2/change-password`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, { + context: localVarHttpContext, + body: bodyChangePassword, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }); + } - let localVarHeaders = this.defaultHeaders; - - // 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 - } - ); + /** + * 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.', + ); } - /** - * 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; - 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/health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * List Organizations - * @endpoint get /api/accounts/organizations - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAccountOrganizations(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public listAccountOrganizations(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public listAccountOrganizations(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public listAccountOrganizations(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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 - } - ); + // 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, + ); } - /** - * List Accounts - * @endpoint get /api/accounts - * @param page - * @param pageSize - * @param offset - * @param search - * @param organizationId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public listAccounts(page?: number, pageSize?: number, offset?: number, search?: string, organizationId?: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - pageSize, 'page_size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - offset, 'offset'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - search, 'search'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - organizationId, 'organization_id'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * 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 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 localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.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 - } - ); + /** + * 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.', + ); } - /** - * 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; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/logout`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Refresh Access Token - * Refresh the access token using a valid refresh token. - * @endpoint post /api/auth/v2/refresh - * @param refreshToken - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public refreshAccessToken(refreshToken?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public refreshAccessToken(refreshToken?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public refreshAccessToken(refreshToken?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public refreshAccessToken(refreshToken?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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 responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * 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 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 localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.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 - } - ); + /** + * 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.', + ); } - /** - * 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; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/auth/v2/request-password-reset`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: bodyRequestPasswordReset, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Reset Password - * Reset the user\'s password using a one-time password reset token. - * @endpoint post /api/auth/v2/reset-password - * @param bodyResetPassword - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public resetPassword(bodyResetPassword: BodyResetPassword, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public resetPassword(bodyResetPassword: BodyResetPassword, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (bodyResetPassword === null || bodyResetPassword === undefined) { - throw new Error('Required parameter bodyResetPassword was null or undefined when calling resetPassword.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // 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 - } - ); + // 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, + ); } - /** - * Update Account - * @endpoint put /api/accounts/{account_id} - * @param accountId - * @param updateAccountRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateAccount(accountId: string, updateAccountRequest: UpdateAccountRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (accountId === null || accountId === undefined) { - throw new Error('Required parameter accountId was null or undefined when calling updateAccount.'); - } - if (updateAccountRequest === null || updateAccountRequest === undefined) { - throw new Error('Required parameter updateAccountRequest was null or undefined when calling updateAccount.'); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/accounts/${this.configuration.encodeParam({name: "accountId", value: accountId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('put', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: updateAccountRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | '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, + }, + ); + } + + /** + * 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; + + // 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, + }, + ); + } + + /** + * 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/authorsV2.service.ts b/webapp/src/app/api/api/authorsV2.service.ts index 05f90608..3facf7f0 100644 --- a/webapp/src/app/api/api/authorsV2.service.ts +++ b/webapp/src/app/api/api/authorsV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { Author } from '../model/author'; @@ -28,333 +34,613 @@ import { HTTPValidationError } from '../model/hTTPValidationError'; import { StartCollaborationGraphResponse } from '../model/startCollaborationGraphResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AuthorsV2Service extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Returns a paginated list of authors for a given search term based on their display name. + * @endpoint get /api/authors/v2/autocomplete/selector + * @param query A search term to filter authors by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public autocompleteAuthorsForSelector( + query?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public autocompleteAuthorsForSelector( + query?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public autocompleteAuthorsForSelector( + query?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public autocompleteAuthorsForSelector( + query?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a paginated list of authors for a given search term based on their display name. - * @endpoint get /api/authors/v2/autocomplete/selector - * @param query A search term to filter authors by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public autocompleteAuthorsForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public autocompleteAuthorsForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public autocompleteAuthorsForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public autocompleteAuthorsForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let localVarPath = `/api/authors/v2/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + /** + * Returns an author for a given author ID. + * @endpoint get /api/authors/v2/{raw_oa_author_id} + * @param rawOaAuthorId The ID of the author to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorById( + rawOaAuthorId: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getAuthorById( + rawOaAuthorId: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getAuthorById( + rawOaAuthorId: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getAuthorById( + rawOaAuthorId: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error( + 'Required parameter rawOaAuthorId was null or undefined when calling getAuthorById.', + ); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarPath = `/api/authors/v2/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/authors/v2/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns a paginated list of authors for a given list of author IDs. + * @endpoint get /api/authors/v2/authors/id + * @param authorIds A list of author IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorsByIds( + authorIds?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getAuthorsByIds( + authorIds?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getAuthorsByIds( + authorIds?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getAuthorsByIds( + authorIds?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', ); + }); } - /** - * Returns an author for a given author ID. - * @endpoint get /api/authors/v2/{raw_oa_author_id} - * @param rawOaAuthorId The ID of the author to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorById(rawOaAuthorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getAuthorById(rawOaAuthorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAuthorById(rawOaAuthorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAuthorById(rawOaAuthorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorById.'); - } + 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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + let localVarPath = `/api/authors/v2/authors/id`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + /** + * Returns the status of a collaboration graph generation task. + * @endpoint get /api/authors/v2/collaboration-graph/{graph_id}/status + * @param graphId The ID of the collaboration graph generation task. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCollaborationGraphStatus( + graphId: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getCollaborationGraphStatus( + graphId: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getCollaborationGraphStatus( + graphId: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getCollaborationGraphStatus( + graphId: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (graphId === null || graphId === undefined) { + throw new Error( + 'Required parameter graphId was null or undefined when calling getCollaborationGraphStatus.', + ); + } - let localVarPath = `/api/authors/v2/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/authors/v2/collaboration-graph/${this.configuration.encodeParam({ name: 'graphId', value: graphId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns a collaboration graph for a given author ID. + * @endpoint post /api/authors/v2/collaboration-graph + * @param rawOaAuthorId The raw OpenAlex author ID for which to retrieve the collaboration graph. + * @param yearFrom The starting year to filter the works by (optional). + * @param yearTo The ending year to filter the works by (optional). + * @param minCollaborators The minimum number of collaborators to filter the works by (optional). + * @param maxCollaborators The maximum number of collaborators to filter the works by (optional). + * @param topicIds A list of topic IDs to filter the works by (optional). + * @param institutionIds A list of institution IDs to filter the works by (optional). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public startCollaborationGraph( + rawOaAuthorId: string, + yearFrom?: number, + yearTo?: number, + minCollaborators?: number, + maxCollaborators?: number, + topicIds?: Array, + institutionIds?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public startCollaborationGraph( + rawOaAuthorId: string, + yearFrom?: number, + yearTo?: number, + minCollaborators?: number, + maxCollaborators?: number, + topicIds?: Array, + institutionIds?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public startCollaborationGraph( + rawOaAuthorId: string, + yearFrom?: number, + yearTo?: number, + minCollaborators?: number, + maxCollaborators?: number, + topicIds?: Array, + institutionIds?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public startCollaborationGraph( + rawOaAuthorId: string, + yearFrom?: number, + yearTo?: number, + minCollaborators?: number, + maxCollaborators?: number, + topicIds?: Array, + institutionIds?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error( + 'Required parameter rawOaAuthorId was null or undefined when calling startCollaborationGraph.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaAuthorId, + 'raw_oa_author_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + yearFrom, + 'year_from', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + yearTo, + 'year_to', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + minCollaborators, + 'min_collaborators', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + maxCollaborators, + 'max_collaborators', + ); + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', ); + }); } - - /** - * Returns a paginated list of authors for a given list of author IDs. - * @endpoint get /api/authors/v2/authors/id - * @param authorIds A list of author IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorsByIds(authorIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getAuthorsByIds(authorIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAuthorsByIds(authorIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAuthorsByIds(authorIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/authors/v2/authors/id`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', ); + }); } - /** - * Returns the status of a collaboration graph generation task. - * @endpoint get /api/authors/v2/collaboration-graph/{graph_id}/status - * @param graphId The ID of the collaboration graph generation task. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCollaborationGraphStatus(graphId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getCollaborationGraphStatus(graphId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCollaborationGraphStatus(graphId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCollaborationGraphStatus(graphId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (graphId === null || graphId === undefined) { - throw new Error('Required parameter graphId was null or undefined when calling getCollaborationGraphStatus.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/authors/v2/collaboration-graph/${this.configuration.encodeParam({name: "graphId", value: graphId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a collaboration graph for a given author ID. - * @endpoint post /api/authors/v2/collaboration-graph - * @param rawOaAuthorId The raw OpenAlex author ID for which to retrieve the collaboration graph. - * @param yearFrom The starting year to filter the works by (optional). - * @param yearTo The ending year to filter the works by (optional). - * @param minCollaborators The minimum number of collaborators to filter the works by (optional). - * @param maxCollaborators The maximum number of collaborators to filter the works by (optional). - * @param topicIds A list of topic IDs to filter the works by (optional). - * @param institutionIds A list of institution IDs to filter the works by (optional). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public startCollaborationGraph(rawOaAuthorId: string, yearFrom?: number, yearTo?: number, minCollaborators?: number, maxCollaborators?: number, topicIds?: Array, institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error('Required parameter rawOaAuthorId was null or undefined when calling startCollaborationGraph.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaAuthorId, 'raw_oa_author_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - yearFrom, 'year_from'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - yearTo, 'year_to'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - minCollaborators, 'min_collaborators'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - maxCollaborators, 'max_collaborators'); - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/authors/v2/collaboration-graph`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } + let localVarPath = `/api/authors/v2/collaboration-graph`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/bUNDInstitutions.service.ts b/webapp/src/app/api/api/bUNDInstitutions.service.ts index ca741d43..1e01fb85 100644 --- a/webapp/src/app/api/api/bUNDInstitutions.service.ts +++ b/webapp/src/app/api/api/bUNDInstitutions.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { BundInstitutionSummaryPage } from '../model/bundInstitutionSummaryPage'; @@ -22,137 +28,231 @@ import { BundInstitutionSummaryPage } from '../model/bundInstitutionSummaryPage' import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class BUNDInstitutionsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Returns a list of institutions based on a search term for autocomplete functionality. + * @endpoint get /api/bund/institutions/autocomplete/selector + * @param query A search term to filter institutions by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundInstitutionAutocompleteForSelector( + query?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBundInstitutionAutocompleteForSelector( + query?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBundInstitutionAutocompleteForSelector( + query?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBundInstitutionAutocompleteForSelector( + query?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a list of institutions based on a search term for autocomplete functionality. - * @endpoint get /api/bund/institutions/autocomplete/selector - * @param query A search term to filter institutions by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBundInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBundInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let localVarPath = `/api/bund/institutions/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bund/institutions/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + /** + * Returns a list of institutions based on their names. + * @endpoint get /api/bund/institutions/names + * @param institutionNames A list of institution names to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBundInstitutionsByName( + institutionNames?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBundInstitutionsByName( + institutionNames?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBundInstitutionsByName( + institutionNames?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBundInstitutionsByName( + institutionNames?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (institutionNames) { + institutionNames.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_names', ); + }); } - /** - * Returns a list of institutions based on their names. - * @endpoint get /api/bund/institutions/names - * @param institutionNames A list of institution names to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBundInstitutionsByName(institutionNames?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getBundInstitutionsByName(institutionNames?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBundInstitutionsByName(institutionNames?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBundInstitutionsByName(institutionNames?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarHeaders = this.defaultHeaders; - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (institutionNames) { - institutionNames.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_names'); - }) - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/bund/institutions/names`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/bund/institutions/names`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/backgroundJobs.service.ts b/webapp/src/app/api/api/backgroundJobs.service.ts index ce17b079..c8b6c411 100644 --- a/webapp/src/app/api/api/backgroundJobs.service.ts +++ b/webapp/src/app/api/api/backgroundJobs.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AvailableImages } from '../model/availableImages'; @@ -36,682 +42,1293 @@ import { JobRunLogs } from '../model/jobRunLogs'; import { RegistryHealth } from '../model/registryHealth'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class BackgroundJobsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Create Task + * @endpoint post /api/background-jobs/tasks + * @param jobDefinitionCreateRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createBackgroundJobTask( + jobDefinitionCreateRequest: JobDefinitionCreateRequest, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public createBackgroundJobTask( + jobDefinitionCreateRequest: JobDefinitionCreateRequest, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public createBackgroundJobTask( + jobDefinitionCreateRequest: JobDefinitionCreateRequest, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public createBackgroundJobTask( + jobDefinitionCreateRequest: JobDefinitionCreateRequest, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if ( + jobDefinitionCreateRequest === null || + jobDefinitionCreateRequest === undefined + ) { + throw new Error( + 'Required parameter jobDefinitionCreateRequest was null or undefined when calling createBackgroundJobTask.', + ); } - /** - * Create Task - * @endpoint post /api/background-jobs/tasks - * @param jobDefinitionCreateRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createBackgroundJobTask(jobDefinitionCreateRequest: JobDefinitionCreateRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (jobDefinitionCreateRequest === null || jobDefinitionCreateRequest === undefined) { - throw new Error('Required parameter jobDefinitionCreateRequest was null or undefined when calling createBackgroundJobTask.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/tasks`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: jobDefinitionCreateRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Delete Task - * @endpoint delete /api/background-jobs/tasks/{task_id} - * @param taskId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (taskId === null || taskId === undefined) { - throw new Error('Required parameter taskId was null or undefined when calling deleteBackgroundJobTask.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('delete', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); } - /** - * Get Available Images - * @endpoint get /api/background-jobs/available-images - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobAvailableImages(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/available-images`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let 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 Run Logs - * @endpoint get /api/background-jobs/runs/{run_id}/logs - * @param runId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobRunLogs(runId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (runId === null || runId === undefined) { - throw new Error('Required parameter runId was null or undefined when calling getBackgroundJobRunLogs.'); - } + let localVarPath = `/api/background-jobs/tasks`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: jobDefinitionCreateRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/runs/${this.configuration.encodeParam({name: "runId", value: runId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/logs`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + /** + * Delete Task + * @endpoint delete /api/background-jobs/tasks/{task_id} + * @param taskId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public deleteBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public deleteBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public deleteBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (taskId === null || taskId === undefined) { + throw new Error( + 'Required parameter taskId was null or undefined when calling deleteBackgroundJobTask.', + ); } - /** - * Get Task Runs - * @endpoint get /api/background-jobs/tasks/{task_id}/runs - * @param taskId - * @param limit - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getBackgroundJobTaskRuns(taskId: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (taskId === null || taskId === undefined) { - throw new Error('Required parameter taskId was null or undefined when calling getBackgroundJobTaskRuns.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - limit, 'limit'); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/runs`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Get Tasks - * @endpoint get /api/background-jobs/tasks - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBackgroundJobTasks(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobTasks(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getBackgroundJobTasks(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public getBackgroundJobTasks(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/tasks`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Docker Health - * @endpoint get /api/background-jobs/docker-health - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobsDockerHealth(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'delete', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarHeaders = this.defaultHeaders; + /** + * Get Available Images + * @endpoint get /api/background-jobs/available-images + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBackgroundJobAvailableImages( + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBackgroundJobAvailableImages( + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobAvailableImages( + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobAvailableImages( + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/docker-health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Registry Health - * @endpoint get /api/background-jobs/registry-health - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getBackgroundJobsRegistryHealth(secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/registry-health`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Run Task - * @endpoint post /api/background-jobs/tasks/{task_id}/run - * @param taskId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public runBackgroundJobTask(taskId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (taskId === null || taskId === undefined) { - throw new Error('Required parameter taskId was null or undefined when calling runBackgroundJobTask.'); - } + let localVarPath = `/api/background-jobs/available-images`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/run`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + /** + * Get Run Logs + * @endpoint get /api/background-jobs/runs/{run_id}/logs + * @param runId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBackgroundJobRunLogs( + runId: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBackgroundJobRunLogs( + runId: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobRunLogs( + runId: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobRunLogs( + runId: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (runId === null || runId === undefined) { + throw new Error( + 'Required parameter runId was null or undefined when calling getBackgroundJobRunLogs.', + ); } - /** - * Stop Run - * @endpoint post /api/background-jobs/runs/{run_id}/stop - * @param runId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public stopBackgroundJobRun(runId: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (runId === null || runId === undefined) { - throw new Error('Required parameter runId was null or undefined when calling stopBackgroundJobRun.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/runs/${this.configuration.encodeParam({name: "runId", value: runId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}/stop`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Update Task - * @endpoint patch /api/background-jobs/tasks/{task_id} - * @param taskId - * @param jobDefinitionUpdateRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public updateBackgroundJobTask(taskId: number, jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (taskId === null || taskId === undefined) { - throw new Error('Required parameter taskId was null or undefined when calling updateBackgroundJobTask.'); - } - if (jobDefinitionUpdateRequest === null || jobDefinitionUpdateRequest === undefined) { - throw new Error('Required parameter jobDefinitionUpdateRequest was null or undefined when calling updateBackgroundJobTask.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({name: "taskId", value: taskId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('patch', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: jobDefinitionUpdateRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } + let localVarPath = `/api/background-jobs/runs/${this.configuration.encodeParam({ name: 'runId', value: runId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/logs`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get Task Runs + * @endpoint get /api/background-jobs/tasks/{task_id}/runs + * @param taskId + * @param limit + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBackgroundJobTaskRuns( + taskId: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobTaskRuns( + taskId: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public getBackgroundJobTaskRuns( + taskId: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public getBackgroundJobTaskRuns( + taskId: number, + limit?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (taskId === null || taskId === undefined) { + throw new Error( + 'Required parameter taskId was null or undefined when calling getBackgroundJobTaskRuns.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/runs`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get Tasks + * @endpoint get /api/background-jobs/tasks + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBackgroundJobTasks( + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobTasks( + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public getBackgroundJobTasks( + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public getBackgroundJobTasks( + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Docker Health + * @endpoint get /api/background-jobs/docker-health + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBackgroundJobsDockerHealth( + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBackgroundJobsDockerHealth( + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobsDockerHealth( + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobsDockerHealth( + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/docker-health`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Registry Health + * @endpoint get /api/background-jobs/registry-health + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getBackgroundJobsRegistryHealth( + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getBackgroundJobsRegistryHealth( + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobsRegistryHealth( + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getBackgroundJobsRegistryHealth( + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/registry-health`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Run Task + * @endpoint post /api/background-jobs/tasks/{task_id}/run + * @param taskId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public runBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public runBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public runBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public runBackgroundJobTask( + taskId: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (taskId === null || taskId === undefined) { + throw new Error( + 'Required parameter taskId was null or undefined when calling runBackgroundJobTask.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/run`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Stop Run + * @endpoint post /api/background-jobs/runs/{run_id}/stop + * @param runId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public stopBackgroundJobRun( + runId: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public stopBackgroundJobRun( + runId: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public stopBackgroundJobRun( + runId: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public stopBackgroundJobRun( + runId: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (runId === null || runId === undefined) { + throw new Error( + 'Required parameter runId was null or undefined when calling stopBackgroundJobRun.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/runs/${this.configuration.encodeParam({ name: 'runId', value: runId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}/stop`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Update Task + * @endpoint patch /api/background-jobs/tasks/{task_id} + * @param taskId + * @param jobDefinitionUpdateRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateBackgroundJobTask( + taskId: number, + jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public updateBackgroundJobTask( + taskId: number, + jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public updateBackgroundJobTask( + taskId: number, + jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public updateBackgroundJobTask( + taskId: number, + jobDefinitionUpdateRequest: JobDefinitionUpdateRequest, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (taskId === null || taskId === undefined) { + throw new Error( + 'Required parameter taskId was null or undefined when calling updateBackgroundJobTask.', + ); + } + if ( + jobDefinitionUpdateRequest === null || + jobDefinitionUpdateRequest === undefined + ) { + throw new Error( + 'Required parameter jobDefinitionUpdateRequest was null or undefined when calling updateBackgroundJobTask.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/background-jobs/tasks/${this.configuration.encodeParam({ name: 'taskId', value: taskId, in: 'path', style: 'simple', explode: false, dataType: 'number', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'patch', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: jobDefinitionUpdateRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/bookmarks.service.ts b/webapp/src/app/api/api/bookmarks.service.ts index 3e0ec2e8..198f796e 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CreatePersonBookmark } from '../model/createPersonBookmark'; @@ -24,206 +30,375 @@ 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); + } - 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.', + ); } - /** - * 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.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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 localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * 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 localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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 - } - ); + // 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, + ); } - /** - * 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 responseType_: 'text' | 'json' | '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, + }, + ); + } + + /** + * 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 133e8298..e9018fad 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { CompanyConnectionsAvailability } from '../model/companyConnectionsAvailability'; @@ -24,137 +30,249 @@ import { CompanyConnectionsResponse } from '../model/companyConnectionsResponse' import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class CompanyConnectionsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Check whether company connections are available for an author. + * @endpoint get /api/inse-service/authors/{author_id}/company-connections/availability + * @param authorId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompanyConnectionsAvailability( + authorId: string, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getCompanyConnectionsAvailability( + authorId: string, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getCompanyConnectionsAvailability( + authorId: string, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getCompanyConnectionsAvailability( + authorId: string, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorId === null || authorId === undefined) { + throw new Error( + 'Required parameter authorId was null or undefined when calling getCompanyConnectionsAvailability.', + ); } - /** - * Check whether company connections are available for an author. - * @endpoint get /api/inse-service/authors/{author_id}/company-connections/availability - * @param authorId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCompanyConnectionsAvailability(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorId === null || authorId === undefined) { - throw new Error('Required parameter authorId was null or undefined when calling getCompanyConnectionsAvailability.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections/availability`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Get possible company connections by OpenAlex author ID. - * @endpoint get /api/inse-service/authors/{author_id}/company-connections - * @param authorId - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getCompanyConnectionsByAuthor(authorId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorId === null || authorId === undefined) { - throw new Error('Required parameter authorId was null or undefined when calling getCompanyConnectionsByAuthor.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/company-connections`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections/availability`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get possible company connections by OpenAlex author ID. + * @endpoint get /api/inse-service/authors/{author_id}/company-connections + * @param authorId + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCompanyConnectionsByAuthor( + authorId: string, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getCompanyConnectionsByAuthor( + authorId: string, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getCompanyConnectionsByAuthor( + authorId: string, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getCompanyConnectionsByAuthor( + authorId: string, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorId === null || authorId === undefined) { + throw new Error( + 'Required parameter authorId was null or undefined when calling getCompanyConnectionsByAuthor.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/company-connections`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/dFGInstitutions.service.ts b/webapp/src/app/api/api/dFGInstitutions.service.ts index 2582d69a..811cb490 100644 --- a/webapp/src/app/api/api/dFGInstitutions.service.ts +++ b/webapp/src/app/api/api/dFGInstitutions.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage'; @@ -22,137 +28,231 @@ import { DfgInstitutionSummaryPage } from '../model/dfgInstitutionSummaryPage'; import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DFGInstitutionsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Returns a list of institutions based on a search term for autocomplete functionality. + * @endpoint get /api/dfg/institutions/autocomplete/selector + * @param query A search term to filter institutions by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgInstitutionAutocompleteForSelector( + query?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDfgInstitutionAutocompleteForSelector( + query?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgInstitutionAutocompleteForSelector( + query?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgInstitutionAutocompleteForSelector( + query?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a list of institutions based on a search term for autocomplete functionality. - * @endpoint get /api/dfg/institutions/autocomplete/selector - * @param query A search term to filter institutions by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let localVarPath = `/api/dfg/institutions/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dfg/institutions/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + /** + * Returns a list of institutions based on their IDs. + * @endpoint get /api/dfg/institutions/ids + * @param institutionIds A list of institution IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgInstitutionsByIds( + institutionIds?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDfgInstitutionsByIds( + institutionIds?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgInstitutionsByIds( + institutionIds?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgInstitutionsByIds( + institutionIds?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', ); + }); } - /** - * Returns a list of institutions based on their IDs. - * @endpoint get /api/dfg/institutions/ids - * @param institutionIds A list of institution IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgInstitutionsByIds(institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDfgInstitutionsByIds(institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgInstitutionsByIds(institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgInstitutionsByIds(institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarHeaders = this.defaultHeaders; - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dfg/institutions/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dfg/institutions/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/dFGPersons.service.ts b/webapp/src/app/api/api/dFGPersons.service.ts index edfcf946..19c2589a 100644 --- a/webapp/src/app/api/api/dFGPersons.service.ts +++ b/webapp/src/app/api/api/dFGPersons.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage'; @@ -22,137 +28,231 @@ import { DfgPersonSummaryPage } from '../model/dfgPersonSummaryPage'; import { HTTPValidationError } from '../model/hTTPValidationError'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DFGPersonsService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Returns a list of persons based on a search term for autocomplete functionality. + * @endpoint get /api/dfg/persons/autocomplete/selector + * @param query A search term to filter persons by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgPersonAutocompleteForSelector( + query?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDfgPersonAutocompleteForSelector( + query?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgPersonAutocompleteForSelector( + query?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgPersonAutocompleteForSelector( + query?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a list of persons based on a search term for autocomplete functionality. - * @endpoint get /api/dfg/persons/autocomplete/selector - * @param query A search term to filter persons by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgPersonAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgPersonAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let localVarPath = `/api/dfg/persons/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dfg/persons/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + /** + * Returns a list of persons based on their IDs. + * @endpoint get /api/dfg/persons/ids + * @param personIds A list of person IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgPersonsByIds( + personIds?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDfgPersonsByIds( + personIds?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgPersonsByIds( + personIds?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgPersonsByIds( + personIds?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (personIds) { + personIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'person_ids', ); + }); } - /** - * Returns a list of persons based on their IDs. - * @endpoint get /api/dfg/persons/ids - * @param personIds A list of person IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgPersonsByIds(personIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDfgPersonsByIds(personIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgPersonsByIds(personIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgPersonsByIds(personIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarHeaders = this.defaultHeaders; - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (personIds) { - personIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'person_ids'); - }) - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dfg/persons/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dfg/persons/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/dashboard.service.ts b/webapp/src/app/api/api/dashboard.service.ts index 86b699a1..a7dfe885 100644 --- a/webapp/src/app/api/api/dashboard.service.ts +++ b/webapp/src/app/api/api/dashboard.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { BmbfProjectStatusStatistics } from '../model/bmbfProjectStatusStatistics'; @@ -38,921 +44,1820 @@ import { TopicHeatmap } from '../model/topicHeatmap'; import { TopicWordCloud } from '../model/topicWordCloud'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DashboardService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Dashboard Bmbf Project Statuses + * @endpoint get /api/dashboard/projects/bmbf/status + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardBmbfProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardBmbfProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardBmbfProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardBmbfProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Bmbf Project Statuses - * @endpoint get /api/dashboard/projects/bmbf/status - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardBmbfProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardBmbfProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/projects/bmbf/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Bmbf Projects - * @endpoint get /api/dashboard/statistics/projects/bmbf - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardBmbfProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardBmbfProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardBmbfProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/bmbf/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + /** + * Dashboard Bmbf Projects + * @endpoint get /api/dashboard/statistics/projects/bmbf + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardBmbfProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardBmbfProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardBmbfProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardBmbfProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/projects/bmbf`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Dfg Project Statuses - * @endpoint get /api/dashboard/projects/dfg/status - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardDfgProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardDfgProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/projects/dfg/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Dfg Project Topics - * @endpoint get /api/dashboard/projects/dfg/topics - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardDfgProjectTopics(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardDfgProjectTopics(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectTopics(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjectTopics(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/statistics/projects/bmbf`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + /** + * Dashboard Dfg Project Statuses + * @endpoint get /api/dashboard/projects/dfg/status + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardDfgProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardDfgProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardDfgProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardDfgProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/projects/dfg/topics`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Dfg Projects - * @endpoint get /api/dashboard/statistics/projects/dfg - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardDfgProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardDfgProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardDfgProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/projects/dfg`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Eu Project Statuses - * @endpoint get /api/dashboard/projects/eu/status - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardEuProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardEuProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjectStatuses(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/dfg/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + /** + * Dashboard Dfg Project Topics + * @endpoint get /api/dashboard/projects/dfg/topics + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardDfgProjectTopics( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardDfgProjectTopics( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardDfgProjectTopics( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardDfgProjectTopics( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/projects/eu/status`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Eu Projects - * @endpoint get /api/dashboard/statistics/projects/eu - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardEuProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardEuProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardEuProjects(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/projects/eu`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Patents - * @endpoint get /api/dashboard/statistics/patents - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardPatents(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardPatents(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPatents(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPatents(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/dfg/topics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + /** + * Dashboard Dfg Projects + * @endpoint get /api/dashboard/statistics/projects/dfg + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardDfgProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardDfgProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardDfgProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardDfgProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Persons - * @endpoint get /api/dashboard/statistics/persons - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardPersons(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardPersons(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPersons(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPersons(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/persons`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Publications - * @endpoint get /api/dashboard/statistics/publications - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardPublications(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardPublications(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPublications(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardPublications(fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/statistics/projects/dfg`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + /** + * Dashboard Eu Project Statuses + * @endpoint get /api/dashboard/projects/eu/status + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardEuProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardEuProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardEuProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardEuProjectStatuses( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/statistics/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 - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * 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 { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/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 - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Top Authors - * @endpoint get /api/dashboard/top-authors - * @param worksPeriod - * @param fromYear - * @param toYear - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', fromYear?: number, toYear?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopAuthors(worksPeriod?: 'all_time' | 'last_5_years', fromYear?: number, toYear?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + let localVarPath = `/api/dashboard/projects/eu/status`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - worksPeriod, 'works_period'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); + /** + * Dashboard Eu Projects + * @endpoint get /api/dashboard/statistics/projects/eu + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardEuProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardEuProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardEuProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardEuProjects( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/top-authors`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Dashboard Topic Heatmap - * @endpoint get /api/dashboard/topic-heatmap - * @param 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 { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - 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'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/topic-heatmap`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Dashboard Topic Word Cloud - * @endpoint get /api/dashboard/topic-wordcloud - * @param topicId - * @param fromYear - * @param toYear - * @param limit - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDashboardTopicWordCloud(topicId: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDashboardTopicWordCloud(topicId: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopicWordCloud(topicId: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDashboardTopicWordCloud(topicId: string, fromYear?: number, toYear?: number, limit?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (topicId === null || topicId === undefined) { - throw new Error('Required parameter topicId was null or undefined when calling getDashboardTopicWordCloud.'); - } + let localVarPath = `/api/dashboard/statistics/projects/eu`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - topicId, 'topicId'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fromYear, 'from_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - toYear, 'to_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - limit, 'limit'); + /** + * Dashboard Patents + * @endpoint get /api/dashboard/statistics/patents + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardPatents( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardPatents( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardPatents( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardPatents( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/dashboard/topic-wordcloud`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Dashboard Persons + * @endpoint get /api/dashboard/statistics/persons + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardPersons( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardPersons( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardPersons( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardPersons( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); + + let 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/persons`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Dashboard Publications + * @endpoint get /api/dashboard/statistics/publications + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardPublications( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardPublications( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardPublications( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardPublications( + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics/publications`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Dashboard Statistics + * @endpoint get /api/dashboard/statistics + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardStatistics( + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardStatistics( + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardStatistics( + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardStatistics( + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/statistics`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Dashboard Top Authors + * @endpoint get /api/dashboard/top-authors + * @param worksPeriod + * @param fromYear + * @param toYear + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardTopAuthors( + worksPeriod?: 'all_time' | 'last_5_years', + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardTopAuthors( + worksPeriod?: 'all_time' | 'last_5_years', + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardTopAuthors( + worksPeriod?: 'all_time' | 'last_5_years', + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardTopAuthors( + worksPeriod?: 'all_time' | 'last_5_years', + fromYear?: number, + toYear?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + worksPeriod, + 'works_period', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/top-authors`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Dashboard Topic Heatmap + * @endpoint get /api/dashboard/topic-heatmap + * @param fromYear + * @param toYear + * @param limit + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardTopicHeatmap( + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardTopicHeatmap( + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardTopicHeatmap( + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardTopicHeatmap( + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/topic-heatmap`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Dashboard Topic Word Cloud + * @endpoint get /api/dashboard/topic-wordcloud + * @param topicId + * @param fromYear + * @param toYear + * @param limit + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDashboardTopicWordCloud( + topicId: string, + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDashboardTopicWordCloud( + topicId: string, + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardTopicWordCloud( + topicId: string, + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDashboardTopicWordCloud( + topicId: string, + fromYear?: number, + toYear?: number, + limit?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (topicId === null || topicId === undefined) { + throw new Error( + 'Required parameter topicId was null or undefined when calling getDashboardTopicWordCloud.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + topicId, + 'topicId', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fromYear, + 'from_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + toYear, + 'to_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/dashboard/topic-wordcloud`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/institutionsV2.service.ts b/webapp/src/app/api/api/institutionsV2.service.ts index 45877996..dba5034e 100644 --- a/webapp/src/app/api/api/institutionsV2.service.ts +++ b/webapp/src/app/api/api/institutionsV2.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -24,192 +30,333 @@ import { Institution } from '../model/institution'; import { InstitutionPageV2 } from '../model/institutionPageV2'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class InstitutionsV2Service extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Returns a list of institutions based on a search term for autocomplete functionality. + * @endpoint get /api/institutions/v2/autocomplete/selector + * @param query A search term to filter institutions by (partial matches allowed). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionAutocompleteForSelector( + query?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionAutocompleteForSelector( + query?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionAutocompleteForSelector( + query?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionAutocompleteForSelector( + query?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a list of institutions based on a search term for autocomplete functionality. - * @endpoint get /api/institutions/v2/autocomplete/selector - * @param query A search term to filter institutions by (partial matches allowed). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionAutocompleteForSelector(query?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getInstitutionAutocompleteForSelector(query?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionAutocompleteForSelector(query?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionAutocompleteForSelector(query?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let localVarPath = `/api/institutions/v2/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + /** + * Returns an institution based on its ID. + * @endpoint get /api/institutions/v2/single/{institution_id} + * @param institutionId The ID of the institution to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionById2( + institutionId: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionById2( + institutionId: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionById2( + institutionId: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionById2( + institutionId: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (institutionId === null || institutionId === undefined) { + throw new Error( + 'Required parameter institutionId was null or undefined when calling getInstitutionById2.', + ); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + let localVarHeaders = this.defaultHeaders; + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarPath = `/api/institutions/v2/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/institutions/v2/single/${this.configuration.encodeParam({ name: 'institutionId', value: institutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns a list of institutions based on their IDs. + * @endpoint get /api/institutions/v2/multiple/ids + * @param institutionIds A list of institution IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionsByIds( + institutionIds?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionsByIds( + institutionIds?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionsByIds( + institutionIds?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionsByIds( + institutionIds?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', ); + }); } - /** - * Returns an institution based on its ID. - * @endpoint get /api/institutions/v2/single/{institution_id} - * @param institutionId The ID of the institution to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionById2(institutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getInstitutionById2(institutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionById2(institutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionById2(institutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (institutionId === null || institutionId === undefined) { - throw new Error('Required parameter institutionId was null or undefined when calling getInstitutionById2.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/institutions/v2/single/${this.configuration.encodeParam({name: "institutionId", value: institutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Returns a list of institutions based on their IDs. - * @endpoint get /api/institutions/v2/multiple/ids - * @param institutionIds A list of institution IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionsByIds(institutionIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getInstitutionsByIds(institutionIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionsByIds(institutionIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionsByIds(institutionIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/institutions/v2/multiple/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } + let localVarPath = `/api/institutions/v2/multiple/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/patents.service.ts b/webapp/src/app/api/api/patents.service.ts index c3f30c46..1694be0b 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AllPatentsResponse } from '../model/allPatentsResponse'; @@ -32,396 +38,769 @@ 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); + } - 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, + ); } - /** - * 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 localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - 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'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * 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 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 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 - } - ); + /** + * 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 a single patent by identifier with optional title fallback. - * @endpoint get /api/inse-service/patents/{identifier} - * @param identifier - * @param prefix - * @param title - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPatentByIdOrTitle(identifier: string, prefix?: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.'); - } + let 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 localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - prefix, 'prefix'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/patents/${this.configuration.encodeParam({name: "identifier", value: identifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('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, + ); } - /** - * 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 localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/patents`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('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'; + } } - /** - * 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 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 localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | '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 - } - ); + /** + * Get a single patent by identifier with optional title fallback. + * @endpoint get /api/inse-service/patents/{identifier} + * @param identifier + * @param prefix + * @param title + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentByIdOrTitle( + identifier: string, + prefix?: string, + title?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getPatentByIdOrTitle( + identifier: string, + prefix?: string, + title?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPatentByIdOrTitle( + identifier: string, + prefix?: string, + title?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPatentByIdOrTitle( + identifier: string, + prefix?: string, + title?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (identifier === null || identifier === undefined) { + throw new Error( + 'Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.', + ); } - /** - * 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 localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + prefix, + 'prefix', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); - let localVarHeaders = this.defaultHeaders; + let localVarHeaders = this.defaultHeaders; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/institutions/${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 localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/patents/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get patents matched to an author by name. + * @endpoint get /api/inse-service/authors/{author_id}/patents + * @param authorId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentsByAuthor( + authorId: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getPatentsByAuthor( + authorId: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPatentsByAuthor( + authorId: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPatentsByAuthor( + authorId: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorId === null || authorId === undefined) { + throw new Error( + 'Required parameter authorId was null or undefined when calling getPatentsByAuthor.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get patents matched to an institution by assignee name. + * @endpoint get /api/inse-service/institutions/{id}/patents + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPatentsByInstitution( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getPatentsByInstitution( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPatentsByInstitution( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPatentsByInstitution( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getPatentsByInstitution.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Trigger a background rebuild of the org_patents index for an institution. + * @endpoint post /api/inse-service/institutions/{id}/org-patents/rebuild + * @param id + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public rebuildOrgPatents( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public rebuildOrgPatents( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public rebuildOrgPatents( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public rebuildOrgPatents( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling rebuildOrgPatents.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/org-patents/rebuild`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/persons.service.ts b/webapp/src/app/api/api/persons.service.ts index 0b860735..8f9ef03d 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AuthorsListResponse } from '../model/authorsListResponse'; @@ -26,731 +32,1469 @@ 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); + } - 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.', + ); } - /** - * 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 localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - authorId, 'author_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); + 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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | '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, + }, + ); + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + /** + * 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 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 - } + 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 person by name. + * @endpoint get /api/inse-service/persons/searchByName + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchPersonsByName( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchPersonsByName( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsByName( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsByName( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorName === null || authorName === undefined) { + throw new Error( + 'Required parameter authorName was null or undefined when calling searchPersonsByName.', + ); + } + if (include === null || include === undefined) { + throw new Error( + 'Required parameter include was null or undefined when calling searchPersonsByName.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + authorName, + 'author_name', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + include, + 'include', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + pageOffset, + 'page_offset', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/persons/searchByName`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Searches for person by name. + * @endpoint get /api/inse-service/persons/searchByName + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchPersonsByName_3( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchPersonsByName_3( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsByName_3( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsByName_3( + authorName: string, + include: string, + limit?: number, + pageOffset?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorName === null || authorName === undefined) { + throw new Error( + 'Required parameter authorName was null or undefined when calling searchPersonsByName_3.', + ); + } + if (include === null || include === undefined) { + throw new Error( + 'Required parameter include was null or undefined when calling searchPersonsByName_3.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + authorName, + 'author_name', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + include, + 'include', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + limit, + 'limit', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + pageOffset, + 'page_offset', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/persons/searchByName`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Searches for persons with advanced filters (Topic & Institution) and pagination. + * @endpoint get /api/inse-service/persons/search-list + * @param query Search query (e.g., Arman AND Arzani) + * @param institutionId Filter by OpenAlex institution ID + * @param sortBy Value to sort by + * @param sortOrder asc or desc? + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param yearFilterEnabled Apply the selected affiliation year rule + * @param filterMode Affiliation year filter mode + * @param filterYear Filter year + * @param filterYearTo Upper filter year for \'between\' + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchPersonsList( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchPersonsList( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsList( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsList( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + institutionId, + 'institutionId', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sortBy', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortOrder, + 'sortOrder', + ); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic', ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + pageSize, + 'pageSize', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + include, + 'include', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + yearFilterEnabled, + 'yearFilterEnabled', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + filterMode, + 'filterMode', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + filterYear, + 'filterYear', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + filterYearTo, + 'filterYearTo', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * 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 localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let localVarPath = `/api/inse-service/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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | '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 with advanced filters (Topic & Institution) and pagination. + * @endpoint get /api/inse-service/persons/search-list + * @param query Search query (e.g., Arman AND Arzani) + * @param institutionId Filter by OpenAlex institution ID + * @param sortBy Value to sort by + * @param sortOrder asc or desc? + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param yearFilterEnabled Apply the selected affiliation year rule + * @param filterMode Affiliation year filter mode + * @param filterYear Filter year + * @param filterYearTo Upper filter year for \'between\' + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchPersonsList_4( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchPersonsList_4( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsList_4( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchPersonsList_4( + query?: string, + institutionId?: string, + sortBy?: string, + sortOrder?: string, + topic?: Array, + page?: number, + pageSize?: number, + include?: string, + yearFilterEnabled?: boolean, + filterMode?: 'in' | 'from' | 'between', + filterYear?: number, + filterYearTo?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + institutionId, + 'institutionId', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sortBy', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortOrder, + 'sortOrder', + ); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic', ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + pageSize, + 'pageSize', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + include, + 'include', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + yearFilterEnabled, + 'yearFilterEnabled', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + filterMode, + 'filterMode', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + filterYear, + 'filterYear', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + filterYearTo, + 'filterYearTo', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * 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 localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); + const localVarTransferCache: boolean = options?.transferCache ?? true; - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/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 person by name. - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorName === null || authorName === undefined) { - throw new Error('Required parameter authorName was null or undefined when calling searchPersonsByName.'); - } - if (include === null || include === undefined) { - throw new Error('Required parameter include was null or undefined when calling searchPersonsByName.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - authorName, 'author_name'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - limit, 'limit'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - pageOffset, 'page_offset'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/persons/searchByName`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * Searches for person by name. - * @endpoint get /api/inse-service/persons/searchByName - * @param authorName Authors name (e.g., Arman Arzani) - * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... - * @param limit Limit of search page results - * @param pageOffset Offset of the result page - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsByName_3(authorName: string, include: string, limit?: number, pageOffset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorName === null || authorName === undefined) { - throw new Error('Required parameter authorName was null or undefined when calling searchPersonsByName_3.'); - } - if (include === null || include === undefined) { - throw new Error('Required parameter include was null or undefined when calling searchPersonsByName_3.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - authorName, 'author_name'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - limit, 'limit'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - pageOffset, 'page_offset'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/persons/searchByName`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionId Filter by OpenAlex institution ID - * @param sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param yearFilterEnabled Apply the selected affiliation year rule - * @param filterMode Affiliation year filter mode - * @param filterYear Filter year - * @param filterYearTo Upper filter year for \'between\' - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institutionId'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sortBy'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sortOrder'); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - pageSize, 'pageSize'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - yearFilterEnabled, 'yearFilterEnabled'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filterMode, 'filterMode'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filterYear, 'filterYear'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filterYearTo, 'filterYearTo'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/persons/search-list`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); - } - - /** - * Searches for persons with advanced filters (Topic & Institution) and pagination. - * @endpoint get /api/inse-service/persons/search-list - * @param query Search query (e.g., Arman AND Arzani) - * @param institutionId Filter by OpenAlex institution ID - * @param sortBy Value to sort by - * @param sortOrder asc or desc? - * @param topic Filter by topic display names - * @param page Page number (1-indexed) - * @param pageSize Results per page - * @param include Comma-separated include tags - * @param yearFilterEnabled Apply the selected affiliation year rule - * @param filterMode Affiliation year filter mode - * @param filterYear Filter year - * @param filterYearTo Upper filter year for \'between\' - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchPersonsList_4(query?: string, institutionId?: string, sortBy?: string, sortOrder?: string, topic?: Array, page?: number, pageSize?: number, include?: string, yearFilterEnabled?: boolean, filterMode?: 'in' | 'from' | 'between', filterYear?: number, filterYearTo?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - institutionId, 'institutionId'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sortBy'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sortOrder'); - if (topic) { - topic.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - pageSize, 'pageSize'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - include, 'include'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - yearFilterEnabled, 'yearFilterEnabled'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filterMode, 'filterMode'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filterYear, 'filterYear'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filterYearTo, 'filterYearTo'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/inse-service/persons/search-list`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | '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, + }, + ); + } } diff --git a/webapp/src/app/api/api/projects.service.ts b/webapp/src/app/api/api/projects.service.ts index 938af152..ac2d9b1e 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { BundProjectDetails } from '../model/bundProjectDetails'; @@ -48,1174 +54,2298 @@ 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); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); - } - - /** - * Get DFG projects. - * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. - * @endpoint get /api/projects/dfg/search - * @param rawOaInstitutionId The openalex institution ID to filter by. - * @param authorId The openalex author ID to filter by. - * @param authorFilterIds The dfg author IDs to filter by. - * @param institutionIds The institution IDs to filter by. - * @param title The title to filter by. - * @param keywords Raw keywords to search in title/abstract/subject fields. - * @param topicIds The openalex topic IDs to filter by. - * @param filterTopicIds Additional topic IDs to merge into the fuzzy topic-id resolution (union with topic_ids). Only used when fuzzy=True. - * @param fundingStartYears The funding start years to filter by. - * @param fundingEndYears The funding end years to filter by. - * @param page The page number. - * @param size The page size. - * @param sortBy The field to sort by. - * @param sortDirection The sort direction (asc or desc). - * @param fuzzy Use topic_id resolution if True, otherwise use raw keyword search. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getDfgProjects(rawOaInstitutionId?: string, authorId?: string, authorFilterIds?: Array, institutionIds?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - authorId, 'author_id'); - if (authorFilterIds) { - authorFilterIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_filter_ids'); - }) - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'keywords'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'filter_topic_ids'); - }) - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_start_years'); - }) - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_end_years'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortDirection, 'sort_direction'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fuzzy, 'fuzzy'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/dfg/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + /** + * Get DFG projects. + * Returns a page of DFG projects based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/dfg/search + * @param rawOaInstitutionId The openalex institution ID to filter by. + * @param authorId The openalex author ID to filter by. + * @param authorFilterIds The dfg author IDs to filter by. + * @param institutionIds The institution IDs to filter by. + * @param title The title to filter by. + * @param keywords Raw keywords to search in title/abstract/subject fields. + * @param topicIds The openalex topic IDs to filter by. + * @param filterTopicIds Additional topic IDs to merge into the fuzzy topic-id resolution (union with topic_ids). Only used when fuzzy=True. + * @param fundingStartYears The funding start years to filter by. + * @param fundingEndYears The funding end years to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param fuzzy Use topic_id resolution if True, otherwise use raw keyword search. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getDfgProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorFilterIds?: Array, + institutionIds?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getDfgProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorFilterIds?: Array, + institutionIds?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorFilterIds?: Array, + institutionIds?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getDfgProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorFilterIds?: Array, + institutionIds?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + authorId, + 'author_id', + ); + if (authorFilterIds) { + authorFilterIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_filter_ids', ); + }); } - - /** - * Returns EU CORDIS organizations based on a search term. - * @endpoint get /api/eu/organizations/autocomplete/selector - * @param query Search term for organization autocomplete. - * @param page - * @param size - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getEuOrganizationAutocompleteForSelector(query?: string, page?: number, size?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/eu/organizations/autocomplete/selector`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', ); + }); } - - /** - * Returns EU CORDIS organizations by organisation IDs. - * @endpoint get /api/eu/organizations/ids - * @param organizationIds CORDIS organisation IDs to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getEuOrganizationsByIds(organizationIds?: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getEuOrganizationsByIds(organizationIds?: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getEuOrganizationsByIds(organizationIds?: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getEuOrganizationsByIds(organizationIds?: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (organizationIds) { - organizationIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'organization_ids'); - }) - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/eu/organizations/ids`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', ); + }); } - - /** - * Get funding over time for bund projects. - * Returns the funding over time for BUND projects. Accepts the same filters as /bund/search, so the funding total can be made to match whatever the results table is currently filtered to. - * @endpoint get /api/projects/institution/bund/funding-over-time - * @param rawOaInstitutionId The institution ID to filter by. - * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. - * @param fundingArts Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId?: string, executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, fuzzy?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); - if (executingAgency) { - executingAgency.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'executing_agency'); - }) - } - if (fundingArts) { - fundingArts.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_arts'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'keywords'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'filter_topic_ids'); - }) - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_start_years'); - }) - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_end_years'); - }) - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'countries'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fuzzy, 'fuzzy'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/bund/funding-over-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', ); + }); } - - /** - * Get funding over time for EU projects. - * Returns the funding over time for EU CORDIS projects. Accepts the same filters as /eu/search, so the funding total can be made to match whatever the results table is currently filtered to. - * @endpoint get /api/projects/institution/eu/funding-over-time - * @param rawOaInstitutionId OpenAlex institution ID to filter by. - * @param authorId OpenAlex author ID to filter by. - * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. - * @param organizationIds CORDIS organisation IDs. All selected organizations must match. - * @param organizationNames CORDIS organization names. All selected organizations must match. - * @param projectTypes Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param frameworkProgrammes Framework programme filters. - * @param fundingSchemes Funding scheme filters. - * @param statuses Project status filters. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, fuzzy?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - authorId, 'author_id'); - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - if (organizationIds) { - organizationIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'organization_ids'); - }) - } - if (organizationNames) { - organizationNames.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'organization_names'); - }) - } - if (projectTypes) { - projectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'project_types'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'keywords'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'filter_topic_ids'); - }) - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_start_years'); - }) - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_end_years'); - }) - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'countries'); - }) - } - if (frameworkProgrammes) { - frameworkProgrammes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'framework_programmes'); - }) - } - if (fundingSchemes) { - fundingSchemes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_schemes'); - }) - } - if (statuses) { - statuses.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'statuses'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fuzzy, 'fuzzy'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/institution/eu/funding-over-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'filter_topic_ids', ); + }); } - - /** - * Get a single BUND project. - * Returns a single BUND project based on its ID. - * @endpoint get /api/projects/bund/{id} - * @param id The ID of the BUND project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleBundProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getSingleBundProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSingleBundProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSingleBundProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getSingleBundProject.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_start_years', ); + }); } - - /** - * Get a single DFG project. - * Returns a single DFG project based on its ID. - * @endpoint get /api/projects/dfg/{id} - * @param id The ID of the DFG project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleDfgProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getSingleDfgProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSingleDfgProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSingleDfgProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getSingleDfgProject.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/dfg/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_end_years', ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Get a single EU Cordis project. - * Returns a single EU Cordis project based on its ID. - * @endpoint get /api/projects/eu/{id} - * @param id The ID of the EU Cordis project to retrieve. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getSingleEuCordisProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getSingleEuCordisProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSingleEuCordisProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getSingleEuCordisProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling getSingleEuCordisProject.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + let localVarPath = `/api/projects/dfg/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + /** + * Returns EU CORDIS organizations based on a search term. + * @endpoint get /api/eu/organizations/autocomplete/selector + * @param query Search term for organization autocomplete. + * @param page + * @param size + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuOrganizationAutocompleteForSelector( + query?: string, + page?: number, + size?: number, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getEuOrganizationAutocompleteForSelector( + query?: string, + page?: number, + size?: number, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getEuOrganizationAutocompleteForSelector( + query?: string, + page?: number, + size?: number, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getEuOrganizationAutocompleteForSelector( + query?: string, + page?: number, + size?: number, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + let localVarHeaders = this.defaultHeaders; - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } - let localVarPath = `/api/projects/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 - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/eu/organizations/autocomplete/selector`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns EU CORDIS organizations by organisation IDs. + * @endpoint get /api/eu/organizations/ids + * @param organizationIds CORDIS organisation IDs to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEuOrganizationsByIds( + organizationIds?: Array, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getEuOrganizationsByIds( + organizationIds?: Array, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getEuOrganizationsByIds( + organizationIds?: Array, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getEuOrganizationsByIds( + organizationIds?: Array, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (organizationIds) { + organizationIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'organization_ids', ); + }); } - /** - * 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; - 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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + let localVarPath = `/api/eu/organizations/ids`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - // 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 funding over time for bund projects. + * Returns the funding over time for BUND projects. Accepts the same filters as /bund/search, so the funding total can be made to match whatever the results table is currently filtered to. + * @endpoint get /api/projects/institution/bund/funding-over-time + * @param rawOaInstitutionId The institution ID to filter by. + * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. + * @param fundingArts Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionBundProjectsFundingOverTime( + rawOaInstitutionId?: string, + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + fuzzy?: boolean, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionBundProjectsFundingOverTime( + rawOaInstitutionId?: string, + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + fuzzy?: boolean, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionBundProjectsFundingOverTime( + rawOaInstitutionId?: string, + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + fuzzy?: boolean, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionBundProjectsFundingOverTime( + rawOaInstitutionId?: string, + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + fuzzy?: boolean, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + if (executingAgency) { + executingAgency.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'executing_agency', ); + }); } - - /** - * Search BUND projects. - * Returns a page of BUND project summaries. - * @endpoint get /api/projects/bund/search - * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. - * @param fundingArts Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param rawOaInstitutionId The ID of the institution to filter by. - * @param page The page number. - * @param size The page size. - * @param sortBy Sort field. - * @param sortDirection Sort direction: asc or desc. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchBundProjectsWithFilters(executingAgency?: Array, fundingArts?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, rawOaInstitutionId?: string, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (executingAgency) { - executingAgency.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'executing_agency'); - }) - } - if (fundingArts) { - fundingArts.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_arts'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'keywords'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'filter_topic_ids'); - }) - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_start_years'); - }) - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_end_years'); - }) - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'countries'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortDirection, 'sort_direction'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fuzzy, 'fuzzy'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/bund/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (fundingArts) { + fundingArts.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_arts', ); + }); } - - /** - * Search EU CORDIS projects. - * Returns a page of EU CORDIS project summaries across FP7, Horizon 2020 and Horizon Europe. Single entry point for EU CORDIS project search: filter by institution, author(s), organization, OpenAlex topic, programme, funding scheme, status, funding years and/or country, in any combination. - * @endpoint get /api/projects/eu/search - * @param rawOaInstitutionId OpenAlex institution ID to filter by. - * @param authorId OpenAlex author ID to filter by. - * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. - * @param organizationIds CORDIS organisation IDs. All selected organizations must match. - * @param organizationNames CORDIS organization names. All selected organizations must match. - * @param projectTypes Project types to include: fp7, h2020, heu. - * @param title Project title/acronym search. - * @param keywords Raw keywords to search in title/objective/keywords/topics. - * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. - * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. - * @param fundingStartYears Funding start years. - * @param fundingEndYears Funding end years. - * @param countries Organization countries. - * @param frameworkProgrammes Framework programme filters. - * @param fundingSchemes Funding scheme filters. - * @param statuses Project status filters. - * @param page The page number. - * @param size The page size. - * @param sortBy Sort field. - * @param sortDirection Sort direction: asc or desc. - * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchEuCordisProjects(rawOaInstitutionId?: string, authorId?: string, authorIds?: Array, organizationIds?: Array, organizationNames?: Array, projectTypes?: Array, title?: string, keywords?: Array, topicIds?: Array, filterTopicIds?: Array, fundingStartYears?: Array, fundingEndYears?: Array, countries?: Array, frameworkProgrammes?: Array, fundingSchemes?: Array, statuses?: Array, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - authorId, 'author_id'); - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - if (organizationIds) { - organizationIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'organization_ids'); - }) - } - if (organizationNames) { - organizationNames.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'organization_names'); - }) - } - if (projectTypes) { - projectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'project_types'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'keywords'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'filter_topic_ids'); - }) - } - if (fundingStartYears) { - fundingStartYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_start_years'); - }) - } - if (fundingEndYears) { - fundingEndYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_end_years'); - }) - } - if (countries) { - countries.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'countries'); - }) - } - if (frameworkProgrammes) { - frameworkProgrammes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'framework_programmes'); - }) - } - if (fundingSchemes) { - fundingSchemes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'funding_schemes'); - }) - } - if (statuses) { - statuses.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'statuses'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortDirection, 'sort_direction'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fuzzy, 'fuzzy'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/eu/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', ); + }); } - - /** - * Search projects across all funders. - * Returns a page of projects across all funders based on the provided pagination parameters and optional institution filter. - * @endpoint get /api/projects/search - * @param page The page number. - * @param size The page size. - * @param selectedProjectTypes The set of project types to filter by (e.g., \'bund\', \'eu\', \'dfg\'). If not provided, projects of all types will be included. - * @param title The title to filter by. - * @param sortBy The field to sort by. - * @param sortDirection The sort direction (asc or desc). - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - if (selectedProjectTypes) { - selectedProjectTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'selected_project_types'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortDirection, 'sort_direction'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/projects/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', ); + }); + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'filter_topic_ids', + ); + }); + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_start_years', + ); + }); + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_end_years', + ); + }); + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'countries', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/bund/funding-over-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get funding over time for EU projects. + * Returns the funding over time for EU CORDIS projects. Accepts the same filters as /eu/search, so the funding total can be made to match whatever the results table is currently filtered to. + * @endpoint get /api/projects/institution/eu/funding-over-time + * @param rawOaInstitutionId OpenAlex institution ID to filter by. + * @param authorId OpenAlex author ID to filter by. + * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. + * @param organizationIds CORDIS organisation IDs. All selected organizations must match. + * @param organizationNames CORDIS organization names. All selected organizations must match. + * @param projectTypes Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param frameworkProgrammes Framework programme filters. + * @param fundingSchemes Funding scheme filters. + * @param statuses Project status filters. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionCordisEuProjectsFundingOverTime( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + fuzzy?: boolean, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionCordisEuProjectsFundingOverTime( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + fuzzy?: boolean, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionCordisEuProjectsFundingOverTime( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + fuzzy?: boolean, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionCordisEuProjectsFundingOverTime( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + fuzzy?: boolean, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + authorId, + 'author_id', + ); + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', + ); + }); + } + if (organizationIds) { + organizationIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'organization_ids', + ); + }); + } + if (organizationNames) { + organizationNames.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'organization_names', + ); + }); + } + if (projectTypes) { + projectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'project_types', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', + ); + }); + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', + ); + }); + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'filter_topic_ids', + ); + }); + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_start_years', + ); + }); + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_end_years', + ); + }); + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'countries', + ); + }); + } + if (frameworkProgrammes) { + frameworkProgrammes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'framework_programmes', + ); + }); + } + if (fundingSchemes) { + fundingSchemes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_schemes', + ); + }); + } + if (statuses) { + statuses.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'statuses', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/eu/funding-over-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get a single BUND project. + * Returns a single BUND project based on its ID. + * @endpoint get /api/projects/bund/{id} + * @param id The ID of the BUND project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleBundProject( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getSingleBundProject( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getSingleBundProject( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getSingleBundProject( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getSingleBundProject.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/bund/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get a single DFG project. + * Returns a single DFG project based on its ID. + * @endpoint get /api/projects/dfg/{id} + * @param id The ID of the DFG project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleDfgProject( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getSingleDfgProject( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getSingleDfgProject( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getSingleDfgProject( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getSingleDfgProject.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/dfg/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get a single EU Cordis project. + * Returns a single EU Cordis project based on its ID. + * @endpoint get /api/projects/eu/{id} + * @param id The ID of the EU Cordis project to retrieve. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getSingleEuCordisProject( + id: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getSingleEuCordisProject( + id: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getSingleEuCordisProject( + id: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getSingleEuCordisProject( + id: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (id === null || id === undefined) { + throw new Error( + 'Required parameter id was null or undefined when calling getSingleEuCordisProject.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/eu/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Get bund projects. + * Returns a page of bund projects based on the provided pagination parameters and optional institution filter. + * @endpoint post /api/projects/institution/bund/search + * @param projectsFilteringProperties + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchBundProjects( + projectsFilteringProperties: ProjectsFilteringProperties, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchBundProjects( + projectsFilteringProperties: ProjectsFilteringProperties, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchBundProjects( + projectsFilteringProperties: ProjectsFilteringProperties, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchBundProjects( + projectsFilteringProperties: ProjectsFilteringProperties, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if ( + projectsFilteringProperties === null || + projectsFilteringProperties === undefined + ) { + throw new Error( + 'Required parameter projectsFilteringProperties was null or undefined when calling searchBundProjects.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/institution/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: projectsFilteringProperties, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Search BUND projects. + * Returns a page of BUND project summaries. + * @endpoint get /api/projects/bund/search + * @param executingAgency Executing Agencies (Ausführende Stellen) to filter by. + * @param fundingArts Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param rawOaInstitutionId The ID of the institution to filter by. + * @param page The page number. + * @param size The page size. + * @param sortBy Sort field. + * @param sortDirection Sort direction: asc or desc. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchBundProjectsWithFilters( + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + rawOaInstitutionId?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchBundProjectsWithFilters( + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + rawOaInstitutionId?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchBundProjectsWithFilters( + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + rawOaInstitutionId?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchBundProjectsWithFilters( + executingAgency?: Array, + fundingArts?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + rawOaInstitutionId?: string, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (executingAgency) { + executingAgency.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'executing_agency', + ); + }); + } + if (fundingArts) { + fundingArts.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_arts', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', + ); + }); + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', + ); + }); + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'filter_topic_ids', + ); + }); + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_start_years', + ); + }); + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_end_years', + ); + }); + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'countries', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/bund/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Search EU CORDIS projects. + * Returns a page of EU CORDIS project summaries across FP7, Horizon 2020 and Horizon Europe. Single entry point for EU CORDIS project search: filter by institution, author(s), organization, OpenAlex topic, programme, funding scheme, status, funding years and/or country, in any combination. + * @endpoint get /api/projects/eu/search + * @param rawOaInstitutionId OpenAlex institution ID to filter by. + * @param authorId OpenAlex author ID to filter by. + * @param authorIds Additional OpenAlex author IDs to filter by. All selected authors must match. + * @param organizationIds CORDIS organisation IDs. All selected organizations must match. + * @param organizationNames CORDIS organization names. All selected organizations must match. + * @param projectTypes Project types to include: fp7, h2020, heu. + * @param title Project title/acronym search. + * @param keywords Raw keywords to search in title/objective/keywords/topics. + * @param topicIds OpenAlex topic IDs used for fuzzy topic resolution. + * @param filterTopicIds Additional OpenAlex topic IDs used as mandatory filters. + * @param fundingStartYears Funding start years. + * @param fundingEndYears Funding end years. + * @param countries Organization countries. + * @param frameworkProgrammes Framework programme filters. + * @param fundingSchemes Funding scheme filters. + * @param statuses Project status filters. + * @param page The page number. + * @param size The page size. + * @param sortBy Sort field. + * @param sortDirection Sort direction: asc or desc. + * @param fuzzy Use OpenAlex topic-id resolution if true, otherwise raw keyword search. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchEuCordisProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchEuCordisProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchEuCordisProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchEuCordisProjects( + rawOaInstitutionId?: string, + authorId?: string, + authorIds?: Array, + organizationIds?: Array, + organizationNames?: Array, + projectTypes?: Array, + title?: string, + keywords?: Array, + topicIds?: Array, + filterTopicIds?: Array, + fundingStartYears?: Array, + fundingEndYears?: Array, + countries?: Array, + frameworkProgrammes?: Array, + fundingSchemes?: Array, + statuses?: Array, + page?: number, + size?: number, + sortBy?: string, + sortDirection?: string, + fuzzy?: boolean, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + authorId, + 'author_id', + ); + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', + ); + }); + } + if (organizationIds) { + organizationIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'organization_ids', + ); + }); + } + if (organizationNames) { + organizationNames.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'organization_names', + ); + }); + } + if (projectTypes) { + projectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'project_types', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', + ); + }); + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', + ); + }); + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'filter_topic_ids', + ); + }); + } + if (fundingStartYears) { + fundingStartYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_start_years', + ); + }); + } + if (fundingEndYears) { + fundingEndYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_end_years', + ); + }); + } + if (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'countries', + ); + }); + } + if (frameworkProgrammes) { + frameworkProgrammes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'framework_programmes', + ); + }); + } + if (fundingSchemes) { + fundingSchemes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'funding_schemes', + ); + }); + } + if (statuses) { + statuses.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'statuses', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/eu/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Search projects across all funders. + * Returns a page of projects across all funders based on the provided pagination parameters and optional institution filter. + * @endpoint get /api/projects/search + * @param page The page number. + * @param size The page size. + * @param selectedProjectTypes The set of project types to filter by (e.g., \'bund\', \'eu\', \'dfg\'). If not provided, projects of all types will be included. + * @param title The title to filter by. + * @param sortBy The field to sort by. + * @param sortDirection The sort direction (asc or desc). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchProjects( + page?: number, + size?: number, + selectedProjectTypes?: Set, + title?: string, + sortBy?: ProjectsSortBy, + sortDirection?: SortDirection, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchProjects( + page?: number, + size?: number, + selectedProjectTypes?: Set, + title?: string, + sortBy?: ProjectsSortBy, + sortDirection?: SortDirection, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchProjects( + page?: number, + size?: number, + selectedProjectTypes?: Set, + title?: string, + sortBy?: ProjectsSortBy, + sortDirection?: SortDirection, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchProjects( + page?: number, + size?: number, + selectedProjectTypes?: Set, + title?: string, + sortBy?: ProjectsSortBy, + sortDirection?: SortDirection, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + if (selectedProjectTypes) { + selectedProjectTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'selected_project_types', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortDirection, + 'sort_direction', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/projects/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/ranking.service.ts b/webapp/src/app/api/api/ranking.service.ts index 779e20f4..a74696b6 100644 --- a/webapp/src/app/api/api/ranking.service.ts +++ b/webapp/src/app/api/api/ranking.service.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AuthorMetricsRequest } from '../model/authorMetricsRequest'; @@ -38,353 +44,628 @@ import { RankedAuthor } from '../model/rankedAuthor'; import { SelectedAuthorsRequest } from '../model/selectedAuthorsRequest'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class RankingService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Orientation Profiles + * Compare orientation scores for active members of the account institution. + * @endpoint post /api/rank/orientation-profiles + * @param authorOrientationProfilesRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public orientationProfilesApiRankOrientationProfilesPost( + authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public orientationProfilesApiRankOrientationProfilesPost( + authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public orientationProfilesApiRankOrientationProfilesPost( + authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public orientationProfilesApiRankOrientationProfilesPost( + authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if ( + authorOrientationProfilesRequest === null || + authorOrientationProfilesRequest === undefined + ) { + throw new Error( + 'Required parameter authorOrientationProfilesRequest was null or undefined when calling orientationProfilesApiRankOrientationProfilesPost.', + ); } - /** - * Orientation Profiles - * Compare orientation scores for active members of the account institution. - * @endpoint post /api/rank/orientation-profiles - * @param authorOrientationProfilesRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public orientationProfilesApiRankOrientationProfilesPost(authorOrientationProfilesRequest: AuthorOrientationProfilesRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorOrientationProfilesRequest === null || authorOrientationProfilesRequest === undefined) { - throw new Error('Required parameter authorOrientationProfilesRequest was null or undefined when calling orientationProfilesApiRankOrientationProfilesPost.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/rank/orientation-profiles`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: authorOrientationProfilesRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } - /** - * Rank Author - * @endpoint post /api/rank/rank-author - * @param keywordToAuthorRequest - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public rankAuthorApiRankRankAuthorPost(keywordToAuthorRequest: KeywordToAuthorRequest, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (keywordToAuthorRequest === null || keywordToAuthorRequest === undefined) { - throw new Error('Required parameter keywordToAuthorRequest was null or undefined when calling rankAuthorApiRankRankAuthorPost.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/rank/rank-author`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: keywordToAuthorRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + // 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, + ); } - /** - * Static Stats - * @endpoint post /api/rank/static-stats - * @param authorMetricsRequest - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public staticStatsApiRankStaticStatsPost(authorMetricsRequest: AuthorMetricsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorMetricsRequest === null || authorMetricsRequest === undefined) { - throw new Error('Required parameter authorMetricsRequest was null or undefined when calling staticStatsApiRankStaticStatsPost.'); - } - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/rank/static-stats`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: authorMetricsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } } - /** - * Topic Profile - * @endpoint post /api/rank/topic-profile - * @param selectedAuthorsRequest - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public topicProfileApiRankTopicProfilePost(selectedAuthorsRequest: SelectedAuthorsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (selectedAuthorsRequest === null || selectedAuthorsRequest === undefined) { - throw new Error('Required parameter selectedAuthorsRequest was null or undefined when calling topicProfileApiRankTopicProfilePost.'); - } + let localVarPath = `/api/rank/orientation-profiles`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: authorOrientationProfilesRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/rank/topic-profile`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: selectedAuthorsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + /** + * Rank Author + * @endpoint post /api/rank/rank-author + * @param keywordToAuthorRequest + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public rankAuthorApiRankRankAuthorPost( + keywordToAuthorRequest: KeywordToAuthorRequest, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public rankAuthorApiRankRankAuthorPost( + keywordToAuthorRequest: KeywordToAuthorRequest, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public rankAuthorApiRankRankAuthorPost( + keywordToAuthorRequest: KeywordToAuthorRequest, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public rankAuthorApiRankRankAuthorPost( + keywordToAuthorRequest: KeywordToAuthorRequest, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if ( + keywordToAuthorRequest === null || + keywordToAuthorRequest === undefined + ) { + throw new Error( + 'Required parameter keywordToAuthorRequest was null or undefined when calling rankAuthorApiRankRankAuthorPost.', + ); } - /** - * Topic Stats - * @endpoint post /api/rank/topic-stats - * @param selectedAuthorsRequest - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public topicStatsApiRankTopicStatsPost(selectedAuthorsRequest: SelectedAuthorsRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (selectedAuthorsRequest === null || selectedAuthorsRequest === undefined) { - throw new Error('Required parameter selectedAuthorsRequest was null or undefined when calling topicStatsApiRankTopicStatsPost.'); - } + let localVarHeaders = this.defaultHeaders; - let localVarHeaders = this.defaultHeaders; + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/rank/topic-stats`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request>('post', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: selectedAuthorsRequest, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } - ); + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/rank/rank-author`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: keywordToAuthorRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Static Stats + * @endpoint post /api/rank/static-stats + * @param authorMetricsRequest + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public staticStatsApiRankStaticStatsPost( + authorMetricsRequest: AuthorMetricsRequest, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public staticStatsApiRankStaticStatsPost( + authorMetricsRequest: AuthorMetricsRequest, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public staticStatsApiRankStaticStatsPost( + authorMetricsRequest: AuthorMetricsRequest, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public staticStatsApiRankStaticStatsPost( + authorMetricsRequest: AuthorMetricsRequest, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorMetricsRequest === null || authorMetricsRequest === undefined) { + throw new Error( + 'Required parameter authorMetricsRequest was null or undefined when calling staticStatsApiRankStaticStatsPost.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/rank/static-stats`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: authorMetricsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Topic Profile + * @endpoint post /api/rank/topic-profile + * @param selectedAuthorsRequest + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public topicProfileApiRankTopicProfilePost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public topicProfileApiRankTopicProfilePost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public topicProfileApiRankTopicProfilePost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public topicProfileApiRankTopicProfilePost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if ( + selectedAuthorsRequest === null || + selectedAuthorsRequest === undefined + ) { + throw new Error( + 'Required parameter selectedAuthorsRequest was null or undefined when calling topicProfileApiRankTopicProfilePost.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/rank/topic-profile`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: selectedAuthorsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Topic Stats + * @endpoint post /api/rank/topic-stats + * @param selectedAuthorsRequest + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public topicStatsApiRankTopicStatsPost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public topicStatsApiRankTopicStatsPost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public topicStatsApiRankTopicStatsPost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public topicStatsApiRankTopicStatsPost( + selectedAuthorsRequest: SelectedAuthorsRequest, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if ( + selectedAuthorsRequest === null || + selectedAuthorsRequest === undefined + ) { + throw new Error( + 'Required parameter selectedAuthorsRequest was null or undefined when calling topicStatsApiRankTopicStatsPost.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Content-Type', + httpContentTypeSelected, + ); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/rank/topic-stats`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'post', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: selectedAuthorsRequest, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/api/universityRankings.service.ts b/webapp/src/app/api/api/universityRankings.service.ts index 82bcee4c..a7aba880 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { AutocompleteLocationItem } from '../model/autocompleteLocationItem'; @@ -32,391 +38,748 @@ 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); + } - 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.', + ); } - /** - * 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 localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + query, + 'query', + ); - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - query, 'query'); + 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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + let localVarPath = `/api/inse-service/university-rankings/autocomplete-locations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + /** + * 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 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 - } + 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', ); + }); } - - /** - * 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 - } + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', ); + }); } - - /** - * 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 - } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + if (institutions) { + institutions.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institutions', ); + }); } - - /** - * 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 (countries) { + countries.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'countries', ); + }); } - - /** - * 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 (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, + }, + ); + } } diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index 186ae663..4561cb78 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -30,359 +36,674 @@ import { WorkPage } from '../model/workPage'; import { WorksListResponse } from '../model/worksListResponse'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class WorksService extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - 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.', + ); } - /** - * 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.'); - } + 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 localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarTransferCache: boolean = options?.transferCache ?? true; + let responseType_: 'text' | 'json' | '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 })}/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, + }, + ); + } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } + /** + * Returns 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 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 - } + 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', ); + }); } - - /** - * 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 (type) { + type.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'type', ); + }); } - - /** - * 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 (language) { + language.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'language', ); + }); } - - /** - * Returns topics grouped by publication year for an author. - * @endpoint get /api/works/{author_id}/topics-by-time - * @param authorId The author id, for example A5023888391. - * @param maxTopicsPerYear The maximum number of topics per year. - * @param targetPublications Target number of publications used for the timeline. Complete years are always included. - * @param includeAll If true, all publications are used for the timeline. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (authorId === null || authorId === undefined) { - throw new Error('Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - maxTopicsPerYear, 'max_topics_per_year'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - targetPublications, 'target_publications'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - includeAll, 'include_all'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/${this.configuration.encodeParam({name: "authorId", value: authorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/topics-by-time`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (institutionId) { + institutionId.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_id', ); + }); } - - /** - * Returns one publication by OpenAlex ID or DOI. - * @endpoint get /api/works/detail/{identifier} - * @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication. - * @param title Do we want to fallback to title search if ID and DOI dont work? - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWork(identifier: string, title?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getWork(identifier: string, title?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWork(identifier: string, title?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWork(identifier: string, title?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (identifier === null || identifier === undefined) { - throw new Error('Required parameter identifier was null or undefined when calling getWork.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/detail/${this.configuration.encodeParam({name: "identifier", value: identifier, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + 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, + }, + ); + } + + /** + * Returns work counts per primary topic for an author. + * @endpoint get /api/works/{author_id}/primary-topic-counts + * @param authorId The author id, for example A5023888391. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPrimaryTopicCountsByAuthor( + authorId: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPrimaryTopicCountsByAuthor( + authorId: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public getPrimaryTopicCountsByAuthor( + authorId: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>>; + public getPrimaryTopicCountsByAuthor( + authorId: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorId === null || authorId === undefined) { + throw new Error( + 'Required parameter authorId was null or undefined when calling getPrimaryTopicCountsByAuthor.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-topic-counts`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request>( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns topics grouped by publication year for an author. + * @endpoint get /api/works/{author_id}/topics-by-time + * @param authorId The author id, for example A5023888391. + * @param maxTopicsPerYear The maximum number of topics per year. + * @param targetPublications Target number of publications used for the timeline. Complete years are always included. + * @param includeAll If true, all publications are used for the timeline. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicsByTimeByAuthor( + authorId: string, + maxTopicsPerYear?: number, + targetPublications?: number, + includeAll?: boolean, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getTopicsByTimeByAuthor( + authorId: string, + maxTopicsPerYear?: number, + targetPublications?: number, + includeAll?: boolean, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getTopicsByTimeByAuthor( + authorId: string, + maxTopicsPerYear?: number, + targetPublications?: number, + includeAll?: boolean, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getTopicsByTimeByAuthor( + authorId: string, + maxTopicsPerYear?: number, + targetPublications?: number, + includeAll?: boolean, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (authorId === null || authorId === undefined) { + throw new Error( + 'Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + maxTopicsPerYear, + 'max_topics_per_year', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + targetPublications, + 'target_publications', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + includeAll, + 'include_all', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/topics-by-time`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns one publication by OpenAlex ID or DOI. + * @endpoint get /api/works/detail/{identifier} + * @param identifier The OpenAlex work id (e.g., W2741809807) or DOI number of the publication. + * @param title Do we want to fallback to title search if ID and DOI dont work? + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWork( + identifier: string, + title?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getWork( + identifier: string, + title?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWork( + identifier: string, + title?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWork( + identifier: string, + title?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (identifier === null || identifier === undefined) { + throw new Error( + 'Required parameter identifier was null or undefined when calling getWork.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/detail/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }); + } } diff --git a/webapp/src/app/api/api/worksV2.service.ts b/webapp/src/app/api/api/worksV2.service.ts index 9b8dc65d..fce3739a 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,12 +9,18 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +import { Inject, Injectable, Optional } from '@angular/core'; +import { + HttpClient, + HttpHeaders, + HttpParams, + HttpResponse, + HttpEvent, + HttpParameterCodec, + HttpContext, +} from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; // @ts-ignore import { HTTPValidationError } from '../model/hTTPValidationError'; @@ -34,916 +40,1852 @@ import { WorkPageV2 } from '../model/workPageV2'; import { WorkSortBy } from '../model/workSortBy'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; - - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class WorksV2Service extends BaseService { + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string | string[], + @Optional() configuration?: Configuration, + ) { + super(basePath, configuration); + } - constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { - super(basePath, configuration); + /** + * Returns a paginated list of works for a given author based on their ID. + * @endpoint get /api/works/v2/author/{raw_oa_author_id} + * @param rawOaAuthorId The raw OpenAlex author id. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param title A title to filter by (partial matches allowed). + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAuthorWorkPage( + rawOaAuthorId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getAuthorWorkPage( + rawOaAuthorId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getAuthorWorkPage( + rawOaAuthorId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getAuthorWorkPage( + rawOaAuthorId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error( + 'Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPage.', + ); } - /** - * Returns a paginated list of works for a given author based on their ID. - * @endpoint get /api/works/v2/author/{raw_oa_author_id} - * @param rawOaAuthorId The raw OpenAlex author id. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param title A title to filter by (partial matches allowed). - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getAuthorWorkPage(rawOaAuthorId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getAuthorWorkPage.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_years'); - }) - } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_types'); - }) - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'language_codes'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sort_order'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/author/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_years', ); + }); } - - /** - * Returns a paginated list of works for a given institution based on their ID. - * @endpoint get /api/works/v2/institution/{raw_oa_institution_id} - * @param rawOaInstitutionId The raw OpenAlex institution id. - * @param page The page number to retrieve. (0-based) - * @param title A title to filter by (partial matches allowed). - * @param size The number of works to retrieve per page. - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param authorIds A list of author IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getInstitutionWorkPage(rawOaInstitutionId: string, page?: number, title?: string, size?: number, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { - throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionWorkPage.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_years'); - }) - } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_types'); - }) - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'language_codes'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sort_order'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/institution/${this.configuration.encodeParam({name: "rawOaInstitutionId", value: rawOaInstitutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_types', ); + }); } - - /** - * Returns the primary category aggregations of works for a given author based on their ID - * @endpoint get /api/works/v2/author/{raw_oa_author_id}/primary-category-aggregations - * @param rawOaAuthorId The raw OpenAlex author id. - * @param yearSize The number of years to retrieve aggregations for. - * @param categorySize The number of categories to retrieve aggregations for. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPrimaryCategoryAggregationsByAuthorId(rawOaAuthorId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaAuthorId === null || rawOaAuthorId === undefined) { - throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getPrimaryCategoryAggregationsByAuthorId.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - yearSize, 'year_size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - categorySize, 'category_size'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/author/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/primary-category-aggregations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', ); + }); } - - /** - * Returns the primary category aggregations of works for a given institution based on their ID. - * @endpoint get /api/works/v2/institution/{raw_oa_institution_id}/primary-category-aggregations - * @param rawOaInstitutionId The raw OpenAlex institution id. - * @param yearSize The number of years to retrieve aggregations for. - * @param categorySize The number of categories to retrieve aggregations for. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getPrimaryCategoryAggregationsByInstitutionId(rawOaInstitutionId: string, yearSize?: number, categorySize?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { - throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getPrimaryCategoryAggregationsByInstitutionId.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - yearSize, 'year_size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - categorySize, 'category_size'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/institution/${this.configuration.encodeParam({name: "rawOaInstitutionId", value: rawOaInstitutionId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/primary-category-aggregations`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', ); + }); } - - /** - * Returns a paginated list of works for a given topic based on its ID. - * @endpoint get /api/works/v2/topic/{raw_oa_topic_id} - * @param rawOaTopicId The raw OpenAlex topic id. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param title A title to filter by (partial matches allowed). - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param authorIds A list of author IDs to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTopicWorkPage(rawOaTopicId: string, page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaTopicId === null || rawOaTopicId === undefined) { - throw new Error('Required parameter rawOaTopicId was null or undefined when calling getTopicWorkPage.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_years'); - }) - } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_types'); - }) - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'language_codes'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sort_order'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/topic/${this.configuration.encodeParam({name: "rawOaTopicId", value: rawOaTopicId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + 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, + ); } - /** - * Returns a work based on its ID. - * @endpoint get /api/works/v2/single/{raw_oa_work_id} - * @param rawOaWorkId The raw OpenAlex work id. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWorkById(rawOaWorkId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getWorkById(rawOaWorkId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorkById(rawOaWorkId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorkById(rawOaWorkId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaWorkId === null || rawOaWorkId === undefined) { - throw new Error('Required parameter rawOaWorkId was null or undefined when calling getWorkById.'); - } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); - let localVarHeaders = this.defaultHeaders; + const localVarTransferCache: boolean = options?.transferCache ?? true; - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + let localVarPath = `/api/works/v2/author/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } - const localVarTransferCache: boolean = options?.transferCache ?? true; + /** + * Returns a paginated list of works for a given institution based on their ID. + * @endpoint get /api/works/v2/institution/{raw_oa_institution_id} + * @param rawOaInstitutionId The raw OpenAlex institution id. + * @param page The page number to retrieve. (0-based) + * @param title A title to filter by (partial matches allowed). + * @param size The number of works to retrieve per page. + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param authorIds A list of author IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getInstitutionWorkPage( + rawOaInstitutionId: string, + page?: number, + title?: string, + size?: number, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getInstitutionWorkPage( + rawOaInstitutionId: string, + page?: number, + title?: string, + size?: number, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionWorkPage( + rawOaInstitutionId: string, + page?: number, + title?: string, + size?: number, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getInstitutionWorkPage( + rawOaInstitutionId: string, + page?: number, + title?: string, + size?: number, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { + throw new Error( + 'Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionWorkPage.', + ); + } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/single/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_years', ); + }); } - - /** - * Returns the classifications of a work based on its ID. - * @endpoint get /api/works/v2/classification/work/{raw_oa_work_id} - * @param rawOaWorkId The raw OpenAlex work id. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorkClassificationByWorkId(rawOaWorkId: string, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - if (rawOaWorkId === null || rawOaWorkId === undefined) { - throw new Error('Required parameter rawOaWorkId was null or undefined when calling getWorkClassificationByWorkId.'); - } - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/classification/work/${this.configuration.encodeParam({name: "rawOaWorkId", value: rawOaWorkId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_types', ); + }); } - - /** - * Returns the classifications of works based on their IDs. - * @endpoint get /api/works/v2/classification/works/search - * @param workIds A list of OpenAlex work IDs to retrieve classifications for. - * @param rawOaAuthorId The raw OpenAlex author id to filter by. - * @param rawOaInstitutionId The raw OpenAlex institution id to filter by. - * @param page The page number to retrieve. (0-based) - * @param size The number of classifications to retrieve per page. - * @param secureFgpAcc - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorkClassificationsByWorkIds(workIds?: Array, rawOaAuthorId?: string, rawOaInstitutionId?: string, page?: number, size?: number, secureFgpAcc?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (workIds) { - workIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'work_ids'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaAuthorId, 'raw_oa_author_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - rawOaInstitutionId, 'raw_oa_institution_id'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - - let localVarHeaders = this.defaultHeaders; - - // authentication (HTTPBearer) required - localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer '); - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/classification/works/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', ); + }); } - - /** - * Search works by topics or raw keywords with filters. - * @endpoint get /api/works/v2/keyword/search - * @param topics List of topics to match. - * @param topicIds List of topic IDs to match. - * @param filterTopicIds Additional topic IDs to filter results by, independent of search mode. - * @param keywords Raw keywords to search in title/abstract. - * @param fuzzy Use topic resolution if True, otherwise use raw keywords. - * @param publicationYear A list of publication years to filter by. - * @param publicationType A list of publication types to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param authorIds A list of author IDs to filter by. - * @param language A list of language codes to filter by. - * @param title Title to search for in works. - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getWorksByKeywords(topics?: Array, topicIds?: Array, filterTopicIds?: Array, keywords?: Array, fuzzy?: boolean, publicationYear?: Array, publicationType?: Array, institutionIds?: Array, authorIds?: Array, language?: Array, title?: string, page?: number, size?: number, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (topics) { - topics.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topics'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (filterTopicIds) { - filterTopicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'filter_topic_ids'); - }) - } - if (keywords) { - keywords.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'keywords'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - fuzzy, 'fuzzy'); - if (publicationYear) { - publicationYear.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_year'); - }) - } - if (publicationType) { - publicationType.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_type'); - }) - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - if (language) { - language.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'language'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sort_order'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/keyword/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', ); + }); } - - /** - * Search works with filters. - * @endpoint get /api/works/v2/search - * @param page The page number to retrieve. (0-based) - * @param size The number of works to retrieve per page. - * @param title A title to filter by (partial matches allowed). - * @param publicationYears A list of publication years to filter by. - * @param publicationTypes A list of publication types to filter by. - * @param authorIds A list of author IDs to filter by. - * @param institutionIds A list of institution IDs to filter by. - * @param topicIds A list of topic IDs to filter by. - * @param languageCodes A list of language codes to filter by. - * @param sortBy The field to sort by. - * @param sortOrder The order to sort by. - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public searchWorks(page?: number, size?: number, title?: string, publicationYears?: Array, publicationTypes?: Array, authorIds?: Array, institutionIds?: Array, topicIds?: Array, languageCodes?: Array, sortBy?: WorkSortBy, sortOrder?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - page, 'page'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - size, 'size'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - title, 'title'); - if (publicationYears) { - publicationYears.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_years'); - }) - } - if (publicationTypes) { - publicationTypes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'publication_types'); - }) - } - if (authorIds) { - authorIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'author_ids'); - }) - } - if (institutionIds) { - institutionIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'institution_ids'); - }) - } - if (topicIds) { - topicIds.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'topic_ids'); - }) - } - if (languageCodes) { - languageCodes.forEach((element) => { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - element, 'language_codes'); - }) - } - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortBy, 'sort_by'); - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortOrder, 'sort_order'); - - let localVarHeaders = this.defaultHeaders; - - const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ - 'application/json' - ]); - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); - - const localVarTransferCache: boolean = options?.transferCache ?? true; - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/api/works/v2/search`; - const { basePath, withCredentials } = this.configuration; - return this.httpClient.request('get', `${basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - ...(withCredentials ? { withCredentials } : {}), - headers: localVarHeaders, - observe: observe, - ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), - reportProgress: reportProgress - } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'language_codes', ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortOrder, + 'sort_order', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); } + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/institution/${this.configuration.encodeParam({ name: 'rawOaInstitutionId', value: rawOaInstitutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns the primary category aggregations of works for a given author based on their ID + * @endpoint get /api/works/v2/author/{raw_oa_author_id}/primary-category-aggregations + * @param rawOaAuthorId The raw OpenAlex author id. + * @param yearSize The number of years to retrieve aggregations for. + * @param categorySize The number of categories to retrieve aggregations for. + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPrimaryCategoryAggregationsByAuthorId( + rawOaAuthorId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getPrimaryCategoryAggregationsByAuthorId( + rawOaAuthorId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPrimaryCategoryAggregationsByAuthorId( + rawOaAuthorId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPrimaryCategoryAggregationsByAuthorId( + rawOaAuthorId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaAuthorId === null || rawOaAuthorId === undefined) { + throw new Error( + 'Required parameter rawOaAuthorId was null or undefined when calling getPrimaryCategoryAggregationsByAuthorId.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + yearSize, + 'year_size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + categorySize, + 'category_size', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/author/${this.configuration.encodeParam({ name: 'rawOaAuthorId', value: rawOaAuthorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-category-aggregations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns the primary category aggregations of works for a given institution based on their ID. + * @endpoint get /api/works/v2/institution/{raw_oa_institution_id}/primary-category-aggregations + * @param rawOaInstitutionId The raw OpenAlex institution id. + * @param yearSize The number of years to retrieve aggregations for. + * @param categorySize The number of categories to retrieve aggregations for. + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getPrimaryCategoryAggregationsByInstitutionId( + rawOaInstitutionId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getPrimaryCategoryAggregationsByInstitutionId( + rawOaInstitutionId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPrimaryCategoryAggregationsByInstitutionId( + rawOaInstitutionId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getPrimaryCategoryAggregationsByInstitutionId( + rawOaInstitutionId: string, + yearSize?: number, + categorySize?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) { + throw new Error( + 'Required parameter rawOaInstitutionId was null or undefined when calling getPrimaryCategoryAggregationsByInstitutionId.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + yearSize, + 'year_size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + categorySize, + 'category_size', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/institution/${this.configuration.encodeParam({ name: 'rawOaInstitutionId', value: rawOaInstitutionId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/primary-category-aggregations`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns a paginated list of works for a given topic based on its ID. + * @endpoint get /api/works/v2/topic/{raw_oa_topic_id} + * @param rawOaTopicId The raw OpenAlex topic id. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param title A title to filter by (partial matches allowed). + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param authorIds A list of author IDs to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicWorkPage( + rawOaTopicId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getTopicWorkPage( + rawOaTopicId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getTopicWorkPage( + rawOaTopicId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getTopicWorkPage( + rawOaTopicId: string, + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaTopicId === null || rawOaTopicId === undefined) { + throw new Error( + 'Required parameter rawOaTopicId was null or undefined when calling getTopicWorkPage.', + ); + } + + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_years', + ); + }); + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_types', + ); + }); + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', + ); + }); + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', + ); + }); + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'language_codes', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortOrder, + 'sort_order', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/topic/${this.configuration.encodeParam({ name: 'rawOaTopicId', value: rawOaTopicId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns a work based on its ID. + * @endpoint get /api/works/v2/single/{raw_oa_work_id} + * @param rawOaWorkId The raw OpenAlex work id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWorkById( + rawOaWorkId: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getWorkById( + rawOaWorkId: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorkById( + rawOaWorkId: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorkById( + rawOaWorkId: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaWorkId === null || rawOaWorkId === undefined) { + throw new Error( + 'Required parameter rawOaWorkId was null or undefined when calling getWorkById.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/single/${this.configuration.encodeParam({ name: 'rawOaWorkId', value: rawOaWorkId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }); + } + + /** + * Returns the classifications of a work based on its ID. + * @endpoint get /api/works/v2/classification/work/{raw_oa_work_id} + * @param rawOaWorkId The raw OpenAlex work id. + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWorkClassificationByWorkId( + rawOaWorkId: string, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getWorkClassificationByWorkId( + rawOaWorkId: string, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorkClassificationByWorkId( + rawOaWorkId: string, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorkClassificationByWorkId( + rawOaWorkId: string, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + if (rawOaWorkId === null || rawOaWorkId === undefined) { + throw new Error( + 'Required parameter rawOaWorkId was null or undefined when calling getWorkClassificationByWorkId.', + ); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/classification/work/${this.configuration.encodeParam({ name: 'rawOaWorkId', value: rawOaWorkId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Returns the classifications of works based on their IDs. + * @endpoint get /api/works/v2/classification/works/search + * @param workIds A list of OpenAlex work IDs to retrieve classifications for. + * @param rawOaAuthorId The raw OpenAlex author id to filter by. + * @param rawOaInstitutionId The raw OpenAlex institution id to filter by. + * @param page The page number to retrieve. (0-based) + * @param size The number of classifications to retrieve per page. + * @param secureFgpAcc + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWorkClassificationsByWorkIds( + workIds?: Array, + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + page?: number, + size?: number, + secureFgpAcc?: string, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getWorkClassificationsByWorkIds( + workIds?: Array, + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + page?: number, + size?: number, + secureFgpAcc?: string, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorkClassificationsByWorkIds( + workIds?: Array, + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + page?: number, + size?: number, + secureFgpAcc?: string, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorkClassificationsByWorkIds( + workIds?: Array, + rawOaAuthorId?: string, + rawOaInstitutionId?: string, + page?: number, + size?: number, + secureFgpAcc?: string, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (workIds) { + workIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'work_ids', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaAuthorId, + 'raw_oa_author_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + rawOaInstitutionId, + 'raw_oa_institution_id', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + + let localVarHeaders = this.defaultHeaders; + + // authentication (HTTPBearer) required + localVarHeaders = this.configuration.addCredentialToHeaders( + 'HTTPBearer', + 'Authorization', + localVarHeaders, + 'Bearer ', + ); + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/classification/works/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Search works by topics or raw keywords with filters. + * @endpoint get /api/works/v2/keyword/search + * @param topics List of topics to match. + * @param topicIds List of topic IDs to match. + * @param filterTopicIds Additional topic IDs to filter results by, independent of search mode. + * @param keywords Raw keywords to search in title/abstract. + * @param fuzzy Use topic resolution if True, otherwise use raw keywords. + * @param publicationYear A list of publication years to filter by. + * @param publicationType A list of publication types to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param authorIds A list of author IDs to filter by. + * @param language A list of language codes to filter by. + * @param title Title to search for in works. + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getWorksByKeywords( + topics?: Array, + topicIds?: Array, + filterTopicIds?: Array, + keywords?: Array, + fuzzy?: boolean, + publicationYear?: Array, + publicationType?: Array, + institutionIds?: Array, + authorIds?: Array, + language?: Array, + title?: string, + page?: number, + size?: number, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public getWorksByKeywords( + topics?: Array, + topicIds?: Array, + filterTopicIds?: Array, + keywords?: Array, + fuzzy?: boolean, + publicationYear?: Array, + publicationType?: Array, + institutionIds?: Array, + authorIds?: Array, + language?: Array, + title?: string, + page?: number, + size?: number, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorksByKeywords( + topics?: Array, + topicIds?: Array, + filterTopicIds?: Array, + keywords?: Array, + fuzzy?: boolean, + publicationYear?: Array, + publicationType?: Array, + institutionIds?: Array, + authorIds?: Array, + language?: Array, + title?: string, + page?: number, + size?: number, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public getWorksByKeywords( + topics?: Array, + topicIds?: Array, + filterTopicIds?: Array, + keywords?: Array, + fuzzy?: boolean, + publicationYear?: Array, + publicationType?: Array, + institutionIds?: Array, + authorIds?: Array, + language?: Array, + title?: string, + page?: number, + size?: number, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + if (topics) { + topics.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topics', + ); + }); + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', + ); + }); + } + if (filterTopicIds) { + filterTopicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'filter_topic_ids', + ); + }); + } + if (keywords) { + keywords.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'keywords', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + fuzzy, + 'fuzzy', + ); + if (publicationYear) { + publicationYear.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_year', + ); + }); + } + if (publicationType) { + publicationType.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_type', + ); + }); + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', + ); + }); + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', + ); + }); + } + if (language) { + language.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'language', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortOrder, + 'sort_order', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/keyword/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } + + /** + * Search works with filters. + * @endpoint get /api/works/v2/search + * @param page The page number to retrieve. (0-based) + * @param size The number of works to retrieve per page. + * @param title A title to filter by (partial matches allowed). + * @param publicationYears A list of publication years to filter by. + * @param publicationTypes A list of publication types to filter by. + * @param authorIds A list of author IDs to filter by. + * @param institutionIds A list of institution IDs to filter by. + * @param topicIds A list of topic IDs to filter by. + * @param languageCodes A list of language codes to filter by. + * @param sortBy The field to sort by. + * @param sortOrder The order to sort by. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public searchWorks( + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'body', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable; + public searchWorks( + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'response', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchWorks( + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe?: 'events', + reportProgress?: boolean, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable>; + public searchWorks( + page?: number, + size?: number, + title?: string, + publicationYears?: Array, + publicationTypes?: Array, + authorIds?: Array, + institutionIds?: Array, + topicIds?: Array, + languageCodes?: Array, + sortBy?: WorkSortBy, + sortOrder?: SortDirection, + observe: any = 'body', + reportProgress: boolean = false, + options?: { + httpHeaderAccept?: 'application/json'; + context?: HttpContext; + transferCache?: boolean; + }, + ): Observable { + let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + page, + 'page', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + size, + 'size', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + title, + 'title', + ); + if (publicationYears) { + publicationYears.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_years', + ); + }); + } + if (publicationTypes) { + publicationTypes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'publication_types', + ); + }); + } + if (authorIds) { + authorIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'author_ids', + ); + }); + } + if (institutionIds) { + institutionIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'institution_ids', + ); + }); + } + if (topicIds) { + topicIds.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'topic_ids', + ); + }); + } + if (languageCodes) { + languageCodes.forEach((element) => { + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + element, + 'language_codes', + ); + }); + } + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortBy, + 'sort_by', + ); + localVarQueryParameters = this.addToHttpParams( + localVarQueryParameters, + sortOrder, + 'sort_order', + ); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = + options?.httpHeaderAccept ?? + this.configuration.selectHeaderAccept(['application/json']); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set( + 'Accept', + localVarHttpHeaderAcceptSelected, + ); + } + + const localVarHttpContext: HttpContext = + options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if ( + this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) + ) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/works/v2/search`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request( + 'get', + `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined + ? { transferCache: localVarTransferCache } + : {}), + reportProgress: reportProgress, + }, + ); + } } diff --git a/webapp/src/app/api/model/accessToken.ts b/webapp/src/app/api/model/accessToken.ts index 74c4d45a..c2a5ec79 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,51 +10,47 @@ import { TokenType } from './tokenType'; import { UserRole } from './userRole'; - -export interface AccessToken { - /** - * The unique identifier of the real account associated with this token. - */ - real_account_id: string; - /** - * The timestamp indicating when the token will expire. - */ - expires_at: string; - /** - * The epoch value for the token. Used for versioning of tokens. - */ - epoch?: number; - /** - * The type of the token, which is always ACCESS_TOKEN for this class. - */ - token_type?: TokenType; - /** - * A unique fingerprint of the user, used for additional security checks. - */ - user_fingerprint_hash: string; - /** - * The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation. - */ - effective_account_id: string; - /** - * The specific role this access token grants within its organization. - */ - effective_role?: UserRole; - /** - * The roles this access token grants within its organization. - */ - effective_roles?: Array; - /** - * The unique identifier of the organization associated with this access token. - */ - effective_organization_id: string; - effective_institution_id?: string | null; - /** - * The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes. - */ - raw_token: string; +export interface AccessToken { + /** + * The unique identifier of the real account associated with this token. + */ + real_account_id: string; + /** + * The timestamp indicating when the token will expire. + */ + expires_at: string; + /** + * The epoch value for the token. Used for versioning of tokens. + */ + epoch?: number; + /** + * The type of the token, which is always ACCESS_TOKEN for this class. + */ + token_type?: TokenType; + /** + * A unique fingerprint of the user, used for additional security checks. + */ + user_fingerprint_hash: string; + /** + * The unique identifier of the effective account associated with this access token. This may differ from the real account ID due to account impersonation. + */ + effective_account_id: string; + /** + * The specific role this access token grants within its organization. + */ + effective_role?: UserRole; + /** + * The roles this access token grants within its organization. + */ + effective_roles?: Array; + /** + * The unique identifier of the organization associated with this access token. + */ + effective_organization_id: string; + effective_institution_id?: string | null; + /** + * The raw string representation of the access token. This is the actual token that can be used for authentication and authorization purposes. + */ + raw_token: string; } -export namespace AccessToken { -} - - +export namespace AccessToken {} diff --git a/webapp/src/app/api/model/accountProfile.ts b/webapp/src/app/api/model/accountProfile.ts index a7d7afa5..a61b98ae 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,18 +9,16 @@ */ 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/authorMetricsRequest.ts b/webapp/src/app/api/model/authorMetricsRequest.ts index f0a072e3..1f4f15c6 100644 --- a/webapp/src/app/api/model/authorMetricsRequest.ts +++ b/webapp/src/app/api/model/authorMetricsRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,18 +9,14 @@ */ import { CompanyStatusFilter } from './companyStatusFilter'; - -export interface AuthorMetricsRequest { - /** - * OpenAlex IDs of the authors. - */ - author_ids: Array; - /** - * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. - */ - company_status?: CompanyStatusFilter; +export interface AuthorMetricsRequest { + /** + * OpenAlex IDs of the authors. + */ + author_ids: Array; + /** + * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. + */ + company_status?: CompanyStatusFilter; } -export namespace AuthorMetricsRequest { -} - - +export namespace AuthorMetricsRequest {} diff --git a/webapp/src/app/api/model/authorNode.ts b/webapp/src/app/api/model/authorNode.ts index 03a4f48e..4e043f03 100644 --- a/webapp/src/app/api/model/authorNode.ts +++ b/webapp/src/app/api/model/authorNode.ts @@ -1,26 +1,24 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface AuthorNode { - /** - * The ID of the author. - */ - id: string; - /** - * The display name of the author. - */ - display_name: string; - /** - * IDs of institutions this author is affiliated with. - */ - institution_ids?: Array; +export interface AuthorNode { + /** + * The ID of the author. + */ + id: string; + /** + * The display name of the author. + */ + display_name: string; + /** + * IDs of institutions this author is affiliated with. + */ + institution_ids?: Array; } - diff --git a/webapp/src/app/api/model/authorOrientationProfile.ts b/webapp/src/app/api/model/authorOrientationProfile.ts index 1b48ad42..ab447c6c 100644 --- a/webapp/src/app/api/model/authorOrientationProfile.ts +++ b/webapp/src/app/api/model/authorOrientationProfile.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,22 +9,18 @@ */ import { AuthorOrientationProfileStatus } from './authorOrientationProfileStatus'; - /** * Aggregated research-orientation result for one selected author. */ -export interface AuthorOrientationProfile { - /** - * The full OpenAlex author ID. - */ - author_id: string; - status: AuthorOrientationProfileStatus; - orientation_score?: number | null; - primary_category_counts?: { [key: string]: number; } | null; - classified_work_count?: number | null; - scored_work_count?: number | null; +export interface AuthorOrientationProfile { + /** + * The full OpenAlex author ID. + */ + author_id: string; + status: AuthorOrientationProfileStatus; + orientation_score?: number | null; + primary_category_counts?: { [key: string]: number } | null; + classified_work_count?: number | null; + scored_work_count?: number | null; } -export namespace AuthorOrientationProfile { -} - - +export namespace AuthorOrientationProfile {} diff --git a/webapp/src/app/api/model/authorOrientationProfileStatus.ts b/webapp/src/app/api/model/authorOrientationProfileStatus.ts index d693a853..86dee198 100644 --- a/webapp/src/app/api/model/authorOrientationProfileStatus.ts +++ b/webapp/src/app/api/model/authorOrientationProfileStatus.ts @@ -1,20 +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 AuthorOrientationProfileStatus = { - Available: 'available', - InsufficientScoredPublications: 'insufficient_scored_publications', - NoClassifiedPublications: 'no_classified_publications', - NoOrientationScore: 'no_orientation_score', - Restricted: 'restricted' + Available: 'available', + InsufficientScoredPublications: 'insufficient_scored_publications', + NoClassifiedPublications: 'no_classified_publications', + NoOrientationScore: 'no_orientation_score', + Restricted: 'restricted', } as const; -export type AuthorOrientationProfileStatus = typeof AuthorOrientationProfileStatus[keyof typeof AuthorOrientationProfileStatus]; - +export type AuthorOrientationProfileStatus = + (typeof AuthorOrientationProfileStatus)[keyof typeof AuthorOrientationProfileStatus]; diff --git a/webapp/src/app/api/model/authorOrientationProfilesRequest.ts b/webapp/src/app/api/model/authorOrientationProfilesRequest.ts index 4db5a7ee..cf451671 100644 --- a/webapp/src/app/api/model/authorOrientationProfilesRequest.ts +++ b/webapp/src/app/api/model/authorOrientationProfilesRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,19 +10,17 @@ import { Timespan } from './timespan'; import { PublicationType } from './publicationType'; - /** * Filters used to compare the research orientation of selected authors. */ -export interface AuthorOrientationProfilesRequest { - /** - * One to four unique OpenAlex author IDs. - */ - author_ids: Array; - /** - * Optional publication-type filter. Empty means all types. - */ - publication_types?: Array; - timespan?: Timespan | null; +export interface AuthorOrientationProfilesRequest { + /** + * One to four unique OpenAlex author IDs. + */ + author_ids: Array; + /** + * Optional publication-type filter. Empty means all types. + */ + publication_types?: Array; + timespan?: Timespan | null; } - diff --git a/webapp/src/app/api/model/authorPage.ts b/webapp/src/app/api/model/authorPage.ts index ce0a58ed..842ce006 100644 --- a/webapp/src/app/api/model/authorPage.ts +++ b/webapp/src/app/api/model/authorPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,26 +9,24 @@ */ import { Author } from './author'; - /** * A paginated response containing a list of authors. */ -export interface AuthorPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface AuthorPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/authorStaticStats.ts b/webapp/src/app/api/model/authorStaticStats.ts index ddb24c33..655e18c2 100644 --- a/webapp/src/app/api/model/authorStaticStats.ts +++ b/webapp/src/app/api/model/authorStaticStats.ts @@ -1,37 +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. */ - /** * Section 2: author-level stats independent of any keyword/topic/time filter. */ -export interface AuthorStaticStats { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * Number of Handelsregister company connections matched by the author\'s name. - */ - companies_count: number; - /** - * Number of news articles that mention the author by exact name. - */ - news_count: number; - /** - * Number of patents matched to the author (from the org_patents index). - */ - patents_count: number; +export interface AuthorStaticStats { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * Number of Handelsregister company connections matched by the author\'s name. + */ + companies_count: number; + /** + * Number of news articles that mention the author by exact name. + */ + news_count: number; + /** + * Number of patents matched to the author (from the org_patents index). + */ + patents_count: number; } - diff --git a/webapp/src/app/api/model/authorTopicProfile.ts b/webapp/src/app/api/model/authorTopicProfile.ts index 32bbe888..936f3dc6 100644 --- a/webapp/src/app/api/model/authorTopicProfile.ts +++ b/webapp/src/app/api/model/authorTopicProfile.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,43 +9,108 @@ */ import { SubfieldShare } from './subfieldShare'; - -export interface AuthorTopicProfile { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * All works of the author in the timespan, regardless of the topic filter. - */ - works_total: number; - /** - * Works matching the topic filter (same subset as Section 1). - */ - matched_works: number; - /** - * Matched works where one of the searched topics is the work\'s primary topic (only meaningful for filter_type \'topic\'). - */ - primary_topic_matches: number; - /** - * Number of distinct primary topics across all works. - */ - distinct_topics: number; - /** - * Number of distinct primary-topic subfields across all works. - */ - distinct_subfields: number; - /** - * Number of distinct primary-topic fields across all works. - */ - distinct_fields: number; - /** - * Top subfields over all works, by primary topic, largest first. - */ - subfields?: Array; +/** + * A primary topic within a subfield. + */ +export interface TopicNode { + /** + * The OpenAlex ID of the primary topic. + */ + id: string; + /** + * The primary-topic display name. + */ + name: string; + /** + * Number of works whose primary topic is this topic. + */ + count: number; } +/** + * A subfield within a field, with its primary topics. + */ +export interface SubfieldNode { + /** + * The OpenAlex ID of the subfield. + */ + id: string; + /** + * The subfield display name. + */ + name: string; + /** + * Number of works whose primary topic belongs to this subfield. + */ + count: number; + /** + * Primary topics within this subfield, largest first. + */ + topics: Array; +} + +/** + * A field with its subfields, top of the primary-topic hierarchy. + */ +export interface FieldNode { + /** + * The OpenAlex ID of the field. + */ + id: string; + /** + * The field display name. + */ + name: string; + /** + * Number of works whose primary topic belongs to this field. + */ + count: number; + /** + * Subfields within this field, largest first. + */ + subfields: Array; +} + +export interface AuthorTopicProfile { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * All works of the author in the timespan, regardless of the topic filter. + */ + works_total: number; + /** + * Works matching the topic filter (same subset as Section 1). + */ + matched_works: number; + /** + * Matched works where one of the searched topics is the work\'s primary topic (only meaningful for filter_type \'topic\'). + */ + primary_topic_matches: number; + /** + * Number of distinct primary topics across all works. + */ + distinct_topics: number; + /** + * Number of distinct primary-topic subfields across all works. + */ + distinct_subfields: number; + /** + * Number of distinct primary-topic fields across all works. + */ + distinct_fields: number; + /** + * Top subfields over all works, by primary topic, largest first. + */ + subfields?: Array; + /** + * Field -> subfield -> topic hierarchy over all works, by primary topic, + * each level largest first. Drives the interactive topic treemap. + */ + field_tree: Array; +} diff --git a/webapp/src/app/api/model/authorTopicStats.ts b/webapp/src/app/api/model/authorTopicStats.ts index 9bf9e187..15fac6d0 100644 --- a/webapp/src/app/api/model/authorTopicStats.ts +++ b/webapp/src/app/api/model/authorTopicStats.ts @@ -1,95 +1,93 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * Section 1: combined stats over an author\'s works that match the topic filter. */ -export interface AuthorTopicStats { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * Number of the author\'s works matching the topic filter. - */ - works_total: number; - /** - * Number of the author\'s topic works where they are the corresponding author. - */ - corresponding_count: number; - /** - * Average field-normalized citation percentile (0-1) over the author\'s topic works. - */ - avg_percentile: number; - /** - * Number of the author\'s topic works in the top 1% most-cited. - */ - top1_count: number; - /** - * Number of the author\'s topic works in the top 10% most-cited. - */ - top10_count: number; - /** - * Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1 (cited more than the field/year/type average). - */ - fwci_above_one_count?: number; - /** - * Total citations across the author\'s topic works. - */ - citations_total?: number; - /** - * Average citations per topic work. - */ - avg_citations?: number; - /** - * Citations of the author\'s most-cited topic work. - */ - max_citations?: number; - /** - * h-index over the author\'s topic works (capped at 100). - */ - h_index?: number; - /** - * Average field-weighted citation impact (FWCI) over the author\'s topic works; works without an FWCI value are excluded. - */ - avg_fwci?: number; - /** - * Number of the author\'s topic works with at least one co-author institution of type \'company\'. - */ - industry_works_count?: number; - first_year?: number | null; - last_year?: number | null; - /** - * Number of the author\'s topic works where the matched keyword\'s relevance score is above 0.8. - */ - relevance_above_80_count?: number; - /** - * Average matched-keyword relevance score (0-1) over the author\'s topic works. - */ - avg_relevance?: number; - /** - * Number of the author\'s topic works where they are the first author. - */ - first_author_count?: number; - /** - * Number of the author\'s topic works where they are a middle author. - */ - middle_author_count?: number; - /** - * Number of the author\'s topic works where they are the last author. - */ - last_author_count?: number; +export interface AuthorTopicStats { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * Number of the author\'s works matching the topic filter. + */ + works_total: number; + /** + * Number of the author\'s topic works where they are the corresponding author. + */ + corresponding_count: number; + /** + * Average field-normalized citation percentile (0-1) over the author\'s topic works. + */ + avg_percentile: number; + /** + * Number of the author\'s topic works in the top 1% most-cited. + */ + top1_count: number; + /** + * Number of the author\'s topic works in the top 10% most-cited. + */ + top10_count: number; + /** + * Number of the author\'s topic works with a field-weighted citation impact (FWCI) above 1 (cited more than the field/year/type average). + */ + fwci_above_one_count?: number; + /** + * Total citations across the author\'s topic works. + */ + citations_total?: number; + /** + * Average citations per topic work. + */ + avg_citations?: number; + /** + * Citations of the author\'s most-cited topic work. + */ + max_citations?: number; + /** + * h-index over the author\'s topic works (capped at 100). + */ + h_index?: number; + /** + * Average field-weighted citation impact (FWCI) over the author\'s topic works; works without an FWCI value are excluded. + */ + avg_fwci?: number; + /** + * Number of the author\'s topic works with at least one co-author institution of type \'company\'. + */ + industry_works_count?: number; + first_year?: number | null; + last_year?: number | null; + /** + * Number of the author\'s topic works where the matched keyword\'s relevance score is above 0.8. + */ + relevance_above_80_count?: number; + /** + * Average matched-keyword relevance score (0-1) over the author\'s topic works. + */ + avg_relevance?: number; + /** + * Number of the author\'s topic works where they are the first author. + */ + first_author_count?: number; + /** + * Number of the author\'s topic works where they are a middle author. + */ + middle_author_count?: number; + /** + * Number of the author\'s topic works where they are the last author. + */ + last_author_count?: number; } - diff --git a/webapp/src/app/api/model/availableImages.ts b/webapp/src/app/api/model/availableImages.ts index 87861990..06b9742e 100644 --- a/webapp/src/app/api/model/availableImages.ts +++ b/webapp/src/app/api/model/availableImages.ts @@ -1,16 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface AvailableImages { - images: Array; - detail?: string; +export interface AvailableImages { + images: Array; + detail?: string; } - diff --git a/webapp/src/app/api/model/backgroundJobTask.ts b/webapp/src/app/api/model/backgroundJobTask.ts index b6023df5..fa6f3f4f 100644 --- a/webapp/src/app/api/model/backgroundJobTask.ts +++ b/webapp/src/app/api/model/backgroundJobTask.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,19 +9,17 @@ */ import { JobRun } from './jobRun'; - -export interface BackgroundJobTask { - id: number; - name: string; - description: string; - target_index: string; - image: string | null; - command: string | null; - env: { [key: string]: string; }; - schedule: string | null; - enabled: boolean; - next_run_at: string | null; - last_run: JobRun | null; - status: string; +export interface BackgroundJobTask { + id: number; + name: string; + description: string; + target_index: string; + image: string | null; + command: string | null; + env: { [key: string]: string }; + schedule: string | null; + enabled: boolean; + next_run_at: string | null; + last_run: JobRun | null; + status: string; } - diff --git a/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts b/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts index d6980562..b3ecdb6b 100644 --- a/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts +++ b/webapp/src/app/api/model/bmbfProjectStatusStatistics.ts @@ -1,19 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface BmbfProjectStatusStatistics { - institution_id: string; - organization_name: string; - ongoing: number; - upcoming: number; - completed: number; +export interface BmbfProjectStatusStatistics { + institution_id: string; + organization_name: string; + ongoing: number; + upcoming: number; + completed: number; } - diff --git a/webapp/src/app/api/model/bundInstitutionSummary.ts b/webapp/src/app/api/model/bundInstitutionSummary.ts index 8e61d493..dba7f1bc 100644 --- a/webapp/src/app/api/model/bundInstitutionSummary.ts +++ b/webapp/src/app/api/model/bundInstitutionSummary.ts @@ -1,25 +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. */ - /** * A single institution entry derived from a BUND project record. Note: this index has no dedicated institution entity — each entry is reconstructed from the agency/recipient fields on a single project hit, so the same institution may appear multiple times (once per project). */ -export interface BundInstitutionSummary { - department?: string | null; - department_fullname?: string | null; - name?: string | null; - recepient?: string | null; - municipality?: string | null; - place?: string | null; - state?: string | null; - country?: string | null; +export interface BundInstitutionSummary { + department?: string | null; + department_fullname?: string | null; + name?: string | null; + recepient?: string | null; + municipality?: string | null; + place?: string | null; + state?: string | null; + country?: string | null; } - diff --git a/webapp/src/app/api/model/bundInstitutionSummaryPage.ts b/webapp/src/app/api/model/bundInstitutionSummaryPage.ts index c2d76b87..f1e39b95 100644 --- a/webapp/src/app/api/model/bundInstitutionSummaryPage.ts +++ b/webapp/src/app/api/model/bundInstitutionSummaryPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,26 +9,24 @@ */ import { BundInstitutionSummary } from './bundInstitutionSummary'; - /** * A paginated response containing a list of institutions. */ -export interface BundInstitutionSummaryPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface BundInstitutionSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/bundProjectDetails.ts b/webapp/src/app/api/model/bundProjectDetails.ts index d63a6032..fed64cc4 100644 --- a/webapp/src/app/api/model/bundProjectDetails.ts +++ b/webapp/src/app/api/model/bundProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,51 +9,49 @@ */ import { Topic } from './topic'; - /** * Clean summary model for a Bund (federal) project, consolidating all fields into semantic English names with proper native types. */ -export interface BundProjectDetails { - /** - * The ID of the Bund project - */ - id: string; - funding_reference?: string | null; - title?: string | null; - description?: string | null; - joint_project?: string | null; - funding_type?: string | null; - funding_profile?: string | null; - funding_amount?: number | null; - funding_start_date?: string | null; - funding_end_date?: string | null; - duration?: string | null; - performance_plan_code?: string | null; - performance_plan_fullname?: string | null; - executing_agency?: string | null; - funding_recipient?: string | null; - project_agency?: string | null; - project_agency_fullname?: string | null; - department?: string | null; - department_fullname?: string | null; - division?: string | null; - location?: string | null; - municipality?: string | null; - state?: string | null; - country?: string | null; - municipality_code?: string | null; - publication_date?: string | null; - is_new?: boolean | null; - record_date?: string | null; - unix_timestamp?: number | null; - /** - * All persons associated with the Bund project (from nested Arb object) - */ - associated_persons?: Array; - /** - * All institutions associated with the Bund project - */ - institutions?: Array; - oa_topics?: Array | null; +export interface BundProjectDetails { + /** + * The ID of the Bund project + */ + id: string; + funding_reference?: string | null; + title?: string | null; + description?: string | null; + joint_project?: string | null; + funding_type?: string | null; + funding_profile?: string | null; + funding_amount?: number | null; + funding_start_date?: string | null; + funding_end_date?: string | null; + duration?: string | null; + performance_plan_code?: string | null; + performance_plan_fullname?: string | null; + executing_agency?: string | null; + funding_recipient?: string | null; + project_agency?: string | null; + project_agency_fullname?: string | null; + department?: string | null; + department_fullname?: string | null; + division?: string | null; + location?: string | null; + municipality?: string | null; + state?: string | null; + country?: string | null; + municipality_code?: string | null; + publication_date?: string | null; + is_new?: boolean | null; + record_date?: string | null; + unix_timestamp?: number | null; + /** + * All persons associated with the Bund project (from nested Arb object) + */ + associated_persons?: Array; + /** + * All institutions associated with the Bund project + */ + institutions?: Array; + oa_topics?: Array | null; } - diff --git a/webapp/src/app/api/model/bundProjectPage.ts b/webapp/src/app/api/model/bundProjectPage.ts index 4811bf9c..c2d381cb 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,23 +9,21 @@ */ import { BundProjectSummary } from './bundProjectSummary'; - -export interface BundProjectPage { - /** - * The current page number. - */ - page?: number; - /** - * The requested page size. - */ - size?: number; - /** - * The total number of items. - */ - total?: number; - /** - * The bund projects on this page. - */ - elements?: Array; +export interface BundProjectPage { + /** + * The current page number. + */ + page?: number; + /** + * The requested page size. + */ + size?: number; + /** + * The total number of items. + */ + total?: number; + /** + * The bund projects on this page. + */ + elements?: Array; } - diff --git a/webapp/src/app/api/model/bundProjectSummary.ts b/webapp/src/app/api/model/bundProjectSummary.ts index 3753cf45..7b0d011c 100644 --- a/webapp/src/app/api/model/bundProjectSummary.ts +++ b/webapp/src/app/api/model/bundProjectSummary.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,37 +10,35 @@ import { Topic } from './topic'; import { BundInstitutionSummary } from './bundInstitutionSummary'; - -export interface BundProjectSummary { - funding_code?: string | null; - department?: string | null; - department_fullname?: string | null; - referat?: string | null; - project_sponsor?: string | null; - project_sponsor_fullname?: string | null; - work_unit?: string | null; - recipient?: string | null; - municipal_code?: string | null; - municipality?: string | null; - place?: string | null; - state?: string | null; - country?: string | null; - 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; - oa_topics?: Array | null; - institution?: BundInstitutionSummary | null; +export interface BundProjectSummary { + funding_code?: string | null; + department?: string | null; + department_fullname?: string | null; + referat?: string | null; + project_sponsor?: string | null; + project_sponsor_fullname?: string | null; + work_unit?: string | null; + recipient?: string | null; + municipal_code?: string | null; + municipality?: string | null; + place?: string | null; + state?: string | null; + country?: string | null; + 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; + oa_topics?: Array | null; + institution?: BundInstitutionSummary | null; } - diff --git a/webapp/src/app/api/model/collaborationGraph.ts b/webapp/src/app/api/model/collaborationGraph.ts index 1d962ce4..b5f6ed59 100644 --- a/webapp/src/app/api/model/collaborationGraph.ts +++ b/webapp/src/app/api/model/collaborationGraph.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -12,27 +12,25 @@ import { Edge } from './edge'; import { InstitutionNode } from './institutionNode'; import { AuthorNode } from './authorNode'; - -export interface CollaborationGraph { - /** - * The ID of the root author. - */ - root_author_id: string; - /** - * A list of author nodes. - */ - authors?: Array; - /** - * A list of institution nodes. - */ - institutions?: Array; - /** - * A list of work nodes. - */ - works?: Array; - /** - * A list of edges in the collaboration graph. - */ - edges?: Array; +export interface CollaborationGraph { + /** + * The ID of the root author. + */ + root_author_id: string; + /** + * A list of author nodes. + */ + authors?: Array; + /** + * A list of institution nodes. + */ + institutions?: Array; + /** + * A list of work nodes. + */ + works?: Array; + /** + * A list of edges in the collaboration graph. + */ + edges?: Array; } - diff --git a/webapp/src/app/api/model/collaborationGraphStatus.ts b/webapp/src/app/api/model/collaborationGraphStatus.ts index 911e49ef..c7fa00f9 100644 --- a/webapp/src/app/api/model/collaborationGraphStatus.ts +++ b/webapp/src/app/api/model/collaborationGraphStatus.ts @@ -1,18 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const CollaborationGraphStatus = { - Pending: 'pending', - Completed: 'completed', - Failed: 'failed' + Pending: 'pending', + Completed: 'completed', + Failed: 'failed', } as const; -export type CollaborationGraphStatus = typeof CollaborationGraphStatus[keyof typeof CollaborationGraphStatus]; - +export type CollaborationGraphStatus = + (typeof CollaborationGraphStatus)[keyof typeof CollaborationGraphStatus]; diff --git a/webapp/src/app/api/model/collaborationGraphStatusResponse.ts b/webapp/src/app/api/model/collaborationGraphStatusResponse.ts index 388715f5..369b23ca 100644 --- a/webapp/src/app/api/model/collaborationGraphStatusResponse.ts +++ b/webapp/src/app/api/model/collaborationGraphStatusResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,16 +10,12 @@ import { CollaborationGraph } from './collaborationGraph'; import { CollaborationGraphStatus } from './collaborationGraphStatus'; - -export interface CollaborationGraphStatusResponse { - /** - * The status of the collaboration graph. - */ - status: CollaborationGraphStatus; - result?: CollaborationGraph | null; - error_message?: string | null; +export interface CollaborationGraphStatusResponse { + /** + * The status of the collaboration graph. + */ + status: CollaborationGraphStatus; + result?: CollaborationGraph | null; + error_message?: string | null; } -export namespace CollaborationGraphStatusResponse { -} - - +export namespace CollaborationGraphStatusResponse {} diff --git a/webapp/src/app/api/model/companyConnectionsAvailability.ts b/webapp/src/app/api/model/companyConnectionsAvailability.ts index a2c92ed7..cefa8680 100644 --- a/webapp/src/app/api/model/companyConnectionsAvailability.ts +++ b/webapp/src/app/api/model/companyConnectionsAvailability.ts @@ -1,15 +1,13 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface CompanyConnectionsAvailability { - available: boolean; +export interface CompanyConnectionsAvailability { + available: boolean; } - diff --git a/webapp/src/app/api/model/companyConnectionsResponse.ts b/webapp/src/app/api/model/companyConnectionsResponse.ts index b110d640..9b86a710 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,14 +9,12 @@ */ import { CompanyConnection } from './companyConnection'; - -export interface CompanyConnectionsResponse { - author_id: string; - display_name?: string | null; - matching_method?: string | null; - company_count: number; - has_more_results: boolean; - common_name_warning: boolean; - connections?: Array; +export interface CompanyConnectionsResponse { + author_id: string; + display_name?: string | null; + matching_method?: string | null; + company_count: number; + has_more_results: boolean; + common_name_warning: boolean; + connections?: Array; } - diff --git a/webapp/src/app/api/model/createAccountRequest.ts b/webapp/src/app/api/model/createAccountRequest.ts index b2393cc2..c38fce15 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,13 +9,11 @@ */ 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/createPersonBookmark.ts b/webapp/src/app/api/model/createPersonBookmark.ts index e2e196dd..d9d69bea 100644 --- a/webapp/src/app/api/model/createPersonBookmark.ts +++ b/webapp/src/app/api/model/createPersonBookmark.ts @@ -1,15 +1,13 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface CreatePersonBookmark { - person_name?: string | null; +export interface CreatePersonBookmark { + person_name?: string | null; } - diff --git a/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts b/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts index 716a0f11..9764ebe9 100644 --- a/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts +++ b/webapp/src/app/api/model/dFGProjectFachgebieteInner.ts @@ -1,25 +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. */ - /** * DFGProjectFachgebieteInner */ -export interface DFGProjectFachgebieteInner { - fach?: string | null; - fach_code?: string | null; - fachgebiet?: string | null; - fachgebiet_code?: string | null; - fachkollegium?: string | null; - fachkollegium_code?: string | null; - wissenschaftsbereich?: string | null; - wissenschaftsbereich_code?: string | null; +export interface DFGProjectFachgebieteInner { + fach?: string | null; + fach_code?: string | null; + fachgebiet?: string | null; + fachgebiet_code?: string | null; + fachkollegium?: string | null; + fachkollegium_code?: string | null; + wissenschaftsbereich?: string | null; + wissenschaftsbereich_code?: string | null; } - diff --git a/webapp/src/app/api/model/dashboardStatisticValue.ts b/webapp/src/app/api/model/dashboardStatisticValue.ts index 928bdd76..7666aee8 100644 --- a/webapp/src/app/api/model/dashboardStatisticValue.ts +++ b/webapp/src/app/api/model/dashboardStatisticValue.ts @@ -1,17 +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 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 ba33382d..28d2527c 100644 --- a/webapp/src/app/api/model/dashboardStatistics.ts +++ b/webapp/src/app/api/model/dashboardStatistics.ts @@ -1,22 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface DashboardStatistics { - institution_id: string; - organization_name: string; - publications: number; - persons: number; - projects: number; - dfg_projects: number; - eu_projects: number; - bmbf_projects: number; +export interface DashboardStatistics { + institution_id: string; + organization_name: string; + publications: number; + persons: number; + projects: number; + dfg_projects: number; + eu_projects: number; + bmbf_projects: number; } - diff --git a/webapp/src/app/api/model/dfgInstitutionSummary.ts b/webapp/src/app/api/model/dfgInstitutionSummary.ts index e3da7abf..f2134a2f 100644 --- a/webapp/src/app/api/model/dfgInstitutionSummary.ts +++ b/webapp/src/app/api/model/dfgInstitutionSummary.ts @@ -1,25 +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. */ - /** * A summary of a DFG institution. */ -export interface DfgInstitutionSummary { - id: number; - institute_name_de?: string | null; - institute_name_en?: string | null; - root_id?: number | null; - root_name_de?: string | null; - root_name_en?: string | null; - address_country_de?: string | null; - address_country_en?: string | null; +export interface DfgInstitutionSummary { + id: number; + institute_name_de?: string | null; + institute_name_en?: string | null; + root_id?: number | null; + root_name_de?: string | null; + root_name_en?: string | null; + address_country_de?: string | null; + address_country_en?: string | null; } - diff --git a/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts b/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts index 0bb6e492..f31398c8 100644 --- a/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts +++ b/webapp/src/app/api/model/dfgInstitutionSummaryPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,26 +9,24 @@ */ import { DfgInstitutionSummary } from './dfgInstitutionSummary'; - /** * A paginated response containing a list of institutions. */ -export interface DfgInstitutionSummaryPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface DfgInstitutionSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/dfgPersonSummary.ts b/webapp/src/app/api/model/dfgPersonSummary.ts index ebd441ee..5c525ca5 100644 --- a/webapp/src/app/api/model/dfgPersonSummary.ts +++ b/webapp/src/app/api/model/dfgPersonSummary.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,14 +9,12 @@ */ import { DfgInstitutionSummary } from './dfgInstitutionSummary'; - -export interface DfgPersonSummary { - person_id: number; - orcid_id?: string | null; - project_ref_id?: number | null; - full_name?: string | null; - role_label_en?: string | null; - role_label_de?: string | null; - institution?: DfgInstitutionSummary | null; +export interface DfgPersonSummary { + person_id: number; + orcid_id?: string | null; + project_ref_id?: number | null; + full_name?: string | null; + role_label_en?: string | null; + role_label_de?: string | null; + institution?: DfgInstitutionSummary | null; } - diff --git a/webapp/src/app/api/model/dfgPersonSummaryPage.ts b/webapp/src/app/api/model/dfgPersonSummaryPage.ts index c4b7d916..fe367b63 100644 --- a/webapp/src/app/api/model/dfgPersonSummaryPage.ts +++ b/webapp/src/app/api/model/dfgPersonSummaryPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,26 +9,24 @@ */ import { DfgPersonSummary } from './dfgPersonSummary'; - /** * A paginated response containing a list of persons. */ -export interface DfgPersonSummaryPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface DfgPersonSummaryPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/dfgProjectDetails.ts b/webapp/src/app/api/model/dfgProjectDetails.ts index 07bcced0..f3846507 100644 --- a/webapp/src/app/api/model/dfgProjectDetails.ts +++ b/webapp/src/app/api/model/dfgProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,71 +14,69 @@ import { DFGProjectFachgebieteInner } from './dFGProjectFachgebieteInner'; import { Topic } from './topic'; import { DfgProjectPublicationSummary } from './dfgProjectPublicationSummary'; - /** * Clean, enriched summary model for a DFG project. */ -export interface DfgProjectDetails { - id?: number | null; - link?: string | null; - page_url?: string | null; - external_link?: string | null; - title_de?: string | null; - title_en?: string | null; - description_de?: string | null; - description_en?: string | null; - final_report_abstract_de?: string | null; - final_report_abstract_en?: string | null; - project_identifier_de?: string | null; - project_identifier_en?: string | null; - funding_start?: number | null; - funding_end?: number | null; - funding_period_de?: string | null; - funding_period_en?: string | null; - funding_type_de?: string | null; - funding_type_en?: string | null; - funding_type_key?: string | null; - dfg_procedure?: string | null; - is_transfer_project?: boolean | null; - website_html_de?: string | null; - website_html_en?: string | null; - equipment_group?: string | null; - equipment_name?: string | null; - subject_area_de?: string | null; - subject_area_en?: string | null; - /** - * Detailed DFG subject-area classification entries (Fachsystematik) - */ - subject_classifications?: Array; - international_relation_de?: string | null; - international_relation_en?: string | null; - /** - * All persons associated with the project, each with their role - */ - persons?: Array; - /** - * All institutions associated with the project, each with their role - */ - institutions?: Array; - /** - * Flat, de-duplicated list of all person full names (convenience view) - */ - associated_persons?: Array; - /** - * Flat, de-duplicated list of all institution names (convenience view) - */ - associated_institutions?: Array; - parent_project_id?: number | null; - parent_title_de?: string | null; - parent_title_en?: string | null; - /** - * Sub-projects of this project, if any - */ - subprojects?: Array; - /** - * Publications resulting from the project - */ - publications?: Array; - topics?: Array | null; +export interface DfgProjectDetails { + id?: number | null; + link?: string | null; + page_url?: string | null; + external_link?: string | null; + title_de?: string | null; + title_en?: string | null; + description_de?: string | null; + description_en?: string | null; + final_report_abstract_de?: string | null; + final_report_abstract_en?: string | null; + project_identifier_de?: string | null; + project_identifier_en?: string | null; + funding_start?: number | null; + funding_end?: number | null; + funding_period_de?: string | null; + funding_period_en?: string | null; + funding_type_de?: string | null; + funding_type_en?: string | null; + funding_type_key?: string | null; + dfg_procedure?: string | null; + is_transfer_project?: boolean | null; + website_html_de?: string | null; + website_html_en?: string | null; + equipment_group?: string | null; + equipment_name?: string | null; + subject_area_de?: string | null; + subject_area_en?: string | null; + /** + * Detailed DFG subject-area classification entries (Fachsystematik) + */ + subject_classifications?: Array; + international_relation_de?: string | null; + international_relation_en?: string | null; + /** + * All persons associated with the project, each with their role + */ + persons?: Array; + /** + * All institutions associated with the project, each with their role + */ + institutions?: Array; + /** + * Flat, de-duplicated list of all person full names (convenience view) + */ + associated_persons?: Array; + /** + * Flat, de-duplicated list of all institution names (convenience view) + */ + associated_institutions?: Array; + parent_project_id?: number | null; + parent_title_de?: string | null; + parent_title_en?: string | null; + /** + * Sub-projects of this project, if any + */ + subprojects?: Array; + /** + * Publications resulting from the project + */ + publications?: Array; + topics?: Array | null; } - diff --git a/webapp/src/app/api/model/dfgProjectInstitutionRole.ts b/webapp/src/app/api/model/dfgProjectInstitutionRole.ts index 2fab6bb9..99e74e69 100644 --- a/webapp/src/app/api/model/dfgProjectInstitutionRole.ts +++ b/webapp/src/app/api/model/dfgProjectInstitutionRole.ts @@ -1,25 +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. */ - /** * An institution associated with the project, together with its role. */ -export interface DfgProjectInstitutionRole { - institute_id?: number | null; - name_de?: string | null; - name_en?: string | null; - role_key?: string | null; - role_label_de?: string | null; - role_label_en?: string | null; - is_dissolved?: boolean | null; - is_head?: boolean | null; +export interface DfgProjectInstitutionRole { + institute_id?: number | null; + name_de?: string | null; + name_en?: string | null; + role_key?: string | null; + role_label_de?: string | null; + role_label_en?: string | null; + is_dissolved?: boolean | null; + is_head?: boolean | null; } - diff --git a/webapp/src/app/api/model/dfgProjectKeyword.ts b/webapp/src/app/api/model/dfgProjectKeyword.ts index 2e898f1c..f81b6ad4 100644 --- a/webapp/src/app/api/model/dfgProjectKeyword.ts +++ b/webapp/src/app/api/model/dfgProjectKeyword.ts @@ -1,16 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface DfgProjectKeyword { - name: string; - project_count: number; +export interface DfgProjectKeyword { + name: string; + project_count: number; } - diff --git a/webapp/src/app/api/model/dfgProjectPersonRole.ts b/webapp/src/app/api/model/dfgProjectPersonRole.ts index 3b2daecf..c067dde7 100644 --- a/webapp/src/app/api/model/dfgProjectPersonRole.ts +++ b/webapp/src/app/api/model/dfgProjectPersonRole.ts @@ -1,27 +1,25 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * A person associated with the project, together with their role. */ -export interface DfgProjectPersonRole { - person_id?: number | null; - full_name?: string | null; - orcid_id?: string | null; - role_key?: string | null; - role_label_de?: string | null; - role_label_en?: string | null; - affiliation_de?: string | null; - affiliation_en?: string | null; - is_deceased?: boolean | null; - is_head?: boolean | null; +export interface DfgProjectPersonRole { + person_id?: number | null; + full_name?: string | null; + orcid_id?: string | null; + role_key?: string | null; + role_label_de?: string | null; + role_label_en?: string | null; + affiliation_de?: string | null; + affiliation_en?: string | null; + is_deceased?: boolean | null; + is_head?: boolean | null; } - diff --git a/webapp/src/app/api/model/dfgProjectPublicationSummary.ts b/webapp/src/app/api/model/dfgProjectPublicationSummary.ts index f9a8692a..ee763ee4 100644 --- a/webapp/src/app/api/model/dfgProjectPublicationSummary.ts +++ b/webapp/src/app/api/model/dfgProjectPublicationSummary.ts @@ -1,22 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * A lightweight reference to a publication resulting from the project. */ -export interface DfgProjectPublicationSummary { - publication_id?: number | null; - title?: string | null; - authors_editors?: string | null; - doi?: string | null; - publication_year?: number | null; +export interface DfgProjectPublicationSummary { + publication_id?: number | null; + title?: string | null; + authors_editors?: string | null; + doi?: string | null; + publication_year?: number | null; } - diff --git a/webapp/src/app/api/model/dfgProjectStatusStatistics.ts b/webapp/src/app/api/model/dfgProjectStatusStatistics.ts index 3b7d566a..41309b52 100644 --- a/webapp/src/app/api/model/dfgProjectStatusStatistics.ts +++ b/webapp/src/app/api/model/dfgProjectStatusStatistics.ts @@ -1,19 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface DfgProjectStatusStatistics { - institution_id: string; - organization_name: string; - ongoing: number; - upcoming: number; - completed: number; +export interface DfgProjectStatusStatistics { + institution_id: string; + organization_name: string; + ongoing: number; + upcoming: number; + completed: number; } - diff --git a/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts b/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts index d7d75d43..6078aa39 100644 --- a/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts +++ b/webapp/src/app/api/model/dfgProjectSubprojectSummary.ts @@ -1,26 +1,24 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * A lightweight reference to a sub-project of this project. */ -export interface DfgProjectSubprojectSummary { - subproject_id?: number | null; - title_de?: string | null; - title_en?: string | null; - short_title?: string | null; - role_label_de?: string | null; - person_full_name?: string | null; - status_de?: string | null; - funding_start?: number | null; - funding_end?: number | null; +export interface DfgProjectSubprojectSummary { + subproject_id?: number | null; + title_de?: string | null; + title_en?: string | null; + short_title?: string | null; + role_label_de?: string | null; + person_full_name?: string | null; + status_de?: string | null; + funding_start?: number | null; + funding_end?: number | null; } - diff --git a/webapp/src/app/api/model/dfgProjectTopic.ts b/webapp/src/app/api/model/dfgProjectTopic.ts index bde1b7f2..ca22eb28 100644 --- a/webapp/src/app/api/model/dfgProjectTopic.ts +++ b/webapp/src/app/api/model/dfgProjectTopic.ts @@ -9,13 +9,12 @@ */ import { DfgProjectKeyword } from './dfgProjectKeyword'; - -export interface DfgProjectTopic { - id: string; - name: string; - subfield?: string | null; - field?: string | null; - domain?: string | null; - project_count: number; - keywords: Array; +export interface DfgProjectTopic { + id: string; + name: string; + subfield?: string | null; + field?: string | null; + domain?: string | null; + project_count: number; + keywords: Array; } diff --git a/webapp/src/app/api/model/dfgProjectTopics.ts b/webapp/src/app/api/model/dfgProjectTopics.ts index 78b68fa2..67a0523c 100644 --- a/webapp/src/app/api/model/dfgProjectTopics.ts +++ b/webapp/src/app/api/model/dfgProjectTopics.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,12 +9,10 @@ */ import { DfgProjectTopic } from './dfgProjectTopic'; - -export interface DfgProjectTopics { - institution_id: string; - organization_name: string; - project_count: number; - matched_project_count: number; - topics: Array; +export interface DfgProjectTopics { + institution_id: string; + organization_name: string; + project_count: number; + matched_project_count: number; + topics: Array; } - diff --git a/webapp/src/app/api/model/dockerHealth.ts b/webapp/src/app/api/model/dockerHealth.ts index 9f4c3d47..ba28ab8a 100644 --- a/webapp/src/app/api/model/dockerHealth.ts +++ b/webapp/src/app/api/model/dockerHealth.ts @@ -1,16 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface DockerHealth { - reachable: boolean; - detail: string; +export interface DockerHealth { + reachable: boolean; + detail: string; } - diff --git a/webapp/src/app/api/model/edge.ts b/webapp/src/app/api/model/edge.ts index 738e4b83..03376039 100644 --- a/webapp/src/app/api/model/edge.ts +++ b/webapp/src/app/api/model/edge.ts @@ -1,26 +1,24 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface Edge { - /** - * The ID of the source node. - */ - source: string; - /** - * The ID of the target node. - */ - target: string; - /** - * The weight of the edge. - */ - weight: number; +export interface Edge { + /** + * The ID of the source node. + */ + source: string; + /** + * The ID of the target node. + */ + target: string; + /** + * The weight of the edge. + */ + weight: number; } - diff --git a/webapp/src/app/api/model/euProjectData.ts b/webapp/src/app/api/model/euProjectData.ts index 5bdbef2a..6c6fc670 100644 --- a/webapp/src/app/api/model/euProjectData.ts +++ b/webapp/src/app/api/model/euProjectData.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -25,51 +25,49 @@ import { HEUReportSummary } from './hEUReportSummary'; import { Topic } from './topic'; import { HEUProjectDetails } from './hEUProjectDetails'; - /** * The project data */ -export interface EuProjectData { - acronym?: string; - contentUpdateDate?: string; - ecMaxContribution?: number; - ecSignatureDate?: string; - endDate?: string; - frameworkProgramme?: string; - fundingScheme?: string; - grantDoi?: string; - humanValidated?: boolean; - id?: string; - keywords?: string; - legalBasis?: string; - masterCall?: string; - nature?: string; - objective?: string; - rcn?: string; - startDate?: string; - status?: string; - subCall?: string; - title?: string; - topics?: string; - totalCost?: number; - organizations?: Array; - publications?: Array; - iprs?: Array; - report_summaries?: Array; - topicsList?: Array; - web_links?: Array; - eurosciVoc?: Array; - legalBasisList?: Array; - organizationCount?: number; - publicationCount?: number; - iprCount?: number; - oaTopics?: Array; - oaAuthors?: AuthorPage; - deliverables?: Array; - reportSummaries?: Array; - webLinks?: Array; - ercPrincipalInvestigators?: Array; - deliverableCount?: number; - ercPiCount?: number; +export interface EuProjectData { + acronym?: string; + contentUpdateDate?: string; + ecMaxContribution?: number; + ecSignatureDate?: string; + endDate?: string; + frameworkProgramme?: string; + fundingScheme?: string; + grantDoi?: string; + humanValidated?: boolean; + id?: string; + keywords?: string; + legalBasis?: string; + masterCall?: string; + nature?: string; + objective?: string; + rcn?: string; + startDate?: string; + status?: string; + subCall?: string; + title?: string; + topics?: string; + totalCost?: number; + organizations?: Array; + publications?: Array; + iprs?: Array; + report_summaries?: Array; + topicsList?: Array; + web_links?: Array; + eurosciVoc?: Array; + legalBasisList?: Array; + organizationCount?: number; + publicationCount?: number; + iprCount?: number; + oaTopics?: Array; + oaAuthors?: AuthorPage; + deliverables?: Array; + reportSummaries?: Array; + webLinks?: Array; + ercPrincipalInvestigators?: Array; + deliverableCount?: number; + ercPiCount?: number; } - diff --git a/webapp/src/app/api/model/euProjectStatusStatistics.ts b/webapp/src/app/api/model/euProjectStatusStatistics.ts index 040ffda4..0f1fd3b6 100644 --- a/webapp/src/app/api/model/euProjectStatusStatistics.ts +++ b/webapp/src/app/api/model/euProjectStatusStatistics.ts @@ -1,19 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface EuProjectStatusStatistics { - institution_id: string; - organization_name: string; - ongoing: number; - upcoming: number; - completed: number; +export interface EuProjectStatusStatistics { + institution_id: string; + organization_name: string; + ongoing: number; + upcoming: number; + completed: number; } - diff --git a/webapp/src/app/api/model/fileUpload.ts b/webapp/src/app/api/model/fileUpload.ts index 61722b2f..921db4c3 100644 --- a/webapp/src/app/api/model/fileUpload.ts +++ b/webapp/src/app/api/model/fileUpload.ts @@ -1,26 +1,24 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface 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/fp7ProjectDetails.ts b/webapp/src/app/api/model/fp7ProjectDetails.ts index 3383bb71..5046d248 100644 --- a/webapp/src/app/api/model/fp7ProjectDetails.ts +++ b/webapp/src/app/api/model/fp7ProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,45 +18,43 @@ import { Topic } from './topic'; import { Fp7Organization } from './fp7Organization'; import { Fp7LegalBasis } from './fp7LegalBasis'; - /** * Comprehensive FP7 Project model combining all related entities. This model extends the base Fp7Project with all associated data. */ -export interface Fp7ProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - iprs?: Array | null; - report_summaries?: Array | null; - topicsList?: Array | null; - web_links?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - iprCount?: number | null; - oaTopics?: Array | null; - oaAuthors?: AuthorPage | null; +export interface Fp7ProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + iprs?: Array | null; + report_summaries?: Array | null; + topicsList?: Array | null; + web_links?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + iprCount?: number | null; + oaTopics?: Array | null; + oaAuthors?: AuthorPage | null; } - diff --git a/webapp/src/app/api/model/fp7Publication.ts b/webapp/src/app/api/model/fp7Publication.ts index 26f10d92..e8a9a862 100644 --- a/webapp/src/app/api/model/fp7Publication.ts +++ b/webapp/src/app/api/model/fp7Publication.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,29 +9,27 @@ */ import { Author } from './author'; - /** * Fp7Publication */ -export interface Fp7Publication { - authors?: string | null; - oaAuthors?: Array | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface Fp7Publication { + authors?: string | null; + oaAuthors?: Array | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } - diff --git a/webapp/src/app/api/model/h2020ProjectDetails.ts b/webapp/src/app/api/model/h2020ProjectDetails.ts index 5aa9038d..32d4d4fe 100644 --- a/webapp/src/app/api/model/h2020ProjectDetails.ts +++ b/webapp/src/app/api/model/h2020ProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -19,47 +19,45 @@ import { H2020EurosciVoc } from './h2020EurosciVoc'; import { Topic } from './topic'; import { H2020Organization } from './h2020Organization'; - /** * Comprehensive Horizon 2020 Project model combining all related entities. This model extends the base H2020Project with all associated data. */ -export interface H2020ProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - deliverables?: Array | null; - reportSummaries?: Array | null; - topicsList?: Array | null; - webLinks?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - ercPrincipalInvestigators?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - deliverableCount?: number | null; - ercPiCount?: number | null; - oaTopics?: Array | null; - oaAuthors?: AuthorPage | null; +export interface H2020ProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + deliverables?: Array | null; + reportSummaries?: Array | null; + topicsList?: Array | null; + webLinks?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + ercPrincipalInvestigators?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + deliverableCount?: number | null; + ercPiCount?: number | null; + oaTopics?: Array | null; + oaAuthors?: AuthorPage | null; } - diff --git a/webapp/src/app/api/model/h2020Publication.ts b/webapp/src/app/api/model/h2020Publication.ts index f5555ca2..935a64fd 100644 --- a/webapp/src/app/api/model/h2020Publication.ts +++ b/webapp/src/app/api/model/h2020Publication.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,29 +9,27 @@ */ import { Author } from './author'; - /** * H2020Publication */ -export interface H2020Publication { - authors?: string | null; - oaAuthors?: Array | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface H2020Publication { + authors?: string | null; + oaAuthors?: Array | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } - diff --git a/webapp/src/app/api/model/hEUProjectDetails.ts b/webapp/src/app/api/model/hEUProjectDetails.ts index b9e15d29..13561f7c 100644 --- a/webapp/src/app/api/model/hEUProjectDetails.ts +++ b/webapp/src/app/api/model/hEUProjectDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,45 +18,43 @@ import { HEUDeliverable } from './hEUDeliverable'; import { Topic } from './topic'; import { HEUEurosciVoc } from './hEUEurosciVoc'; - /** * Comprehensive Horizon Europe Project model combining all related entities. This model extends the base HEUProject with all associated data. */ -export interface HEUProjectDetails { - acronym?: string | null; - contentUpdateDate?: string | null; - ecMaxContribution?: number | null; - ecSignatureDate?: string | null; - endDate?: string | null; - frameworkProgramme?: string | null; - fundingScheme?: string | null; - grantDoi?: string | null; - humanValidated?: boolean | null; - id?: string | null; - keywords?: string | null; - legalBasis?: string | null; - masterCall?: string | null; - nature?: string | null; - objective?: string | null; - rcn?: string | null; - startDate?: string | null; - status?: string | null; - subCall?: string | null; - title?: string | null; - topics?: string | null; - totalCost?: number | null; - organizations?: Array | null; - publications?: Array | null; - deliverables?: Array | null; - reportSummaries?: Array | null; - topicsList?: Array | null; - webLinks?: Array | null; - eurosciVoc?: Array | null; - legalBasisList?: Array | null; - organizationCount?: number | null; - publicationCount?: number | null; - deliverableCount?: number | null; - oaTopics?: Array | null; - oaAuthors?: AuthorPage | null; +export interface HEUProjectDetails { + acronym?: string | null; + contentUpdateDate?: string | null; + ecMaxContribution?: number | null; + ecSignatureDate?: string | null; + endDate?: string | null; + frameworkProgramme?: string | null; + fundingScheme?: string | null; + grantDoi?: string | null; + humanValidated?: boolean | null; + id?: string | null; + keywords?: string | null; + legalBasis?: string | null; + masterCall?: string | null; + nature?: string | null; + objective?: string | null; + rcn?: string | null; + startDate?: string | null; + status?: string | null; + subCall?: string | null; + title?: string | null; + topics?: string | null; + totalCost?: number | null; + organizations?: Array | null; + publications?: Array | null; + deliverables?: Array | null; + reportSummaries?: Array | null; + topicsList?: Array | null; + webLinks?: Array | null; + eurosciVoc?: Array | null; + legalBasisList?: Array | null; + organizationCount?: number | null; + publicationCount?: number | null; + deliverableCount?: number | null; + oaTopics?: Array | null; + oaAuthors?: AuthorPage | null; } - diff --git a/webapp/src/app/api/model/hEUPublication.ts b/webapp/src/app/api/model/hEUPublication.ts index d25db81f..e607a3ed 100644 --- a/webapp/src/app/api/model/hEUPublication.ts +++ b/webapp/src/app/api/model/hEUPublication.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,29 +9,27 @@ */ import { Author } from './author'; - /** * HEUPublication */ -export interface HEUPublication { - authors?: string | null; - oaAuthors?: Array | null; - collection?: string | null; - contentUpdateDate?: string | null; - doi?: string | null; - id?: string | null; - isPublishedAs?: string | null; - journalNumber?: string | null; - journalTitle?: string | null; - projectAcronym?: string | null; - projectID?: string | null; - publishedPages?: string | null; - publishedYear?: number | null; - publisher?: string | null; - qaProcessedDoi?: string | null; - rcn?: string | null; - repositoryUrl?: string | null; - title?: string | null; - volume?: string | null; +export interface HEUPublication { + authors?: string | null; + oaAuthors?: Array | null; + collection?: string | null; + contentUpdateDate?: string | null; + doi?: string | null; + id?: string | null; + isPublishedAs?: string | null; + journalNumber?: string | null; + journalTitle?: string | null; + projectAcronym?: string | null; + projectID?: string | null; + publishedPages?: string | null; + publishedYear?: number | null; + publisher?: string | null; + qaProcessedDoi?: string | null; + rcn?: string | null; + repositoryUrl?: string | null; + title?: string | null; + volume?: string | null; } - diff --git a/webapp/src/app/api/model/institutionNode.ts b/webapp/src/app/api/model/institutionNode.ts index cea6584a..3181ce5e 100644 --- a/webapp/src/app/api/model/institutionNode.ts +++ b/webapp/src/app/api/model/institutionNode.ts @@ -1,22 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface InstitutionNode { - /** - * The ID of the institution. - */ - id: string; - /** - * The display name of the institution. - */ - display_name: string; +export interface InstitutionNode { + /** + * The ID of the institution. + */ + id: string; + /** + * The display name of the institution. + */ + display_name: string; } - diff --git a/webapp/src/app/api/model/institutionPageV2.ts b/webapp/src/app/api/model/institutionPageV2.ts index 15f481f6..67017198 100644 --- a/webapp/src/app/api/model/institutionPageV2.ts +++ b/webapp/src/app/api/model/institutionPageV2.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,26 +9,24 @@ */ import { Institution } from './institution'; - /** * A paginated response containing a list of institutions. */ -export interface InstitutionPageV2 { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface InstitutionPageV2 { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/jobDefinitionCreateRequest.ts b/webapp/src/app/api/model/jobDefinitionCreateRequest.ts index edaac8ad..76561fc4 100644 --- a/webapp/src/app/api/model/jobDefinitionCreateRequest.ts +++ b/webapp/src/app/api/model/jobDefinitionCreateRequest.ts @@ -1,22 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface JobDefinitionCreateRequest { - name: string; - image?: string | null; - command?: string | null; - env?: { [key: string]: string; }; - description?: string; - target_index?: string; - schedule?: string | null; - enabled?: boolean; +export interface JobDefinitionCreateRequest { + name: string; + image?: string | null; + command?: string | null; + env?: { [key: string]: string }; + description?: string; + target_index?: string; + schedule?: string | null; + enabled?: boolean; } - diff --git a/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts b/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts index 1dae581b..993152ae 100644 --- a/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts +++ b/webapp/src/app/api/model/jobDefinitionUpdateRequest.ts @@ -1,22 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface JobDefinitionUpdateRequest { - name?: string | null; - image?: string | null; - command?: string | null; - env?: { [key: string]: string; } | null; - description?: string | null; - target_index?: string | null; - schedule?: string | null; - enabled?: boolean | null; +export interface JobDefinitionUpdateRequest { + name?: string | null; + image?: string | null; + command?: string | null; + env?: { [key: string]: string } | null; + description?: string | null; + target_index?: string | null; + schedule?: string | null; + enabled?: boolean | null; } - diff --git a/webapp/src/app/api/model/jobRun.ts b/webapp/src/app/api/model/jobRun.ts index 52dbf050..20346ae6 100644 --- a/webapp/src/app/api/model/jobRun.ts +++ b/webapp/src/app/api/model/jobRun.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,22 +10,18 @@ import { JobRunStatus } from './jobRunStatus'; import { JobTriggeredBy } from './jobTriggeredBy'; - -export interface JobRun { - id?: number | null; - definition_id: number; - container_id?: string | null; - status?: JobRunStatus; - /** - * Whether the scheduler or a superadmin started this run. - */ - triggered_by: JobTriggeredBy; - started_at?: string; - finished_at?: string | null; - exit_code?: number | null; - logs?: string | null; +export interface JobRun { + id?: number | null; + definition_id: number; + container_id?: string | null; + status?: JobRunStatus; + /** + * Whether the scheduler or a superadmin started this run. + */ + triggered_by: JobTriggeredBy; + started_at?: string; + finished_at?: string | null; + exit_code?: number | null; + logs?: string | null; } -export namespace JobRun { -} - - +export namespace JobRun {} diff --git a/webapp/src/app/api/model/jobRunLogs.ts b/webapp/src/app/api/model/jobRunLogs.ts index 66c38da9..423a6f1a 100644 --- a/webapp/src/app/api/model/jobRunLogs.ts +++ b/webapp/src/app/api/model/jobRunLogs.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,13 +9,9 @@ */ import { JobRunStatus } from './jobRunStatus'; - -export interface JobRunLogs { - run_id: number; - status: JobRunStatus; - logs: string; +export interface JobRunLogs { + run_id: number; + status: JobRunStatus; + logs: string; } -export namespace JobRunLogs { -} - - +export namespace JobRunLogs {} diff --git a/webapp/src/app/api/model/jobRunStatus.ts b/webapp/src/app/api/model/jobRunStatus.ts index 0a90d037..d50886b4 100644 --- a/webapp/src/app/api/model/jobRunStatus.ts +++ b/webapp/src/app/api/model/jobRunStatus.ts @@ -1,19 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const JobRunStatus = { - Running: 'running', - Succeeded: 'succeeded', - Failed: 'failed', - Stopped: 'stopped' + Running: 'running', + Succeeded: 'succeeded', + Failed: 'failed', + Stopped: 'stopped', } as const; -export type JobRunStatus = typeof JobRunStatus[keyof typeof JobRunStatus]; - +export type JobRunStatus = (typeof JobRunStatus)[keyof typeof JobRunStatus]; diff --git a/webapp/src/app/api/model/jobTriggeredBy.ts b/webapp/src/app/api/model/jobTriggeredBy.ts index 9ab25024..4ace1836 100644 --- a/webapp/src/app/api/model/jobTriggeredBy.ts +++ b/webapp/src/app/api/model/jobTriggeredBy.ts @@ -1,17 +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 const JobTriggeredBy = { - Schedule: 'schedule', - Manual: 'manual' + Schedule: 'schedule', + Manual: 'manual', } as const; -export type JobTriggeredBy = typeof JobTriggeredBy[keyof typeof JobTriggeredBy]; - +export type JobTriggeredBy = + (typeof JobTriggeredBy)[keyof typeof JobTriggeredBy]; diff --git a/webapp/src/app/api/model/keywordEvidence.ts b/webapp/src/app/api/model/keywordEvidence.ts index a8a78209..9b131bc1 100644 --- a/webapp/src/app/api/model/keywordEvidence.ts +++ b/webapp/src/app/api/model/keywordEvidence.ts @@ -1,28 +1,26 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * Traceable title/abstract evidence for keyword text retrieval. */ -export interface KeywordEvidence { - phrase_in_title?: boolean; - phrase_in_abstract?: boolean; - full_token_match?: boolean; - partial_token_match?: boolean; - word_match_score?: number; - matched_phrases?: Array; - matched_words?: Array; - /** - * phrase_title | phrase_abstract | full_token | partial_token | none - */ - text_match_kind?: string; +export interface KeywordEvidence { + phrase_in_title?: boolean; + phrase_in_abstract?: boolean; + full_token_match?: boolean; + partial_token_match?: boolean; + word_match_score?: number; + matched_phrases?: Array; + matched_words?: Array; + /** + * phrase_title | phrase_abstract | full_token | partial_token | none + */ + text_match_kind?: string; } - diff --git a/webapp/src/app/api/model/keywordPatentLevel.ts b/webapp/src/app/api/model/keywordPatentLevel.ts index 3522ae9e..97689af9 100644 --- a/webapp/src/app/api/model/keywordPatentLevel.ts +++ b/webapp/src/app/api/model/keywordPatentLevel.ts @@ -1,19 +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 KeywordPatentLevel = { - Broad: 'broad', - Coarse: 'coarse', - Fine: 'fine', - Custom: 'custom' + Broad: 'broad', + Coarse: 'coarse', + Fine: 'fine', + Custom: 'custom', } as const; -export type KeywordPatentLevel = typeof KeywordPatentLevel[keyof typeof KeywordPatentLevel]; - +export type KeywordPatentLevel = + (typeof KeywordPatentLevel)[keyof typeof KeywordPatentLevel]; diff --git a/webapp/src/app/api/model/keywordPatentMappingStatus.ts b/webapp/src/app/api/model/keywordPatentMappingStatus.ts index a820fed5..23b2c4d1 100644 --- a/webapp/src/app/api/model/keywordPatentMappingStatus.ts +++ b/webapp/src/app/api/model/keywordPatentMappingStatus.ts @@ -1,20 +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 KeywordPatentMappingStatus = { - Mapped: 'mapped', - Uncertain: 'uncertain', - NoMapping: 'no_mapping', - NoPatentsFound: 'no_patents_found', - SearchError: 'search_error' + Mapped: 'mapped', + Uncertain: 'uncertain', + NoMapping: 'no_mapping', + NoPatentsFound: 'no_patents_found', + SearchError: 'search_error', } as const; -export type KeywordPatentMappingStatus = typeof KeywordPatentMappingStatus[keyof typeof KeywordPatentMappingStatus]; - +export type KeywordPatentMappingStatus = + (typeof KeywordPatentMappingStatus)[keyof typeof KeywordPatentMappingStatus]; diff --git a/webapp/src/app/api/model/keywordPatentMatch.ts b/webapp/src/app/api/model/keywordPatentMatch.ts index 5b7c4068..3e412bdf 100644 --- a/webapp/src/app/api/model/keywordPatentMatch.ts +++ b/webapp/src/app/api/model/keywordPatentMatch.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,32 +10,30 @@ import { KeywordEvidence } from './keywordEvidence'; import { PatentEntry } from './patentEntry'; - -export interface KeywordPatentMatch { - patent: PatentEntry; - /** - * Combined match quality score. - */ - match_score: number; - /** - * IPC/CPC classification match score. - */ - ipc_score: number; - /** - * Graded OpenAlex topic overlap: 1.0 topic_id, 0.7 subfield, 0.3 compatible field, 0.0 none. - */ - topic_score: number; - /** - * Title/abstract keyword overlap score. - */ - text_score: number; - matched_keywords?: Array; - matched_ipc_symbols?: Array; - /** - * True when the patent was retrieved via title/abstract keyword search because IPC mapping was uncertain, missing, or yielded no hits. - */ - text_retrieval?: boolean; - keyword_evidence?: KeywordEvidence | null; - topic_match_kind?: string | null; +export interface KeywordPatentMatch { + patent: PatentEntry; + /** + * Combined match quality score. + */ + match_score: number; + /** + * IPC/CPC classification match score. + */ + ipc_score: number; + /** + * Graded OpenAlex topic overlap: 1.0 topic_id, 0.7 subfield, 0.3 compatible field, 0.0 none. + */ + topic_score: number; + /** + * Title/abstract keyword overlap score. + */ + text_score: number; + matched_keywords?: Array; + matched_ipc_symbols?: Array; + /** + * True when the patent was retrieved via title/abstract keyword search because IPC mapping was uncertain, missing, or yielded no hits. + */ + text_retrieval?: boolean; + keyword_evidence?: KeywordEvidence | null; + topic_match_kind?: string | null; } - diff --git a/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts b/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts index 753ef4dd..1c9b28b1 100644 --- a/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts +++ b/webapp/src/app/api/model/keywordPatentSearchDiagnostics.ts @@ -1,32 +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. */ - /** * Pipeline counters for evaluation (no effect on ranking thresholds). */ -export interface KeywordPatentSearchDiagnostics { - /** - * ipc | text | none - */ - search_path: string; - es_query_size_per_index?: number; - raw_patents_after_dedupe?: number; - filtered_by_ipc?: number; - filtered_by_relevance_gate?: number; - filtered_by_min_score?: number; - passed_relevance_gate?: number; - scored_before_cap?: number; - returned?: number; - max_patents_cap?: number; - hit_return_cap?: boolean; - ipc_cluster_selections?: Array; +export interface KeywordPatentSearchDiagnostics { + /** + * ipc | text | none + */ + search_path: string; + es_query_size_per_index?: number; + raw_patents_after_dedupe?: number; + filtered_by_ipc?: number; + filtered_by_relevance_gate?: number; + filtered_by_min_score?: number; + passed_relevance_gate?: number; + scored_before_cap?: number; + returned?: number; + max_patents_cap?: number; + hit_return_cap?: boolean; + ipc_cluster_selections?: Array; } - diff --git a/webapp/src/app/api/model/keywordPatentSearchItem.ts b/webapp/src/app/api/model/keywordPatentSearchItem.ts index c7521f63..cbcd04d4 100644 --- a/webapp/src/app/api/model/keywordPatentSearchItem.ts +++ b/webapp/src/app/api/model/keywordPatentSearchItem.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,23 +9,19 @@ */ import { KeywordPatentLevel } from './keywordPatentLevel'; - -export interface KeywordPatentSearchItem { - /** - * Extracted keyword text. - */ - keyword: string; - keyword_level?: KeywordPatentLevel | null; - topic_id?: string | null; - topic_display_name?: string | null; - subfield_name?: string | null; - field_name?: string | null; - /** - * LLM relevance score for the keyword. - */ - relevance_score?: number; +export interface KeywordPatentSearchItem { + /** + * Extracted keyword text. + */ + keyword: string; + keyword_level?: KeywordPatentLevel | null; + topic_id?: string | null; + topic_display_name?: string | null; + subfield_name?: string | null; + field_name?: string | null; + /** + * LLM relevance score for the keyword. + */ + relevance_score?: number; } -export namespace KeywordPatentSearchItem { -} - - +export namespace KeywordPatentSearchItem {} diff --git a/webapp/src/app/api/model/keywordToAuthorRequest.ts b/webapp/src/app/api/model/keywordToAuthorRequest.ts index 2d7e5e0d..9821531e 100644 --- a/webapp/src/app/api/model/keywordToAuthorRequest.ts +++ b/webapp/src/app/api/model/keywordToAuthorRequest.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -15,39 +15,35 @@ import { PublicationType } from './publicationType'; import { CompanyStatusFilter } from './companyStatusFilter'; import { RankingWeights } from './rankingWeights'; - -export interface KeywordToAuthorRequest { - /** - * One or more keywords to rank the author by. - */ - keywords: Array; - /** - * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. - */ - operator?: KeywordOperator; - /** - * What the \'keywords\' values match against: \'keyword\' (OpenAlex keyword display names) or \'topic\' (OpenAlex topic display names). Defaults to \'keyword\'. - */ - filter_type?: FilterType; - /** - * Weights for the ranking metrics. Required. - */ - weights: RankingWeights; - /** - * Optional filter: only keep authors in one of these career stages. Empty = no filter. - */ - career_stages?: Array; - /** - * Optional filter: only count works of these publication types. Empty = no filter. - */ - publication_types?: Array; - timespan?: Timespan | null; - /** - * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. - */ - company_status?: CompanyStatusFilter; +export interface KeywordToAuthorRequest { + /** + * One or more keywords to rank the author by. + */ + keywords: Array; + /** + * How to combine the keywords: \'and\' or \'or\'. Defaults to \'and\'. + */ + operator?: KeywordOperator; + /** + * What the \'keywords\' values match against: \'keyword\' (OpenAlex keyword display names) or \'topic\' (OpenAlex topic display names). Defaults to \'keyword\'. + */ + filter_type?: FilterType; + /** + * Weights for the ranking metrics. Required. + */ + weights: RankingWeights; + /** + * Optional filter: only keep authors in one of these career stages. Empty = no filter. + */ + career_stages?: Array; + /** + * Optional filter: only count works of these publication types. Empty = no filter. + */ + publication_types?: Array; + timespan?: Timespan | null; + /** + * Which companies to count for the company-foundations metric: \'all\', only \'active\' (non-deleted), or only \'deleted\'. + */ + company_status?: CompanyStatusFilter; } -export namespace KeywordToAuthorRequest { -} - - +export namespace KeywordToAuthorRequest {} diff --git a/webapp/src/app/api/model/keywordsRequest.ts b/webapp/src/app/api/model/keywordsRequest.ts index 8acb7082..094ed97b 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,20 +9,18 @@ */ 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/patentsByKeywordsResponse.ts b/webapp/src/app/api/model/patentsByKeywordsResponse.ts index d9f28a8e..f801c6d5 100644 --- a/webapp/src/app/api/model/patentsByKeywordsResponse.ts +++ b/webapp/src/app/api/model/patentsByKeywordsResponse.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,17 +11,13 @@ import { KeywordPatentMappingStatus } from './keywordPatentMappingStatus'; import { KeywordPatentSearchDiagnostics } from './keywordPatentSearchDiagnostics'; import { KeywordPatentMatch } from './keywordPatentMatch'; - -export interface PatentsByKeywordsResponse { - patent_count: number; - patents: Array; - /** - * IPC mapping outcome: mapped (IPC used), uncertain (fragmented evidence; may include text-retrieved patents), no_mapping (no usable IPC evidence; may include text-retrieved patents), no_patents_found (neither IPC nor keyword text search produced relevant patents), or search_error (technical failure talking to the search backend). - */ - mapping_status: KeywordPatentMappingStatus; - diagnostics?: KeywordPatentSearchDiagnostics | null; +export interface PatentsByKeywordsResponse { + patent_count: number; + patents: Array; + /** + * IPC mapping outcome: mapped (IPC used), uncertain (fragmented evidence; may include text-retrieved patents), no_mapping (no usable IPC evidence; may include text-retrieved patents), no_patents_found (neither IPC nor keyword text search produced relevant patents), or search_error (technical failure talking to the search backend). + */ + mapping_status: KeywordPatentMappingStatus; + diagnostics?: KeywordPatentSearchDiagnostics | null; } -export namespace PatentsByKeywordsResponse { -} - - +export namespace PatentsByKeywordsResponse {} diff --git a/webapp/src/app/api/model/personBookmarkResponse.ts b/webapp/src/app/api/model/personBookmarkResponse.ts index 5227060a..b40bdc71 100644 --- a/webapp/src/app/api/model/personBookmarkResponse.ts +++ b/webapp/src/app/api/model/personBookmarkResponse.ts @@ -1,17 +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 PersonBookmarkResponse { - person_id: string; - person_name: string | null; - created_at: string; +export interface PersonBookmarkResponse { + person_id: string; + person_name: string | null; + created_at: string; } - diff --git a/webapp/src/app/api/model/primaryCategoryYearAggregation.ts b/webapp/src/app/api/model/primaryCategoryYearAggregation.ts index bc146f8d..02abd7b7 100644 --- a/webapp/src/app/api/model/primaryCategoryYearAggregation.ts +++ b/webapp/src/app/api/model/primaryCategoryYearAggregation.ts @@ -1,22 +1,20 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface PrimaryCategoryYearAggregation { - /** - * The publication year. - */ - publication_year: number; - /** - * A mapping of primary categories to their counts for the given year. - */ - categories?: { [key: string]: number; }; +export interface PrimaryCategoryYearAggregation { + /** + * The publication year. + */ + publication_year: number; + /** + * A mapping of primary categories to their counts for the given year. + */ + categories?: { [key: string]: number }; } - diff --git a/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts b/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts index e191b225..c448c0f2 100644 --- a/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts +++ b/webapp/src/app/api/model/primaryCategoryYearAggregationPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,23 +9,21 @@ */ import { PrimaryCategoryYearAggregation } from './primaryCategoryYearAggregation'; - -export interface PrimaryCategoryYearAggregationPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface PrimaryCategoryYearAggregationPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/rankedAuthor.ts b/webapp/src/app/api/model/rankedAuthor.ts index 6f82a6d3..cee57a50 100644 --- a/webapp/src/app/api/model/rankedAuthor.ts +++ b/webapp/src/app/api/model/rankedAuthor.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,46 +9,42 @@ */ import { CareerStage } from './careerStage'; - -export interface RankedAuthor { - /** - * The OpenAlex ID of the author. - */ - author_id: string; - /** - * The name of the author. - */ - display_name: string; - /** - * Number of matching works by this author. - */ - works_count: number; - /** - * Total citations across this author\'s matching works. - */ - citations_count: number; - /** - * Number of Handelsregister company connections matched by the author\'s name (proxy for company foundations). - */ - companies_count?: number; - /** - * Number of news articles that mention the author by exact name (proxy for media visibility). - */ - news_count?: number; - /** - * Number of patents matched to the author (from the precomputed org_patents index). - */ - patents_count?: number; - /** - * Normalized weighted score used for ranking. - */ - score?: number; - /** - * Career stage derived from the author\'s active publication years. - */ - career_stage?: CareerStage; +export interface RankedAuthor { + /** + * The OpenAlex ID of the author. + */ + author_id: string; + /** + * The name of the author. + */ + display_name: string; + /** + * Number of matching works by this author. + */ + works_count: number; + /** + * Total citations across this author\'s matching works. + */ + citations_count: number; + /** + * Number of Handelsregister company connections matched by the author\'s name (proxy for company foundations). + */ + companies_count?: number; + /** + * Number of news articles that mention the author by exact name (proxy for media visibility). + */ + news_count?: number; + /** + * Number of patents matched to the author (from the precomputed org_patents index). + */ + patents_count?: number; + /** + * Normalized weighted score used for ranking. + */ + score?: number; + /** + * Career stage derived from the author\'s active publication years. + */ + career_stage?: CareerStage; } -export namespace RankedAuthor { -} - - +export namespace RankedAuthor {} diff --git a/webapp/src/app/api/model/rankingWeights.ts b/webapp/src/app/api/model/rankingWeights.ts index 4ef2c4a1..5f1d2df4 100644 --- a/webapp/src/app/api/model/rankingWeights.ts +++ b/webapp/src/app/api/model/rankingWeights.ts @@ -1,34 +1,32 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface RankingWeights { - /** - * Weight for the citation metric (0.0 - 1.0). - */ - citation: number; - /** - * Weight for the works metric (0.0 - 1.0). - */ - works: number; - /** - * Weight for the company-foundations metric (0.0 - 1.0). - */ - companies?: number; - /** - * Weight for the news/media-visibility metric (0.0 - 1.0). - */ - news?: number; - /** - * Weight for the patents metric (0.0 - 1.0). - */ - patents?: number; +export interface RankingWeights { + /** + * Weight for the citation metric (0.0 - 1.0). + */ + citation: number; + /** + * Weight for the works metric (0.0 - 1.0). + */ + works: number; + /** + * Weight for the company-foundations metric (0.0 - 1.0). + */ + companies?: number; + /** + * Weight for the news/media-visibility metric (0.0 - 1.0). + */ + news?: number; + /** + * Weight for the patents metric (0.0 - 1.0). + */ + patents?: number; } - diff --git a/webapp/src/app/api/model/registryHealth.ts b/webapp/src/app/api/model/registryHealth.ts index e7bd7aed..dc9411bd 100644 --- a/webapp/src/app/api/model/registryHealth.ts +++ b/webapp/src/app/api/model/registryHealth.ts @@ -1,17 +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 RegistryHealth { - reachable: boolean; - detail: string; - host: string; +export interface RegistryHealth { + reachable: boolean; + detail: string; + host: string; } - diff --git a/webapp/src/app/api/model/startCollaborationGraphResponse.ts b/webapp/src/app/api/model/startCollaborationGraphResponse.ts index c844ea93..f53629fe 100644 --- a/webapp/src/app/api/model/startCollaborationGraphResponse.ts +++ b/webapp/src/app/api/model/startCollaborationGraphResponse.ts @@ -1,18 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface StartCollaborationGraphResponse { - /** - * The ID of the collaboration graph. - */ - graph_id: string; +export interface StartCollaborationGraphResponse { + /** + * The ID of the collaboration graph. + */ + graph_id: string; } - diff --git a/webapp/src/app/api/model/topAuthor.ts b/webapp/src/app/api/model/topAuthor.ts index 6a74fa91..bc431723 100644 --- a/webapp/src/app/api/model/topAuthor.ts +++ b/webapp/src/app/api/model/topAuthor.ts @@ -1,17 +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 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 05af3ed5..69949f0c 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,13 +9,11 @@ */ import { TopAuthor } from './topAuthor'; - -export interface TopAuthorStatistics { - institution_id: string; - works: Array; - projects: Array; - eu_projects: Array; - patents: Array; - news: Array; +export interface TopAuthorStatistics { + institution_id: string; + works: Array; + projects: Array; + eu_projects: Array; + patents: Array; + news: Array; } - diff --git a/webapp/src/app/api/model/topTopicItem.ts b/webapp/src/app/api/model/topTopicItem.ts index 2ae026c1..e6a151d4 100644 --- a/webapp/src/app/api/model/topTopicItem.ts +++ b/webapp/src/app/api/model/topTopicItem.ts @@ -1,16 +1,14 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface 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 7f109033..4bac3de8 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,8 +9,6 @@ */ import { TopTopicItem } from './topTopicItem'; - -export interface TopTopicsResponse { - items: Array; +export interface TopTopicsResponse { + items: Array; } - diff --git a/webapp/src/app/api/model/topicHeatmap.ts b/webapp/src/app/api/model/topicHeatmap.ts index be36dc40..64e915a5 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,11 +9,9 @@ */ 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 eb1f08f0..7dd49acb 100644 --- a/webapp/src/app/api/model/topicHeatmapField.ts +++ b/webapp/src/app/api/model/topicHeatmapField.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,12 +10,10 @@ import { TopicHeatmapSubfield } from './topicHeatmapSubfield'; import { TopicHeatmapValue } from './topicHeatmapValue'; - -export interface TopicHeatmapField { - id: string; - name: string; - total: number; - values: Array; - subfields: Array; +export interface TopicHeatmapField { + id: string; + name: string; + total: number; + values: Array; + subfields: Array; } - diff --git a/webapp/src/app/api/model/topicHeatmapSubfield.ts b/webapp/src/app/api/model/topicHeatmapSubfield.ts index b352aebe..5ed69887 100644 --- a/webapp/src/app/api/model/topicHeatmapSubfield.ts +++ b/webapp/src/app/api/model/topicHeatmapSubfield.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -10,12 +10,10 @@ import { TopicHeatmapTopic } from './topicHeatmapTopic'; import { TopicHeatmapValue } from './topicHeatmapValue'; - -export interface TopicHeatmapSubfield { - id: string; - name: string; - total: number; - values: Array; - topics: Array; +export interface TopicHeatmapSubfield { + id: string; + name: string; + total: number; + values: Array; + topics: Array; } - diff --git a/webapp/src/app/api/model/topicHeatmapTopic.ts b/webapp/src/app/api/model/topicHeatmapTopic.ts index 0c565a68..aca68f58 100644 --- a/webapp/src/app/api/model/topicHeatmapTopic.ts +++ b/webapp/src/app/api/model/topicHeatmapTopic.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,11 +9,9 @@ */ import { TopicHeatmapValue } from './topicHeatmapValue'; - -export interface TopicHeatmapTopic { - id: string; - name: string; - total: number; - values: Array; +export interface TopicHeatmapTopic { + id: string; + name: string; + total: number; + values: Array; } - diff --git a/webapp/src/app/api/model/topicHeatmapValue.ts b/webapp/src/app/api/model/topicHeatmapValue.ts index f840b938..2f5a01d9 100644 --- a/webapp/src/app/api/model/topicHeatmapValue.ts +++ b/webapp/src/app/api/model/topicHeatmapValue.ts @@ -1,17 +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 TopicHeatmapValue { - year: number; - count: number; - share: number; +export interface TopicHeatmapValue { + year: number; + count: number; + share: number; } - diff --git a/webapp/src/app/api/model/topicPageV2.ts b/webapp/src/app/api/model/topicPageV2.ts index 67f1272b..5df5a490 100644 --- a/webapp/src/app/api/model/topicPageV2.ts +++ b/webapp/src/app/api/model/topicPageV2.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,23 +9,21 @@ */ import { Topic } from './topic'; - -export interface TopicPageV2 { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface TopicPageV2 { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/topicSortBy.ts b/webapp/src/app/api/model/topicSortBy.ts index be83fa8e..b705aacc 100644 --- a/webapp/src/app/api/model/topicSortBy.ts +++ b/webapp/src/app/api/model/topicSortBy.ts @@ -1,18 +1,16 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - export const TopicSortBy = { - DisplayName: 'display_name', - WorksCount: 'works_count', - CitedByCount: 'cited_by_count' + DisplayName: 'display_name', + WorksCount: 'works_count', + CitedByCount: 'cited_by_count', } as const; -export type TopicSortBy = typeof TopicSortBy[keyof typeof TopicSortBy]; - +export type TopicSortBy = (typeof TopicSortBy)[keyof typeof TopicSortBy]; diff --git a/webapp/src/app/api/model/topicWordCloud.ts b/webapp/src/app/api/model/topicWordCloud.ts index c55a2c9d..79620788 100644 --- a/webapp/src/app/api/model/topicWordCloud.ts +++ b/webapp/src/app/api/model/topicWordCloud.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,9 +9,7 @@ */ import { TopicWordCloudWord } from './topicWordCloudWord'; - -export interface TopicWordCloud { - topic_id: string; - words: Array; +export interface TopicWordCloud { + topic_id: string; + words: Array; } - diff --git a/webapp/src/app/api/model/topicWordCloudWord.ts b/webapp/src/app/api/model/topicWordCloudWord.ts index c93d1fd0..26594854 100644 --- a/webapp/src/app/api/model/topicWordCloudWord.ts +++ b/webapp/src/app/api/model/topicWordCloudWord.ts @@ -1,17 +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 TopicWordCloudWord { - id: string; - name: string; - count: number; +export interface TopicWordCloudWord { + id: string; + name: string; + count: number; } - diff --git a/webapp/src/app/api/model/trendSearchType.ts b/webapp/src/app/api/model/trendSearchType.ts index 5495800e..bde11a52 100644 --- a/webapp/src/app/api/model/trendSearchType.ts +++ b/webapp/src/app/api/model/trendSearchType.ts @@ -1,21 +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 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 312dee1c..b8ce939f 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,22 +9,20 @@ */ import { TopicYearlyData } from './topicYearlyData'; - -export interface TrendSeries { - entity_id: string; - entity_name: string; - entity_type: TrendSeries.EntityTypeEnum; - country_code?: string | null; - topic_data: { [key: string]: Array; }; +export interface TrendSeries { + entity_id: string; + entity_name: string; + entity_type: TrendSeries.EntityTypeEnum; + country_code?: string | null; + topic_data: { [key: string]: Array }; } export namespace TrendSeries { - export const EntityTypeEnum = { - Institution: 'institution', - Country: 'country', - Region: 'region', - Author: 'author' - } as const; - export type EntityTypeEnum = typeof EntityTypeEnum[keyof typeof EntityTypeEnum]; + export const EntityTypeEnum = { + Institution: 'institution', + Country: 'country', + Region: 'region', + Author: 'author', + } as const; + export type EntityTypeEnum = + (typeof EntityTypeEnum)[keyof typeof EntityTypeEnum]; } - - diff --git a/webapp/src/app/api/model/updateAccountRequest.ts b/webapp/src/app/api/model/updateAccountRequest.ts index 574f5d0d..db502fd9 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,15 +9,13 @@ */ 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/workClassification.ts b/webapp/src/app/api/model/workClassification.ts index 25951d4a..e732ec26 100644 --- a/webapp/src/app/api/model/workClassification.ts +++ b/webapp/src/app/api/model/workClassification.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,33 +14,31 @@ import { WorkClassificationMeta } from './workClassificationMeta'; import { WorkClassificationValidation } from './workClassificationValidation'; import { WorkClassificationAuthor } from './workClassificationAuthor'; - /** * Represents a full work-classification document. */ -export interface WorkClassification { - /** - * The full OpenAlex work id/URL. - */ - work_id: string; - doi?: string | null; - title?: string | null; - publication_year?: number | null; - publication_type?: string | null; - /** - * The authors of the work. - */ - authors?: Array; - /** - * The institutions associated with the work. - */ - institutions?: Array; - /** - * The topics associated with the work. - */ - topics?: Array; - classification?: WorkClassificationDetails | null; - classification_meta?: WorkClassificationMeta | null; - validation?: WorkClassificationValidation | null; +export interface WorkClassification { + /** + * The full OpenAlex work id/URL. + */ + work_id: string; + doi?: string | null; + title?: string | null; + publication_year?: number | null; + publication_type?: string | null; + /** + * The authors of the work. + */ + authors?: Array; + /** + * The institutions associated with the work. + */ + institutions?: Array; + /** + * The topics associated with the work. + */ + topics?: Array; + classification?: WorkClassificationDetails | null; + classification_meta?: WorkClassificationMeta | null; + validation?: WorkClassificationValidation | null; } - diff --git a/webapp/src/app/api/model/workClassificationAuthor.ts b/webapp/src/app/api/model/workClassificationAuthor.ts index a28e37de..aef36e2b 100644 --- a/webapp/src/app/api/model/workClassificationAuthor.ts +++ b/webapp/src/app/api/model/workClassificationAuthor.ts @@ -1,20 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * An author entry within a work classification document. */ -export interface WorkClassificationAuthor { - id?: string | null; - display_name?: string | null; - orcid?: string | null; +export interface WorkClassificationAuthor { + id?: string | null; + display_name?: string | null; + orcid?: string | null; } - diff --git a/webapp/src/app/api/model/workClassificationDetails.ts b/webapp/src/app/api/model/workClassificationDetails.ts index e096423b..20593e72 100644 --- a/webapp/src/app/api/model/workClassificationDetails.ts +++ b/webapp/src/app/api/model/workClassificationDetails.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,20 +9,16 @@ */ import { WorkPrimaryCategory } from './workPrimaryCategory'; - /** * The core classification result for a work. */ -export interface WorkClassificationDetails { - primary_category?: WorkPrimaryCategory | null; - confidence?: string | null; - pasteur_quadrant?: string | null; - applied_orientation_score?: number | null; - insufficient_context?: boolean | null; - signals_used?: Array | null; - classification_reason?: string | null; +export interface WorkClassificationDetails { + primary_category?: WorkPrimaryCategory | null; + confidence?: string | null; + pasteur_quadrant?: string | null; + applied_orientation_score?: number | null; + insufficient_context?: boolean | null; + signals_used?: Array | null; + classification_reason?: string | null; } -export namespace WorkClassificationDetails { -} - - +export namespace WorkClassificationDetails {} diff --git a/webapp/src/app/api/model/workClassificationInstitution.ts b/webapp/src/app/api/model/workClassificationInstitution.ts index db2eae24..754b1eb8 100644 --- a/webapp/src/app/api/model/workClassificationInstitution.ts +++ b/webapp/src/app/api/model/workClassificationInstitution.ts @@ -1,20 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * An institution entry within a work classification document. */ -export interface WorkClassificationInstitution { - id?: string | null; - display_name?: string | null; - ror?: string | null; +export interface WorkClassificationInstitution { + id?: string | null; + display_name?: string | null; + ror?: string | null; } - diff --git a/webapp/src/app/api/model/workClassificationMeta.ts b/webapp/src/app/api/model/workClassificationMeta.ts index eb67e185..9e6619d5 100644 --- a/webapp/src/app/api/model/workClassificationMeta.ts +++ b/webapp/src/app/api/model/workClassificationMeta.ts @@ -1,20 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * Metadata about how and when a classification was produced. */ -export interface WorkClassificationMeta { - model?: string | null; - prompt_version?: string | null; - classified_at?: string | null; +export interface WorkClassificationMeta { + model?: string | null; + prompt_version?: string | null; + classified_at?: string | null; } - diff --git a/webapp/src/app/api/model/workClassificationPage.ts b/webapp/src/app/api/model/workClassificationPage.ts index 22b71991..db7e3e0d 100644 --- a/webapp/src/app/api/model/workClassificationPage.ts +++ b/webapp/src/app/api/model/workClassificationPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,23 +9,21 @@ */ import { WorkClassification } from './workClassification'; - -export interface WorkClassificationPage { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface WorkClassificationPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/workClassificationTopic.ts b/webapp/src/app/api/model/workClassificationTopic.ts index 5ea5b9f9..34f8c96a 100644 --- a/webapp/src/app/api/model/workClassificationTopic.ts +++ b/webapp/src/app/api/model/workClassificationTopic.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,16 +9,14 @@ */ import { WorkClassificationTopicGroup } from './workClassificationTopicGroup'; - /** * A topic entry within a work classification document. */ -export interface WorkClassificationTopic { - id?: string | null; - display_name?: string | null; - score?: number | null; - domain?: WorkClassificationTopicGroup | null; - field?: WorkClassificationTopicGroup | null; - subfield?: WorkClassificationTopicGroup | null; +export interface WorkClassificationTopic { + id?: string | null; + display_name?: string | null; + score?: number | null; + domain?: WorkClassificationTopicGroup | null; + field?: WorkClassificationTopicGroup | null; + subfield?: WorkClassificationTopicGroup | null; } - diff --git a/webapp/src/app/api/model/workClassificationTopicGroup.ts b/webapp/src/app/api/model/workClassificationTopicGroup.ts index 58ce3fe6..8e574397 100644 --- a/webapp/src/app/api/model/workClassificationTopicGroup.ts +++ b/webapp/src/app/api/model/workClassificationTopicGroup.ts @@ -1,19 +1,17 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * A domain/field/subfield group referenced within a classification topic. */ -export interface WorkClassificationTopicGroup { - id?: string | null; - display_name?: string | null; +export interface WorkClassificationTopicGroup { + id?: string | null; + display_name?: string | null; } - diff --git a/webapp/src/app/api/model/workClassificationValidation.ts b/webapp/src/app/api/model/workClassificationValidation.ts index da1db647..46c91824 100644 --- a/webapp/src/app/api/model/workClassificationValidation.ts +++ b/webapp/src/app/api/model/workClassificationValidation.ts @@ -1,20 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - /** * Validation results for a classification. */ -export interface WorkClassificationValidation { - valid?: boolean | null; - errors?: Array | null; - corrections?: Array | null; +export interface WorkClassificationValidation { + valid?: boolean | null; + errors?: Array | null; + corrections?: Array | null; } - diff --git a/webapp/src/app/api/model/workNode.ts b/webapp/src/app/api/model/workNode.ts index d3e2075c..47f3f756 100644 --- a/webapp/src/app/api/model/workNode.ts +++ b/webapp/src/app/api/model/workNode.ts @@ -1,30 +1,28 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - -export interface WorkNode { - /** - * The ID of the work. - */ - id: string; - /** - * The title of the work. - */ - display_name: string; - /** - * The publication year of the work. - */ - publication_year: number; - /** - * IDs of authors who contributed to this work. - */ - author_ids?: Array; +export interface WorkNode { + /** + * The ID of the work. + */ + id: string; + /** + * The title of the work. + */ + display_name: string; + /** + * The publication year of the work. + */ + publication_year: number; + /** + * IDs of authors who contributed to this work. + */ + author_ids?: Array; } - diff --git a/webapp/src/app/api/model/workPage.ts b/webapp/src/app/api/model/workPage.ts index 8490c3ab..285d2065 100644 --- a/webapp/src/app/api/model/workPage.ts +++ b/webapp/src/app/api/model/workPage.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,27 +9,25 @@ */ import { Work } from './work'; - -export interface WorkPage { - /** - * Total number of works matching the query - */ - total: number; - /** - * List of works on the current page - */ - elements: Array; - /** - * Offset of the current page - */ - offset: number; - /** - * Size of the current page - */ - size: number; - /** - * Indicates if the current page is the last page - */ - last_page: boolean; +export interface WorkPage { + /** + * Total number of works matching the query + */ + total: number; + /** + * List of works on the current page + */ + elements: Array; + /** + * Offset of the current page + */ + offset: number; + /** + * Size of the current page + */ + size: number; + /** + * Indicates if the current page is the last page + */ + last_page: boolean; } - diff --git a/webapp/src/app/api/model/workPageV2.ts b/webapp/src/app/api/model/workPageV2.ts index a22b6855..bc93d6ce 100644 --- a/webapp/src/app/api/model/workPageV2.ts +++ b/webapp/src/app/api/model/workPageV2.ts @@ -1,7 +1,7 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -9,23 +9,21 @@ */ import { Work } from './work'; - -export interface WorkPageV2 { - /** - * The elements of the page. - */ - elements?: Array; - /** - * The page number. (0-based) - */ - page?: number; - /** - * The page size in elements. - */ - size?: number; - /** - * The total number of elements. - */ - total?: number; +export interface WorkPageV2 { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page number. (0-based) + */ + page?: number; + /** + * The page size in elements. + */ + size?: number; + /** + * The total number of elements. + */ + total?: number; } - diff --git a/webapp/src/app/api/model/workPrimaryCategory.ts b/webapp/src/app/api/model/workPrimaryCategory.ts index ddbbde75..563359d3 100644 --- a/webapp/src/app/api/model/workPrimaryCategory.ts +++ b/webapp/src/app/api/model/workPrimaryCategory.ts @@ -1,23 +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. */ - /** * Represents the primary category of a work. */ export const WorkPrimaryCategory = { - BasicResearch: 'basic_research', - AppliedResearch: 'applied_research', - NonResearch: 'non_research', - ExperimentalDevelopment: 'experimental_development', - NotClassified: 'not_classified' + BasicResearch: 'basic_research', + AppliedResearch: 'applied_research', + NonResearch: 'non_research', + ExperimentalDevelopment: 'experimental_development', + NotClassified: 'not_classified', } as const; -export type WorkPrimaryCategory = typeof WorkPrimaryCategory[keyof typeof WorkPrimaryCategory]; - +export type WorkPrimaryCategory = + (typeof WorkPrimaryCategory)[keyof typeof WorkPrimaryCategory]; diff --git a/webapp/src/app/api/model/workSortBy.ts b/webapp/src/app/api/model/workSortBy.ts index 7580ac82..56f89162 100644 --- a/webapp/src/app/api/model/workSortBy.ts +++ b/webapp/src/app/api/model/workSortBy.ts @@ -1,20 +1,18 @@ /** * Innovation Search Engine API * - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ - 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/modules/collaboration-graph/collaboration-graph.component.scss b/webapp/src/app/modules/collaboration-graph/collaboration-graph.component.scss index 71dfb95a..7dcd4afc 100644 --- a/webapp/src/app/modules/collaboration-graph/collaboration-graph.component.scss +++ b/webapp/src/app/modules/collaboration-graph/collaboration-graph.component.scss @@ -25,4 +25,4 @@ mat-card > mat-card-content { touch-action: none; user-select: none; cursor: grab; -} \ No newline at end of file +} diff --git a/webapp/src/app/modules/compare-authors/author-research-profile/author-research-profile.component.ts b/webapp/src/app/modules/compare-authors/author-research-profile/author-research-profile.component.ts index d8a888cb..6fb7764b 100644 --- a/webapp/src/app/modules/compare-authors/author-research-profile/author-research-profile.component.ts +++ b/webapp/src/app/modules/compare-authors/author-research-profile/author-research-profile.component.ts @@ -81,8 +81,7 @@ export class AuthorResearchProfileComponent { return 'Forschungsprofil nicht verfügbar'; } if ( - profile.status === - AuthorOrientationProfileStatus.NoClassifiedPublications + profile.status === AuthorOrientationProfileStatus.NoClassifiedPublications ) { return 'Keine klassifizierten Publikationen'; } diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.html b/webapp/src/app/modules/compare-authors/compare-authors.component.html index fb737e41..1ddf076c 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.html +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.html @@ -4,31 +4,40 @@
@if (keywords().length > 0) { - - topic - {{ keywords().join(', ') }} - +
+ Betrachtete Themen: +
+ @for (keyword of keywords(); track keyword) { + + } +
+ Verknüpfungsoperator: {{ operatorLabel() }} +
} @if (timespan(); as span) { - - date_range - {{ span.from }}–{{ span.to }} - +
+ Betrachteter Zeitraum: + + date_range + {{ span.from }}–{{ span.to }} + +
+ } + @if (hasData()) { +
+ Betrachtete Personen: +
+ @for (author of summary(); track author.authorId) { + {{ author.name }} + } +
+
}
- - @if (hasData()) { -
    - @for (author of summary(); track author.authorId) { -
  • - - {{ author.name }} -
  • - } -
- } @if (loading()) { @@ -38,10 +47,13 @@ } @else {
-

Kennzahlen zu den Keywords

+

+ Kennzahlen der Publikationen zu den ausgewählten Themen +

- Bester Wert je Zeile ist hervorgehoben. „–“ bedeutet, dass der Wert für - diese:n Autor:in nicht vorliegt. + Berücksichtigt werden ausschließlich Publikationen zu den ausgewählten + Themen im betrachteten Zeitraum. Bester Wert je Zeile ist hervorgehoben. + „–" bedeutet, dass der Wert für diese:n Autor:in nicht vorliegt.

Kennzahlen zur Person

-

Unabhängig von den Keywords und Zeitraum.

+

+ Unabhängig von den ausgewählten Themen und vom Zeitraum. +

@@ -60,15 +74,17 @@

Themenprofil

-

"Topic-Analyse"

+

+ Verteilung und Breite der Themen über alle Publikationen +

@if (profileLoading()) {

Lädt…

} @else if (orderedProfiles().length > 0) {

Themenverteilung nach Subfield

- Von allen Arbeiten der Autor:innen im Zeitraum: der Anteil je - Subfield, bestimmt über das Primärthema jeder Arbeit. (Top 5) + Anteil je Subfield an allen Publikationen im Zeitraum, bestimmt über + das Primärthema. (Top 5)

Themen-Fokus

- Anzahl der Werke zum Suchthema im Verhältnis zum Gesamtwerk – und - wie viele davon das Suchthema als Primärthema tragen. + Publikationen zum Suchthema im Verhältnis zu allen Publikationen – + und wie viele es als Primärthema tragen

Themenbreite

- Einzigartige Primärthemen, Subfields und Fields im Gesamtwerk - (Primary Topic) + Einzigartige Primärthemen, Subfields und Fields über alle + Publikationen (Primärthema)

+ +

Themenlandschaft

+

Field → Subfield → Thema

+
+ @for ( + author of orderedProfiles(); + track author.author_id; + let i = $index + ) { + + } +
+ } @else {

Keine Daten für das Themenprofil.

} @@ -113,12 +159,7 @@ Kennzahl @for (author of summary(); track author.authorId) { - - - {{ author.name }} - + {{ author.name }} } diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.scss b/webapp/src/app/modules/compare-authors/compare-authors.component.scss index d1724a2f..f34f907b 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.scss +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.scss @@ -24,52 +24,40 @@ .compare-meta { display: flex; + flex-direction: column; + gap: 8px; +} + +.meta-row { + display: flex; + align-items: center; flex-wrap: wrap; gap: 8px; } -.meta-chip { - display: inline-flex; - align-items: center; - gap: 6px; - padding: 4px 12px; - border-radius: 999px; - background: var(--sg-surface-muted); - border: 1px solid var(--sg-border); - color: var(--sg-text-muted); +.meta-label { font-size: 13px; - - mat-icon { - font-size: 16px; - width: 16px; - height: 16px; - color: var(--sg-text-soft); - } + font-weight: 600; + color: var(--sg-text-muted, #64708f); } -.author-legend { - list-style: none; - margin: 0; - padding: 0; +.meta-operator { + font-size: 13px; + font-weight: 600; + color: var(--sg-text-muted, #64708f); +} + +.meta-chip-group { display: flex; flex-wrap: wrap; - gap: 8px 18px; -} - -.legend-item { - display: inline-flex; - align-items: center; gap: 8px; - font-size: 14px; - font-weight: 600; - color: var(--sg-text); } -.legend-swatch { - width: 12px; - height: 12px; - border-radius: 3px; - flex: 0 0 auto; +app-chip mat-icon { + font-size: 16px; + width: 16px; + height: 16px; + vertical-align: text-bottom; } /* ---- cards ---- */ @@ -112,24 +100,12 @@ font-size: 14px; thead th { - text-align: left; + text-align: center; padding: 0 16px 10px; border-bottom: 2px solid var(--sg-border); vertical-align: bottom; } - .author-col { - text-align: right; - } - - .th-name { - display: inline-flex; - align-items: center; - gap: 8px; - font-weight: 700; - color: var(--sg-text); - } - tbody tr + tr th, tbody tr + tr td { border-top: 1px solid var(--sg-border); @@ -160,7 +136,7 @@ } .value-cell { - text-align: right; + text-align: center; font-variant-numeric: tabular-nums; color: var(--sg-text); white-space: nowrap; @@ -262,6 +238,35 @@ height: 320px; } +.treemap-author-tabs { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin: 4px 0 10px; +} + +.treemap-author-tab { + display: inline-flex; + border: 0; + padding: 0; + border-radius: 7px; + background: transparent; + cursor: pointer; + transition: + transform 0.15s ease, + box-shadow 0.15s ease; + + &:hover { + transform: translateY(-1px); + } + + &.active { + box-shadow: + 0 0 0 2px #ffffff, + 0 0 0 4px var(--tab-color, var(--sg-primary, #2563eb)); + } +} + .chart-grid { display: grid; grid-template-columns: 1fr 1fr; diff --git a/webapp/src/app/modules/compare-authors/compare-authors.component.ts b/webapp/src/app/modules/compare-authors/compare-authors.component.ts index 98fa4b6c..d1a38945 100644 --- a/webapp/src/app/modules/compare-authors/compare-authors.component.ts +++ b/webapp/src/app/modules/compare-authors/compare-authors.component.ts @@ -14,12 +14,21 @@ import { PublicationType, RankingService, SelectedAuthorsRequest, + Topic, + TopicsService, } from '../../api'; import { AuthorResearchProfileComponent, ResearchProfileAuthor, } from './author-research-profile/author-research-profile.component'; +import { + TopicTreemapComponent, + TopicTreemapData, +} from '../../shared/ui/topic-treemap/topic-treemap.component'; +import { ChipComponent } from '../../shared/ui/chip/chip.component'; +import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component'; import { ChartThemeService } from '../../shared/services/chart-theme.service'; +import { topicHierarchyColor } from '../../resolvers/utils/topic-colors'; import { AUTHOR_COLORS, OTHER_COLOR, @@ -115,6 +124,9 @@ interface SegmentDef { MatIconModule, NgxEchartsDirective, AuthorResearchProfileComponent, + TopicTreemapComponent, + ChipComponent, + TopicChipComponent, ], templateUrl: './compare-authors.component.html', styleUrl: './compare-authors.component.scss', @@ -122,9 +134,38 @@ interface SegmentDef { export class CompareAuthorsComponent implements OnInit { private readonly route = inject(ActivatedRoute); private readonly rankingService = inject(RankingService); + private readonly topicsService = inject(TopicsService); private readonly chartTheme = inject(ChartThemeService); readonly keywords = signal([]); + readonly operator = signal<'and' | 'or'>('or'); + readonly operatorLabel = computed(() => + this.operator() === 'and' ? 'UND' : 'ODER', + ); + + // resolved OpenAlex topic (field/domain) per keyword for colour matching + private readonly keywordTopics = signal>({}); + + keywordColor(keyword: string): string { + const topic = this.keywordTopics()[this.normalizeKeyword(keyword)]; + return topicHierarchyColor( + topic + ? { + 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, + } + : { name: keyword }, + ); + } + + private normalizeKeyword(keyword: string): string { + return keyword.trim().toLowerCase(); + } + readonly timespan = signal<{ from: number; to: number } | null>(null); // full OpenAlex ids in the requested order — the source of truth for colour + order readonly authorIds = signal([]); @@ -374,6 +415,60 @@ export class CompareAuthorsComponent implements OnInit { })); }); + // treemap (section 3): one author's full topic hierarchy, switchable via tabs + readonly selectedTreemapAuthor = signal(0); + // drill-down state of the treemap for the selected author + readonly treemapNodeId = signal(undefined); + + readonly treemapProfile = computed(() => { + const profiles = this.orderedProfiles(); + if (profiles.length === 0) return null; + const index = Math.min(this.selectedTreemapAuthor(), profiles.length - 1); + return profiles[index]; + }); + + // maps the selected author's field_tree onto the shared treemap data model + readonly treemapData = computed(() => { + const profile = this.treemapProfile(); + if (!profile) return undefined; + + return { + institution_id: profile.author_id, + organization_name: profile.display_name, + years: [], + fields: profile.field_tree.map((field) => ({ + id: field.id, + name: field.name, + total: field.count, + values: [], + subfields: field.subfields.map((subfield) => ({ + id: subfield.id, + name: subfield.name, + total: subfield.count, + values: [], + topics: subfield.topics.map((topic) => ({ + id: topic.id, + name: topic.name, + total: topic.count, + values: [], + })), + })), + })), + }; + }); + + selectTreemapAuthor(index: number): void { + this.selectedTreemapAuthor.set(index); + // reset the drill-down when switching author + this.treemapNodeId.set(undefined); + } + + authorColor(authorId: string): string { + return ( + this.summary().find((a) => a.authorId === authorId)?.color ?? OTHER_COLOR + ); + } + // colours the author names on the chart axes like the legend chips private authorAxisLabel(profiles: AuthorTopicProfile[]) { const rich: Record = {}; @@ -651,12 +746,14 @@ export class CompareAuthorsComponent implements OnInit { const authorIds = this.parseList(rawAuthors); const keywords = this.parseList(rawKeywords); this.keywords.set(keywords); + this.resolveKeywordColors(keywords); if (authorIds.length === 0 || keywords.length === 0) { return; } const operator = rawOperator === 'and' ? 'and' : 'or'; + this.operator.set(operator); const publication_types = rawPubType ? this.parseList(rawPubType) .map((s) => this.getPublicationType(s)) @@ -743,6 +840,25 @@ export class CompareAuthorsComponent implements OnInit { } } + private resolveKeywordColors(keywords: string[]): void { + if (keywords.length === 0) return; + + this.topicsService.vectorSearchTopicsBatch({ keywords }).subscribe({ + next: ({ results }) => { + const topics: Record = {}; + for (const result of results) { + if (result.topic) { + topics[this.normalizeKeyword(result.keyword)] = result.topic; + } + } + this.keywordTopics.set(topics); + }, + error: (error) => { + console.error('Error resolving keyword topics:', error); + }, + }); + } + private parseList(raw: string): string[] { return raw .split(',') diff --git a/webapp/src/app/modules/dashboard/dashboard.component.html b/webapp/src/app/modules/dashboard/dashboard.component.html index 75bceafa..e2823c5b 100644 --- a/webapp/src/app/modules/dashboard/dashboard.component.html +++ b/webapp/src/app/modules/dashboard/dashboard.component.html @@ -292,8 +292,8 @@

DFG-Projekt-Topics

- Gematchte DFG-Projekte nach Field, Subfield und Topic. Ein Klick - auf ein Topic zeigt die zugehörigen Keywords. + Gematchte DFG-Projekte nach Field, Subfield und Topic. Ein Klick auf + ein Topic zeigt die zugehörigen Keywords.

@if (dfgProjectTopics) { @@ -335,8 +335,8 @@

EU-Projekt-Topics

- Gematchte EU-Projekte nach Field, Subfield und Topic. Ein Klick - auf ein Topic zeigt die zugehörigen Keywords. + Gematchte EU-Projekte nach Field, Subfield und Topic. Ein Klick auf + ein Topic zeigt die zugehörigen Keywords.

@if (euProjectTopics) { diff --git a/webapp/src/app/modules/dashboard/dashboard.component.ts b/webapp/src/app/modules/dashboard/dashboard.component.ts index 14fadca4..613ac71d 100644 --- a/webapp/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/src/app/modules/dashboard/dashboard.component.ts @@ -269,10 +269,7 @@ export class DashboardComponent implements OnInit { name: subfieldName, total: group.topics[0]?.subfield_project_count ?? - group.topics.reduce( - (sum, topic) => sum + topic.project_count, - 0, - ), + group.topics.reduce((sum, topic) => sum + topic.project_count, 0), values: [], topics: group.topics.map((topic) => ({ id: topic.id, @@ -287,10 +284,7 @@ export class DashboardComponent implements OnInit { name: fieldName, total: [...subfields.values()][0]?.topics[0]?.field_project_count ?? - mappedSubfields.reduce( - (sum, subfield) => sum + subfield.total, - 0, - ), + mappedSubfields.reduce((sum, subfield) => sum + subfield.total, 0), values: [], subfields: mappedSubfields, }; @@ -507,8 +501,7 @@ export class DashboardComponent implements OnInit { this.selectedTopicTreemapNode = params.get('treemapNode') ?? undefined; this.selectedDfgTopicTreemapNode = params.get('dfgTreemapNode') ?? undefined; - this.selectedEuTopicTreemapNode = - params.get('euTreemapNode') ?? undefined; + this.selectedEuTopicTreemapNode = params.get('euTreemapNode') ?? undefined; this.selectedBundTopicTreemapNode = params.get('bundTreemapNode') ?? undefined; } diff --git a/webapp/src/app/modules/institution-projects/institution-projects.component.html b/webapp/src/app/modules/institution-projects/institution-projects.component.html index d6c902db..b0b8fe2f 100644 --- a/webapp/src/app/modules/institution-projects/institution-projects.component.html +++ b/webapp/src/app/modules/institution-projects/institution-projects.component.html @@ -41,9 +41,7 @@ | currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined " /> +
+ class="filter-field" + subscriptSizing="dynamic"> + article Art der Work -
- + + link Keyword-Verknüpfung -
-
- + + trending_up Karrierestufe -
-
- + + business Unternehmen -
-
-
- date_range - Zeitraum -
- -
-
- {{ timespanFrom() }} – {{ timespanTo() }} -
- - - - -
+
diff --git a/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.scss b/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.scss index b78e8143..d154de44 100644 --- a/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.scss +++ b/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.scss @@ -122,6 +122,14 @@ } } +.filter-fields { + display: flex; + flex-wrap: wrap; + gap: 0.75rem; + align-items: flex-start; + width: 100%; +} + /* divider between filter rows — not before the first one */ ::ng-deep .filter-section .filter-row + .filter-row { margin-top: 0.5rem; @@ -144,15 +152,37 @@ ::ng-deep .timespan-slider { width: 100%; - margin: 0; +} + +.filter-field { + flex: 1 1 220px; + min-width: 200px; + + mat-icon[matPrefix] { + margin-right: 0.4rem; + color: var(--sg-text-secondary, rgba(0, 0, 0, 0.54)); + } +} + +.filter-field-year { + flex: 1 1 100%; } ::ng-deep .pub-type-search { display: flex; align-items: center; + gap: 0.4rem; position: sticky; top: 0; z-index: 10; background: var(--sg-surface); + padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--sg-border); + + input { + flex: 1; + border: none; + outline: none; + padding: 0.4rem 0; + } } diff --git a/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.ts b/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.ts index a75b914a..fb4a1bf1 100644 --- a/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.ts +++ b/webapp/src/app/modules/keywords-search/search-results/persons-results/persons-results.component.ts @@ -7,7 +7,6 @@ import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatIconModule } from '@angular/material/icon'; -import { MatSliderModule } from '@angular/material/slider'; import { MatSnackBar } from '@angular/material/snack-bar'; import { FormsModule } from '@angular/forms'; import { MatSelectModule } from '@angular/material/select'; @@ -21,6 +20,7 @@ import { WeightsSlidersValue, } from '../../../../shared/ui/weights-sliders/weights-sliders.component'; import { QueryParamPaginatorComponent } from '../../../../shared/ui/query-param-paginator/query-param-paginator.component'; +import { YearRangeSliderComponent } from '../../../../shared/ui/year-range-slider/year-range-slider.component'; import { CareerStage, @@ -41,13 +41,13 @@ import { SearchResultsStateService } from '../search-results-state.service'; MatCardModule, MatCheckboxModule, MatIconModule, - MatSliderModule, FormsModule, MatSelectModule, MatInputModule, MatFormFieldModule, QueryParamPaginatorComponent, WeightsSlidersComponent, + YearRangeSliderComponent, ], templateUrl: './persons-results.component.html', styleUrl: './persons-results.component.scss', diff --git a/webapp/src/app/modules/organizations/organizations.component.html b/webapp/src/app/modules/organizations/organizations.component.html index 766b4027..b52e00b0 100644 --- a/webapp/src/app/modules/organizations/organizations.component.html +++ b/webapp/src/app/modules/organizations/organizations.component.html @@ -2,7 +2,10 @@