Files
smartguide/webapp/src/app/api/api/projects.service.ts
T
2026-07-24 01:59:12 +02:00

2014 lines
63 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 { DfgProjectDetails } from '../model/dfgProjectDetails';
// @ts-ignore
import { DfgProjectPage } from '../model/dfgProjectPage';
// @ts-ignore
import { EuCordisOrganizationSelectorPage } from '../model/euCordisOrganizationSelectorPage';
// @ts-ignore
import { EuCordisProjectResponse } from '../model/euCordisProjectResponse';
// @ts-ignore
import { EuCordisProjectSearchPage } from '../model/euCordisProjectSearchPage';
// @ts-ignore
import { EuCordisProjectType } from '../model/euCordisProjectType';
// @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,
},
);
}
/**
* 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<EuCordisOrganizationSelectorPage>;
public getEuOrganizationAutocompleteForSelector(
query?: string,
page?: number,
size?: number,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<EuCordisOrganizationSelectorPage>>;
public getEuOrganizationAutocompleteForSelector(
query?: string,
page?: number,
size?: number,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<EuCordisOrganizationSelectorPage>>;
public getEuOrganizationAutocompleteForSelector(
query?: string,
page?: number,
size?: number,
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>query,
'query',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>page,
'page',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>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<EuCordisOrganizationSelectorPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>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<string>,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<EuCordisOrganizationSelectorPage>;
public getEuOrganizationsByIds(
organizationIds?: Array<string>,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpResponse<EuCordisOrganizationSelectorPage>>;
public getEuOrganizationsByIds(
organizationIds?: Array<string>,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<HttpEvent<EuCordisOrganizationSelectorPage>>;
public getEuOrganizationsByIds(
organizationIds?: Array<string>,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
): Observable<any> {
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
if (organizationIds) {
organizationIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>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<EuCordisOrganizationSelectorPage>(
'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 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,
},
);
}
/**
* 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 institutionIds Institution IDs 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<string>,
fundingArts?: Array<string>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
institutionIds?: 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<BundProjectPage>;
public searchBundProjectsWithFilters(
executingAgency?: Array<string>,
fundingArts?: Array<string>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
institutionIds?: 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<BundProjectPage>>;
public searchBundProjectsWithFilters(
executingAgency?: Array<string>,
fundingArts?: Array<string>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
institutionIds?: 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<BundProjectPage>>;
public searchBundProjectsWithFilters(
executingAgency?: Array<string>,
fundingArts?: Array<string>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
institutionIds?: 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 });
if (executingAgency) {
executingAgency.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'executing_agency',
);
});
}
if (fundingArts) {
fundingArts.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'funding_arts',
);
});
}
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',
);
});
}
if (countries) {
countries.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'countries',
);
});
}
if (institutionIds) {
institutionIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'institution_ids',
);
});
}
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/bund/search`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<BundProjectPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>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<string>,
organizationIds?: Array<string>,
organizationNames?: Array<string>,
projectTypes?: Array<EuCordisProjectType>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
frameworkProgrammes?: Array<string>,
fundingSchemes?: Array<string>,
statuses?: 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<EuCordisProjectSearchPage>;
public searchEuCordisProjects(
rawOaInstitutionId?: string,
authorId?: string,
authorIds?: Array<string>,
organizationIds?: Array<string>,
organizationNames?: Array<string>,
projectTypes?: Array<EuCordisProjectType>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
frameworkProgrammes?: Array<string>,
fundingSchemes?: Array<string>,
statuses?: 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<EuCordisProjectSearchPage>>;
public searchEuCordisProjects(
rawOaInstitutionId?: string,
authorId?: string,
authorIds?: Array<string>,
organizationIds?: Array<string>,
organizationNames?: Array<string>,
projectTypes?: Array<EuCordisProjectType>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
frameworkProgrammes?: Array<string>,
fundingSchemes?: Array<string>,
statuses?: 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<EuCordisProjectSearchPage>>;
public searchEuCordisProjects(
rawOaInstitutionId?: string,
authorId?: string,
authorIds?: Array<string>,
organizationIds?: Array<string>,
organizationNames?: Array<string>,
projectTypes?: Array<EuCordisProjectType>,
title?: string,
keywords?: Array<string>,
topicIds?: Array<string>,
filterTopicIds?: Array<string>,
fundingStartYears?: Array<string>,
fundingEndYears?: Array<string>,
countries?: Array<string>,
frameworkProgrammes?: Array<string>,
fundingSchemes?: Array<string>,
statuses?: 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>rawOaInstitutionId,
'raw_oa_institution_id',
);
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>authorId,
'author_id',
);
if (authorIds) {
authorIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'author_ids',
);
});
}
if (organizationIds) {
organizationIds.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'organization_ids',
);
});
}
if (organizationNames) {
organizationNames.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'organization_names',
);
});
}
if (projectTypes) {
projectTypes.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'project_types',
);
});
}
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',
);
});
}
if (countries) {
countries.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'countries',
);
});
}
if (frameworkProgrammes) {
frameworkProgrammes.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'framework_programmes',
);
});
}
if (fundingSchemes) {
fundingSchemes.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'funding_schemes',
);
});
}
if (statuses) {
statuses.forEach((element) => {
localVarQueryParameters = this.addToHttpParams(
localVarQueryParameters,
<any>element,
'statuses',
);
});
}
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/eu/search`;
const { basePath, withCredentials } = this.configuration;
return this.httpClient.request<EuCordisProjectSearchPage>(
'get',
`${basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
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., \&#39;bund\&#39;, \&#39;eu\&#39;, \&#39;dfg\&#39;). 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,
},
);
}
}