745 lines
43 KiB
TypeScript
745 lines
43 KiB
TypeScript
/**
|
|
* Innovation Search Engine API
|
|
*
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
/* tslint:disable:no-unused-variable member-ordering */
|
|
|
|
import { Inject, Injectable, Optional } from '@angular/core';
|
|
import { HttpClient, HttpHeaders, HttpParams,
|
|
HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
|
|
} from '@angular/common/http';
|
|
import { CustomHttpParameterCodec } from '../encoder';
|
|
import { Observable } from 'rxjs';
|
|
|
|
// @ts-ignore
|
|
import { BundProjectDetails } from '../model/bundProjectDetails';
|
|
// @ts-ignore
|
|
import { BundProjectPage } from '../model/bundProjectPage';
|
|
// @ts-ignore
|
|
import { CordisEuProjectPage } from '../model/cordisEuProjectPage';
|
|
// @ts-ignore
|
|
import { DfgProjectDetails } from '../model/dfgProjectDetails';
|
|
// @ts-ignore
|
|
import { DfgProjectPage } from '../model/dfgProjectPage';
|
|
// @ts-ignore
|
|
import { EuCordisProjectResponse } from '../model/euCordisProjectResponse';
|
|
// @ts-ignore
|
|
import { EuOrganizationProjectSummaryPage } from '../model/euOrganizationProjectSummaryPage';
|
|
// @ts-ignore
|
|
import { FundingProjectPage } from '../model/fundingProjectPage';
|
|
// @ts-ignore
|
|
import { HTTPValidationError } from '../model/hTTPValidationError';
|
|
// @ts-ignore
|
|
import { InstitutionFunderSummary } from '../model/institutionFunderSummary';
|
|
// @ts-ignore
|
|
import { ProjectType } from '../model/projectType';
|
|
// @ts-ignore
|
|
import { ProjectsFilteringProperties } from '../model/projectsFilteringProperties';
|
|
// @ts-ignore
|
|
import { ProjectsSortBy } from '../model/projectsSortBy';
|
|
// @ts-ignore
|
|
import { SortDirection } from '../model/sortDirection';
|
|
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
import { Configuration } from '../configuration';
|
|
import { BaseService } from '../api.base.service';
|
|
|
|
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class ProjectsService extends BaseService {
|
|
|
|
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
|
super(basePath, configuration);
|
|
}
|
|
|
|
/**
|
|
* Get DFG projects.
|
|
* Returns a page of DFG projects based on the provided pagination parameters and optional institution filter.
|
|
* @endpoint get /api/projects/person/dfg/search
|
|
* @param authorId The openalex author ID to filter by.
|
|
* @param authorFilterIds The 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(authorId?: string, authorFilterIds?: Array<number>, institutionIds?: Array<number>, title?: string, keywords?: Array<string>, topicIds?: Array<string>, filterTopicIds?: Array<string>, fundingStartYears?: Array<string>, fundingEndYears?: Array<string>, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<DfgProjectPage>;
|
|
public getDfgProjects(authorId?: string, authorFilterIds?: Array<number>, institutionIds?: Array<number>, title?: string, keywords?: Array<string>, topicIds?: Array<string>, filterTopicIds?: Array<string>, fundingStartYears?: Array<string>, fundingEndYears?: Array<string>, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgProjectPage>>;
|
|
public getDfgProjects(authorId?: string, authorFilterIds?: Array<number>, institutionIds?: Array<number>, title?: string, keywords?: Array<string>, topicIds?: Array<string>, filterTopicIds?: Array<string>, fundingStartYears?: Array<string>, fundingEndYears?: Array<string>, page?: number, size?: number, sortBy?: string, sortDirection?: string, fuzzy?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgProjectPage>>;
|
|
public getDfgProjects(authorId?: string, authorFilterIds?: Array<number>, institutionIds?: Array<number>, title?: string, keywords?: Array<string>, topicIds?: Array<string>, filterTopicIds?: Array<string>, fundingStartYears?: Array<string>, fundingEndYears?: Array<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<any> {
|
|
|
|
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>authorId, 'author_id');
|
|
if (authorFilterIds) {
|
|
authorFilterIds.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'author_filter_ids');
|
|
})
|
|
}
|
|
if (institutionIds) {
|
|
institutionIds.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'institution_ids');
|
|
})
|
|
}
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>title, 'title');
|
|
if (keywords) {
|
|
keywords.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'keywords');
|
|
})
|
|
}
|
|
if (topicIds) {
|
|
topicIds.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'topic_ids');
|
|
})
|
|
}
|
|
if (filterTopicIds) {
|
|
filterTopicIds.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'filter_topic_ids');
|
|
})
|
|
}
|
|
if (fundingStartYears) {
|
|
fundingStartYears.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'funding_start_years');
|
|
})
|
|
}
|
|
if (fundingEndYears) {
|
|
fundingEndYears.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'funding_end_years');
|
|
})
|
|
}
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>page, 'page');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>size, 'size');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>sortBy, 'sort_by');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>sortDirection, 'sort_direction');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>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/person/dfg/search`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<DfgProjectPage>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get EU projects for an author.
|
|
* Returns a list of EU projects associated with the specified author ID.
|
|
* @endpoint get /api/projects/author/{raw_oa_author_id}/eu
|
|
* @param rawOaAuthorId The author ID to filter by.
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getEuProjectsForAuthor(rawOaAuthorId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CordisEuProjectPage>;
|
|
public getEuProjectsForAuthor(rawOaAuthorId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CordisEuProjectPage>>;
|
|
public getEuProjectsForAuthor(rawOaAuthorId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CordisEuProjectPage>>;
|
|
public getEuProjectsForAuthor(rawOaAuthorId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (rawOaAuthorId === null || rawOaAuthorId === undefined) {
|
|
throw new Error('Required parameter rawOaAuthorId was null or undefined when calling getEuProjectsForAuthor.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
'application/json'
|
|
]);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/projects/author/${this.configuration.encodeParam({name: "rawOaAuthorId", value: rawOaAuthorId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/eu`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<CordisEuProjectPage>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get funding over time for bund projects.
|
|
* Returns the funding over time for bund projects associated with the specified institution.
|
|
* @endpoint get /api/projects/institution/bund/funding-over-time
|
|
* @param rawOaInstitutionId The institution ID to filter by.
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionFunderSummary>;
|
|
public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionFunderSummary>>;
|
|
public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionFunderSummary>>;
|
|
public getInstitutionBundProjectsFundingOverTime(rawOaInstitutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) {
|
|
throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionBundProjectsFundingOverTime.');
|
|
}
|
|
|
|
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>rawOaInstitutionId, 'raw_oa_institution_id');
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
'application/json'
|
|
]);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/projects/institution/bund/funding-over-time`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<InstitutionFunderSummary>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get funding over time for EU projects.
|
|
* Returns the funding over time for EU projects associated with the specified institution.
|
|
* @endpoint get /api/projects/institution/eu/funding-over-time
|
|
* @param rawOaInstitutionId The institution ID to filter by.
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InstitutionFunderSummary>;
|
|
public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InstitutionFunderSummary>>;
|
|
public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InstitutionFunderSummary>>;
|
|
public getInstitutionCordisEuProjectsFundingOverTime(rawOaInstitutionId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (rawOaInstitutionId === null || rawOaInstitutionId === undefined) {
|
|
throw new Error('Required parameter rawOaInstitutionId was null or undefined when calling getInstitutionCordisEuProjectsFundingOverTime.');
|
|
}
|
|
|
|
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>rawOaInstitutionId, 'raw_oa_institution_id');
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
'application/json'
|
|
]);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/projects/institution/eu/funding-over-time`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<InstitutionFunderSummary>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>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<BundProjectDetails>;
|
|
public getSingleBundProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<BundProjectDetails>>;
|
|
public getSingleBundProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<BundProjectDetails>>;
|
|
public getSingleBundProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (id === null || id === undefined) {
|
|
throw new Error('Required parameter id was null or undefined when calling 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<BundProjectDetails>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>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<DfgProjectDetails>;
|
|
public getSingleDfgProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<DfgProjectDetails>>;
|
|
public getSingleDfgProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<DfgProjectDetails>>;
|
|
public getSingleDfgProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (id === null || id === undefined) {
|
|
throw new Error('Required parameter id was null or undefined when calling 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<DfgProjectDetails>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>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<EuCordisProjectResponse>;
|
|
public getSingleEuCordisProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<EuCordisProjectResponse>>;
|
|
public getSingleEuCordisProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<EuCordisProjectResponse>>;
|
|
public getSingleEuCordisProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (id === null || id === undefined) {
|
|
throw new Error('Required parameter id was null or undefined when calling 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<EuCordisProjectResponse>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>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<BundProjectPage>;
|
|
public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<BundProjectPage>>;
|
|
public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<BundProjectPage>>;
|
|
public searchBundProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
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<BundProjectPage>('post', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
body: projectsFilteringProperties,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get EU projects.
|
|
* Returns a page of EU projects based on the provided pagination parameters and optional institution filter.
|
|
* @endpoint post /api/projects/institution/eu/search
|
|
* @param projectsFilteringProperties
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<EuOrganizationProjectSummaryPage>;
|
|
public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<EuOrganizationProjectSummaryPage>>;
|
|
public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<EuOrganizationProjectSummaryPage>>;
|
|
public searchCordisEuProjects(projectsFilteringProperties: ProjectsFilteringProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
if (projectsFilteringProperties === null || projectsFilteringProperties === undefined) {
|
|
throw new Error('Required parameter projectsFilteringProperties was null or undefined when calling searchCordisEuProjects.');
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
'application/json'
|
|
]);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = [
|
|
'application/json'
|
|
];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/projects/institution/eu/search`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<EuOrganizationProjectSummaryPage>('post', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
body: projectsFilteringProperties,
|
|
responseType: <any>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<ProjectType>, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<FundingProjectPage>;
|
|
public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set<ProjectType>, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<FundingProjectPage>>;
|
|
public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set<ProjectType>, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<FundingProjectPage>>;
|
|
public searchProjects(page?: number, size?: number, selectedProjectTypes?: Set<ProjectType>, title?: string, sortBy?: ProjectsSortBy, sortDirection?: SortDirection, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
|
|
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>page, 'page');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>size, 'size');
|
|
if (selectedProjectTypes) {
|
|
selectedProjectTypes.forEach((element) => {
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>element, 'selected_project_types');
|
|
})
|
|
}
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>title, 'title');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>sortBy, 'sort_by');
|
|
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
|
<any>sortDirection, 'sort_direction');
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
|
'application/json'
|
|
]);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
let responseType_: 'text' | 'json' | '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<FundingProjectPage>('get', `${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|