diff --git a/service/src/main/inse/models/topic_count.py b/service/src/main/inse/models/topic_count.py index fa4a2fcf..445ef480 100644 --- a/service/src/main/inse/models/topic_count.py +++ b/service/src/main/inse/models/topic_count.py @@ -7,3 +7,4 @@ class TopicCount(BaseModel): id: Optional[str] = Field(default=None, description="The topic id.") name: str = Field(description="The topic display name.") count: int = Field(default=0, description="The number of occurrences.") + description: Optional[str] = Field(default=None, description="The topic description.") diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py index 27c15dac..642f05d0 100644 --- a/service/src/main/inse/works/logic.py +++ b/service/src/main/inse/works/logic.py @@ -14,6 +14,7 @@ from starlette.status import HTTP_502_BAD_GATEWAY from starlette.status import HTTP_404_NOT_FOUND from starlette.status import HTTP_503_SERVICE_UNAVAILABLE +from inse.integrations import elasticsearch from inse.models.work import Work from inse.models.work_page import WorkPage from inse.models.works_list_response import WorksListResponse @@ -115,36 +116,43 @@ async def get_primary_topic_counts( items = sorted(counts.values(), key=lambda item: item["count"], reverse=True) + topic_ids = [item["id"] for item in items if item["id"]] + descriptions = _get_topic_descriptions(topic_ids) + return [ - TopicCount(id=item["id"], name=item["name"], count=item["count"]) + TopicCount( + id=item["id"], + name=item["name"], + count=item["count"], + description=descriptions.get(item["id"]), + ) for item in items ] +def _get_topic_descriptions(topic_ids: List[str]) -> dict[str, str]: + if not topic_ids: + return {} -async def get_work( - work_id: str, - client: OpenAlexWorksSearchClient | None = None, -) -> Work: - search_client = client or OpenAlexWorksSearchClient() try: - data = await search_client.search_work(work_id) - except MissingApiKeyError as exc: - raise HTTPException( - status_code=HTTP_503_SERVICE_UNAVAILABLE, - detail="OpenAlex works search is not configured.", - ) from exc - except httpx.HTTPError as exc: - raise HTTPException( - status_code=HTTP_502_BAD_GATEWAY, - detail="OpenAlex works search request failed.", - ) from exc - elements, _ = _parse_full_work_search_response(data) - if not elements: - raise HTTPException( - status_code=HTTP_404_NOT_FOUND, - detail="Publication not found.", + response = elasticsearch.search( + index="openalex-topics", + query={"terms": {"id": topic_ids}}, + source=["id", "description"], + size=len(topic_ids), ) - return elements[0] + except httpx.HTTPError: + logger.exception("Could not load topic descriptions from Elasticsearch.") + return {} + + descriptions = {} + for hit in response.get("hits", {}).get("hits", []): + source = hit.get("_source", {}) + topic_id = source.get("id") + description = source.get("description") + if topic_id and description: + descriptions[topic_id] = description + + return descriptions def _limit_works_by_complete_years( diff --git a/webapp/src/app/api/.openapi-generator/FILES b/webapp/src/app/api/.openapi-generator/FILES index f5876c65..9779c964 100644 --- a/webapp/src/app/api/.openapi-generator/FILES +++ b/webapp/src/app/api/.openapi-generator/FILES @@ -1,109 +1,117 @@ .gitignore -.openapi-generator-ignore README.md api.base.service.ts api.module.ts api/api.ts api/funding.service.ts -api/iNSEAccountService.service.ts -api/iNSEService.service.ts +api/funding.serviceInterface.ts +api/inse-account-service.service.ts +api/inse-account-service.serviceInterface.ts +api/inse-service.service.ts +api/inse-service.serviceInterface.ts api/institutions.service.ts +api/institutions.serviceInterface.ts api/items.service.ts -api/personNetwork.service.ts +api/items.serviceInterface.ts +api/person-network.service.ts +api/person-network.serviceInterface.ts api/persons.service.ts +api/persons.serviceInterface.ts api/topics.service.ts +api/topics.serviceInterface.ts api/works.service.ts +api/works.serviceInterface.ts configuration.ts encoder.ts git_push.sh index.ts -model/accessGrant.ts -model/authAccount.ts -model/authScope.ts +model/access-grant.ts +model/auth-account.ts +model/auth-scope.ts +model/author-affiliations-inner.ts +model/author-counts-by-year-inner.ts +model/author-ids.ts +model/author-network-node.ts +model/author-parsed-longest-name.ts +model/author-position-count.ts +model/author-summary-stats.ts model/author.ts -model/authorAffiliationsInner.ts -model/authorCountsByYearInner.ts -model/authorIds.ts -model/authorNetworkNode.ts -model/authorParsedLongestName.ts -model/authorPositionCount.ts -model/authorSummaryStats.ts -model/authorsFilterProperties.ts -model/authorsListResponse.ts +model/authors-filter-properties.ts +model/authors-list-response.ts model/authorship.ts -model/autocompleteResponse.ts -model/autocompleteResponseMeta.ts -model/autocompleteResponseResultsInner.ts +model/autocomplete-response-meta.ts +model/autocomplete-response-results-inner.ts +model/autocomplete-response.ts model/award.ts -model/collaborationNetwork.ts -model/collaborationNetworkEdge.ts -model/collaborationNetworkNodeType.ts -model/costUsd.ts -model/customAuthor.ts -model/customAuthorsListResponse.ts -model/dehydratedAuthor.ts -model/dehydratedFunder.ts -model/dehydratedInstitution.ts -model/dehydratedSource.ts -model/filterInformation.ts -model/filterProperties.ts -model/funderByAuthor.ts -model/fundersByAuthorResponse.ts +model/collaboration-network-edge.ts +model/collaboration-network-node-type.ts +model/collaboration-network.ts +model/cost-usd.ts +model/custom-author.ts +model/custom-authors-list-response.ts +model/dehydrated-author.ts +model/dehydrated-funder.ts +model/dehydrated-institution.ts +model/dehydrated-source.ts +model/filter-information.ts +model/filter-properties.ts +model/funder-by-author.ts +model/funders-by-author-response.ts model/fwci.ts -model/groupByResult.ts -model/hTTPValidationError.ts -model/identityGrant.ts +model/group-by-result.ts +model/http-validation-error.ts +model/identity-grant.ts +model/institution-geo.ts +model/institution-ids.ts +model/institution-information.ts +model/institution-network-node.ts model/institution.ts -model/institutionGeo.ts -model/institutionIds.ts -model/institutionInformation.ts -model/institutionNetworkNode.ts -model/institutionsListResponse.ts +model/institutions-list-response.ts +model/item-create.ts +model/item-page.ts model/item.ts -model/itemCreate.ts -model/itemPage.ts model/latitude.ts model/location.ts model/longitude.ts model/meta.ts -model/model2YrMeanCitedness.ts +model/model2-yr-mean-citedness.ts model/models.ts -model/openAccess.ts -model/personBio.ts -model/publicationIdsByAuthorPosition.ts -model/publicationsByAuthorResponse.ts +model/open-access.ts +model/person-bio.ts +model/publication-ids-by-author-position.ts +model/publications-by-author-response.ts model/score.ts +model/topic-count.ts +model/topic-domain.ts +model/topic-field.ts +model/topic-ids.ts +model/topic-subfield.ts model/topic.ts -model/topicCount.ts -model/topicDomain.ts -model/topicField.ts -model/topicIds.ts -model/topicSubfield.ts -model/topicsByTime.ts -model/topicsByYear.ts -model/topicsListResponse.ts -model/validationError.ts -model/validationErrorLocInner.ts +model/topics-by-time.ts +model/topics-by-year.ts +model/topics-list-response.ts +model/validation-error-loc-inner.ts +model/validation-error.ts model/value.ts +model/work-biblio.ts +model/work-citation-normalized-percentile.ts +model/work-cited-by-percentile-year.ts +model/work-counts-by-year-inner.ts +model/work-has-content.ts +model/work-ids.ts +model/work-keyword.ts +model/work-mesh-inner.ts +model/work-network-node.ts +model/work-page.ts +model/work-sustainable-development-goals-inner.ts +model/work-topic-domain.ts +model/work-topic-field.ts +model/work-topic-information.ts +model/work-topic-subfield.ts +model/work-topic.ts model/work.ts -model/workBiblio.ts -model/workCitationNormalizedPercentile.ts -model/workCitedByPercentileYear.ts -model/workCountsByYearInner.ts -model/workHasContent.ts -model/workIds.ts -model/workKeyword.ts -model/workMeshInner.ts -model/workNetworkNode.ts -model/workPage.ts -model/workSustainableDevelopmentGoalsInner.ts -model/workTopic.ts -model/workTopicDomain.ts -model/workTopicField.ts -model/workTopicInformation.ts -model/workTopicSubfield.ts -model/worksFilterProperties.ts -model/worksListResponse.ts +model/works-filter-properties.ts +model/works-list-response.ts param.ts provide-api.ts variables.ts diff --git a/webapp/src/app/api/api/api.ts b/webapp/src/app/api/api/api.ts index ea1f3603..4227c79f 100644 --- a/webapp/src/app/api/api/api.ts +++ b/webapp/src/app/api/api/api.ts @@ -1,19 +1,28 @@ export * from './funding.service'; import { FundingService } from './funding.service'; -export * from './iNSEAccountService.service'; -import { INSEAccountServiceService } from './iNSEAccountService.service'; -export * from './iNSEService.service'; -import { INSEServiceService } from './iNSEService.service'; +export * from './funding.serviceInterface'; +export * from './inse-account-service.service'; +import { INSEAccountServiceService } from './inse-account-service.service'; +export * from './inse-account-service.serviceInterface'; +export * from './inse-service.service'; +import { INSEServiceService } from './inse-service.service'; +export * from './inse-service.serviceInterface'; export * from './institutions.service'; import { InstitutionsService } from './institutions.service'; +export * from './institutions.serviceInterface'; export * from './items.service'; import { ItemsService } from './items.service'; -export * from './personNetwork.service'; -import { PersonNetworkService } from './personNetwork.service'; +export * from './items.serviceInterface'; +export * from './person-network.service'; +import { PersonNetworkService } from './person-network.service'; +export * from './person-network.serviceInterface'; export * from './persons.service'; import { PersonsService } from './persons.service'; +export * from './persons.serviceInterface'; export * from './topics.service'; import { TopicsService } from './topics.service'; +export * from './topics.serviceInterface'; export * from './works.service'; import { WorksService } from './works.service'; +export * from './works.serviceInterface'; export const APIS = [FundingService, INSEAccountServiceService, INSEServiceService, InstitutionsService, ItemsService, PersonNetworkService, PersonsService, TopicsService, WorksService]; diff --git a/webapp/src/app/api/api/funding.service.ts b/webapp/src/app/api/api/funding.service.ts index 46772768..17619786 100644 --- a/webapp/src/app/api/api/funding.service.ts +++ b/webapp/src/app/api/api/funding.service.ts @@ -17,23 +17,26 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { FundersByAuthorResponse } from '../model/fundersByAuthorResponse'; +import { FundersByAuthorResponse } from '../model/funders-by-author-response'; // @ts-ignore -import { HTTPValidationError } from '../model/hTTPValidationError'; +import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore -import { PublicationsByAuthorResponse } from '../model/publicationsByAuthorResponse'; +import { PublicationsByAuthorResponse } from '../model/publications-by-author-response'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { + FundingServiceInterface +} from './funding.serviceInterface'; @Injectable({ providedIn: 'root' }) -export class FundingService extends BaseService { +export class FundingService extends BaseService implements FundingServiceInterface { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { super(basePath, configuration); diff --git a/webapp/src/app/api/api/funding.serviceInterface.ts b/webapp/src/app/api/api/funding.serviceInterface.ts new file mode 100644 index 00000000..86b8b171 --- /dev/null +++ b/webapp/src/app/api/api/funding.serviceInterface.ts @@ -0,0 +1,45 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { FundersByAuthorResponse } from '../model/models'; +import { HTTPValidationError } from '../model/models'; +import { PublicationsByAuthorResponse } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface FundingServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Get funding organizations by author. + * + * @endpoint get /api/inse-service/authors/{author_id}/funders + * @param authorId + */ + getFundersByAuthor(authorId: string, extraHttpRequestParams?: any): Observable; + + /** + * Get funded publications by author. + * + * @endpoint get /api/inse-service/authors/{author_id}/publications + * @param authorId + * @param page + * @param pageSize + */ + getPublicationsByAuthor(authorId: string, page?: number, pageSize?: number, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/inse-account-service.service.ts b/webapp/src/app/api/api/inse-account-service.service.ts new file mode 100644 index 00000000..ef79eace --- /dev/null +++ b/webapp/src/app/api/api/inse-account-service.service.ts @@ -0,0 +1,216 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { AccessGrant } from '../model/access-grant'; +// @ts-ignore +import { HTTPValidationError } from '../model/http-validation-error'; +// @ts-ignore +import { IdentityGrant } from '../model/identity-grant'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; +import { + INSEAccountServiceServiceInterface +} from './inse-account-service.serviceInterface'; + + + +@Injectable({ + providedIn: 'root' +}) +export class INSEAccountServiceService extends BaseService implements INSEAccountServiceServiceInterface { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get Access Grant + * @endpoint post /inse-account/auth/access + * @param secret + * @param account + * @param organization + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (secret === null || secret === undefined) { + throw new Error('Required parameter secret was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.'); + } + if (account === null || account === undefined) { + throw new Error('Required parameter account was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.'); + } + if (organization === null || organization === undefined) { + throw new Error('Required parameter organization was null or undefined when calling getAccessGrantInseAccountAuthAccessPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/x-www-form-urlencoded' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (secret !== undefined) { + localVarFormParams = localVarFormParams.append('secret', secret) as any || localVarFormParams; + } + if (account !== undefined) { + localVarFormParams = localVarFormParams.append('account', account) as any || localVarFormParams; + } + if (organization !== undefined) { + localVarFormParams = localVarFormParams.append('organization', organization) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/inse-account/auth/access`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Get Identity Grant + * @endpoint post /inse-account/auth/id + * @param username + * @param password + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getIdentityGrantInseAccountAuthIdPost(username: string, password: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (username === null || username === undefined) { + throw new Error('Required parameter username was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.'); + } + if (password === null || password === undefined) { + throw new Error('Required parameter password was null or undefined when calling getIdentityGrantInseAccountAuthIdPost.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/x-www-form-urlencoded' + ]; + + const canConsumeForm = this.canConsumeForm(consumes); + + let localVarFormParams: { append(param: string, value: any): any; }; + let localVarUseForm = false; + let localVarConvertFormParamsToString = false; + if (localVarUseForm) { + localVarFormParams = new FormData(); + } else { + localVarFormParams = new HttpParams({encoder: this.encoder}); + } + + if (username !== undefined) { + localVarFormParams = localVarFormParams.append('username', username) as any || localVarFormParams; + } + if (password !== undefined) { + localVarFormParams = localVarFormParams.append('password', password) as any || localVarFormParams; + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/inse-account/auth/id`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/webapp/src/app/api/api/inse-account-service.serviceInterface.ts b/webapp/src/app/api/api/inse-account-service.serviceInterface.ts new file mode 100644 index 00000000..2cb6b360 --- /dev/null +++ b/webapp/src/app/api/api/inse-account-service.serviceInterface.ts @@ -0,0 +1,46 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { AccessGrant } from '../model/models'; +import { HTTPValidationError } from '../model/models'; +import { IdentityGrant } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface INSEAccountServiceServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Get Access Grant + * + * @endpoint post /inse-account/auth/access + * @param secret + * @param account + * @param organization + */ + getAccessGrantInseAccountAuthAccessPost(secret: string, account: number, organization: number, extraHttpRequestParams?: any): Observable; + + /** + * Get Identity Grant + * + * @endpoint post /inse-account/auth/id + * @param username + * @param password + */ + getIdentityGrantInseAccountAuthIdPost(username: string, password: string, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/inse-service.service.ts b/webapp/src/app/api/api/inse-service.service.ts new file mode 100644 index 00000000..b70b3ff0 --- /dev/null +++ b/webapp/src/app/api/api/inse-service.service.ts @@ -0,0 +1,541 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { HTTPValidationError } from '../model/http-validation-error'; +// @ts-ignore +import { Item } from '../model/item'; +// @ts-ignore +import { ItemCreate } from '../model/item-create'; +// @ts-ignore +import { ItemPage } from '../model/item-page'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; +import { + INSEServiceServiceInterface +} from './inse-service.serviceInterface'; + + + +@Injectable({ + providedIn: 'root' +}) +export class INSEServiceService extends BaseService implements INSEServiceServiceInterface { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Adds a new item. + * @endpoint post /api/inse-service/items + * @param itemCreate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public addItem(itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public addItem(itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public addItem(itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public addItem(itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (itemCreate === null || itemCreate === undefined) { + throw new Error('Required parameter itemCreate was null or undefined when calling addItem.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: itemCreate, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Builds the topic hierarchy cache. + * @endpoint get /api/inse-service/topics/cache + * @param pageSize Page size for each search page. + * @param saveJson Persist cache JSON to data folder. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public buildTopicCache(pageSize?: number, saveJson?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'page_size'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + saveJson, 'save_json'); + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/topics/cache`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Counts topic hierarchy occurrences from cache. + * @endpoint get /api/inse-service/topics/count + * @param topic Topic names (repeat parameter). + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public countTopicHierarchy(topic: Array, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public countTopicHierarchy(topic: Array, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public countTopicHierarchy(topic: Array, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public countTopicHierarchy(topic: Array, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (topic === null || topic === undefined) { + throw new Error('Required parameter topic was null or undefined when calling countTopicHierarchy.'); + } + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (topic) { + topic.forEach((element) => { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + element, 'topic'); + }) + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/topics/count`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Deletes the item with the id. + * @endpoint delete /api/inse-service/items/{id} + * @param id The item id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteItem(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteItem.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('delete', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns the item with the id. + * @endpoint get /api/inse-service/items/{id} + * @param id The item id. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getItem(id: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getItem(id: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItem(id: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItem(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling getItem.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns a page of items. + * @endpoint get /api/inse-service/items + * @param pageOffset The page offset. + * @param pageSize The page size. + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getItems(pageOffset?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getItems(pageOffset?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItems(pageOffset?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getItems(pageOffset?: number, pageSize?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageOffset, 'pageOffset'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). + * @endpoint get /api/inse-service/topics/hierarchy + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTopicHierarchy(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicHierarchy(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicHierarchy(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicHierarchy(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/topics/hierarchy`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + + /** + * Updates the item with the id. + * @endpoint put /api/inse-service/items/{id} + * @param id The item id. + * @param itemCreate + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateItem(id: number, itemCreate: ItemCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateItem(id: number, itemCreate: ItemCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling updateItem.'); + } + if (itemCreate === null || itemCreate === undefined) { + throw new Error('Required parameter itemCreate was null or undefined when calling updateItem.'); + } + + let localVarHeaders = this.defaultHeaders; + + // authentication (bearer) required + localVarHeaders = this.configuration.addCredentialToHeaders('bearer', 'Authorization', localVarHeaders, 'Bearer '); + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/inse-service/items/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: itemCreate, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/webapp/src/app/api/api/inse-service.serviceInterface.ts b/webapp/src/app/api/api/inse-service.serviceInterface.ts new file mode 100644 index 00000000..8a2622fa --- /dev/null +++ b/webapp/src/app/api/api/inse-service.serviceInterface.ts @@ -0,0 +1,94 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { HTTPValidationError } from '../model/models'; +import { Item } from '../model/models'; +import { ItemCreate } from '../model/models'; +import { ItemPage } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface INSEServiceServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Adds a new item. + * + * @endpoint post /api/inse-service/items + * @param itemCreate + */ + addItem(itemCreate: ItemCreate, extraHttpRequestParams?: any): Observable; + + /** + * Builds the topic hierarchy cache. + * + * @endpoint get /api/inse-service/topics/cache + * @param pageSize Page size for each search page. + * @param saveJson Persist cache JSON to data folder. + */ + buildTopicCache(pageSize?: number, saveJson?: boolean, extraHttpRequestParams?: any): Observable; + + /** + * Counts topic hierarchy occurrences from cache. + * + * @endpoint get /api/inse-service/topics/count + * @param topic Topic names (repeat parameter). + */ + countTopicHierarchy(topic: Array, extraHttpRequestParams?: any): Observable; + + /** + * Deletes the item with the id. + * + * @endpoint delete /api/inse-service/items/{id} + * @param id The item id. + */ + deleteItem(id: number, extraHttpRequestParams?: any): Observable; + + /** + * Returns the item with the id. + * + * @endpoint get /api/inse-service/items/{id} + * @param id The item id. + */ + getItem(id: number, extraHttpRequestParams?: any): Observable; + + /** + * Returns a page of items. + * + * @endpoint get /api/inse-service/items + * @param pageOffset The page offset. + * @param pageSize The page size. + */ + getItems(pageOffset?: number, pageSize?: number, extraHttpRequestParams?: any): Observable; + + /** + * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). + * + * @endpoint get /api/inse-service/topics/hierarchy + */ + getTopicHierarchy(extraHttpRequestParams?: any): Observable; + + /** + * Updates the item with the id. + * + * @endpoint put /api/inse-service/items/{id} + * @param id The item id. + * @param itemCreate + */ + updateItem(id: number, itemCreate: ItemCreate, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/institutions.service.ts b/webapp/src/app/api/api/institutions.service.ts index ff8895a9..23739da2 100644 --- a/webapp/src/app/api/api/institutions.service.ts +++ b/webapp/src/app/api/api/institutions.service.ts @@ -17,23 +17,26 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { AutocompleteResponse } from '../model/autocompleteResponse'; +import { AutocompleteResponse } from '../model/autocomplete-response'; // @ts-ignore -import { HTTPValidationError } from '../model/hTTPValidationError'; +import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore -import { InstitutionsListResponse } from '../model/institutionsListResponse'; +import { InstitutionsListResponse } from '../model/institutions-list-response'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { + InstitutionsServiceInterface +} from './institutions.serviceInterface'; @Injectable({ providedIn: 'root' }) -export class InstitutionsService extends BaseService { +export class InstitutionsService extends BaseService implements InstitutionsServiceInterface { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { super(basePath, configuration); diff --git a/webapp/src/app/api/api/institutions.serviceInterface.ts b/webapp/src/app/api/api/institutions.serviceInterface.ts new file mode 100644 index 00000000..7dc7be7d --- /dev/null +++ b/webapp/src/app/api/api/institutions.serviceInterface.ts @@ -0,0 +1,54 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { AutocompleteResponse } from '../model/models'; +import { HTTPValidationError } from '../model/models'; +import { InstitutionsListResponse } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface InstitutionsServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Returns institution options for autocomplete inputs. + * + * @endpoint get /api/institutions/autocomplete + * @param query Institution search text, for example \'Duisburg Essen\'. + * @param countryCode Optional ISO country code filter. + * @param type Optional institution type filter. + * @param limit Maximum number of autocomplete options. + */ + autocompleteInstitutions(query: string, countryCode?: string, type?: string, limit?: number, extraHttpRequestParams?: any): Observable; + + /** + * Returns a list of OpenAlex institutions. + * + * @endpoint get /api/institutions + * @param search Full-text search, for example \'Duisburg Essen\'. + * @param filter OpenAlex filter, for example \'country_code:DE,type:education\'. + * @param sort Sort field, for example \'works_count:desc\'. + * @param groupBy OpenAlex group_by field, for example \'country_code\'. + * @param perPage Results per page. + * @param page Page number. Use cursor for deep pagination. + * @param cursor Cursor pagination token. Use \'*\' to start. + * @param sample Random sample size. Cannot be combined with sort or page. + * @param select Comma-separated fields to return. + */ + listInstitutions(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/items.service.ts b/webapp/src/app/api/api/items.service.ts index 69cd8e54..1d00c8c8 100644 --- a/webapp/src/app/api/api/items.service.ts +++ b/webapp/src/app/api/api/items.service.ts @@ -17,25 +17,28 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { HTTPValidationError } from '../model/hTTPValidationError'; +import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore import { Item } from '../model/item'; // @ts-ignore -import { ItemCreate } from '../model/itemCreate'; +import { ItemCreate } from '../model/item-create'; // @ts-ignore -import { ItemPage } from '../model/itemPage'; +import { ItemPage } from '../model/item-page'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { + ItemsServiceInterface +} from './items.serviceInterface'; @Injectable({ providedIn: 'root' }) -export class ItemsService extends BaseService { +export class ItemsService extends BaseService implements ItemsServiceInterface { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { super(basePath, configuration); diff --git a/webapp/src/app/api/api/items.serviceInterface.ts b/webapp/src/app/api/api/items.serviceInterface.ts new file mode 100644 index 00000000..140cbec0 --- /dev/null +++ b/webapp/src/app/api/api/items.serviceInterface.ts @@ -0,0 +1,70 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { HTTPValidationError } from '../model/models'; +import { Item } from '../model/models'; +import { ItemCreate } from '../model/models'; +import { ItemPage } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface ItemsServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Adds a new item. + * + * @endpoint post /api/inse-service/items + * @param itemCreate + */ + addItem(itemCreate: ItemCreate, extraHttpRequestParams?: any): Observable; + + /** + * Deletes the item with the id. + * + * @endpoint delete /api/inse-service/items/{id} + * @param id The item id. + */ + deleteItem(id: number, extraHttpRequestParams?: any): Observable; + + /** + * Returns the item with the id. + * + * @endpoint get /api/inse-service/items/{id} + * @param id The item id. + */ + getItem(id: number, extraHttpRequestParams?: any): Observable; + + /** + * Returns a page of items. + * + * @endpoint get /api/inse-service/items + * @param pageOffset The page offset. + * @param pageSize The page size. + */ + getItems(pageOffset?: number, pageSize?: number, extraHttpRequestParams?: any): Observable; + + /** + * Updates the item with the id. + * + * @endpoint put /api/inse-service/items/{id} + * @param id The item id. + * @param itemCreate + */ + updateItem(id: number, itemCreate: ItemCreate, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/person-network.service.ts b/webapp/src/app/api/api/person-network.service.ts new file mode 100644 index 00000000..135a20d8 --- /dev/null +++ b/webapp/src/app/api/api/person-network.service.ts @@ -0,0 +1,112 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { CollaborationNetwork } from '../model/collaboration-network'; +// @ts-ignore +import { FilterProperties } from '../model/filter-properties'; +// @ts-ignore +import { HTTPValidationError } from '../model/http-validation-error'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; +import { BaseService } from '../api.base.service'; +import { + PersonNetworkServiceInterface +} from './person-network.serviceInterface'; + + + +@Injectable({ + providedIn: 'root' +}) +export class PersonNetworkService extends BaseService implements PersonNetworkServiceInterface { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * Get a person\'s collaboration network. + * Returns a person\'s collaboration network based on their works and co-authors. + * @endpoint post /api/person/network/{raw_user_id} + * @param rawUserId The raw user ID of the person. + * @param filterProperties + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (rawUserId === null || rawUserId === undefined) { + throw new Error('Required parameter rawUserId was null or undefined when calling getCollaborationNetwork.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/api/person/network/${this.configuration.encodeParam({name: "rawUserId", value: rawUserId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + const { basePath, withCredentials } = this.configuration; + return this.httpClient.request('post', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: filterProperties, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/webapp/src/app/api/api/person-network.serviceInterface.ts b/webapp/src/app/api/api/person-network.serviceInterface.ts new file mode 100644 index 00000000..58e7a1fb --- /dev/null +++ b/webapp/src/app/api/api/person-network.serviceInterface.ts @@ -0,0 +1,36 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { CollaborationNetwork } from '../model/models'; +import { FilterProperties } from '../model/models'; +import { HTTPValidationError } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface PersonNetworkServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Get a person\'s collaboration network. + * Returns a person\'s collaboration network based on their works and co-authors. + * @endpoint post /api/person/network/{raw_user_id} + * @param rawUserId The raw user ID of the person. + * @param filterProperties + */ + getCollaborationNetwork(rawUserId: string, filterProperties?: FilterProperties, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/persons.service.ts b/webapp/src/app/api/api/persons.service.ts index a45848ef..b93da20a 100644 --- a/webapp/src/app/api/api/persons.service.ts +++ b/webapp/src/app/api/api/persons.service.ts @@ -17,25 +17,28 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { AuthorsListResponse } from '../model/authorsListResponse'; +import { AuthorsListResponse } from '../model/authors-list-response'; // @ts-ignore -import { CustomAuthorsListResponse } from '../model/customAuthorsListResponse'; +import { CustomAuthorsListResponse } from '../model/custom-authors-list-response'; // @ts-ignore -import { HTTPValidationError } from '../model/hTTPValidationError'; +import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore -import { PersonBio } from '../model/personBio'; +import { PersonBio } from '../model/person-bio'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { + PersonsServiceInterface +} from './persons.serviceInterface'; @Injectable({ providedIn: 'root' }) -export class PersonsService extends BaseService { +export class PersonsService extends BaseService implements PersonsServiceInterface { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { super(basePath, configuration); diff --git a/webapp/src/app/api/api/persons.serviceInterface.ts b/webapp/src/app/api/api/persons.serviceInterface.ts new file mode 100644 index 00000000..0c634b4d --- /dev/null +++ b/webapp/src/app/api/api/persons.serviceInterface.ts @@ -0,0 +1,159 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { AuthorsListResponse } from '../model/models'; +import { CustomAuthorsListResponse } from '../model/models'; +import { HTTPValidationError } from '../model/models'; +import { PersonBio } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface PersonsServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Generates a bio for a person by author ID. + * + * @endpoint get /api/inse-service/persons/bio + * @param authorId OpenAlex author ID (e.g., A5093075883) + * @param include Comma-separated list to include tags + */ + generatePersonBio(authorId: string, include?: string, extraHttpRequestParams?: any): Observable; + + /** + * Searches for person by ID. + * + * @endpoint get /api/inse-service/person/{id} + * @param id OpenAlex author ID + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + */ + getPersonByID(id: string, include: string, extraHttpRequestParams?: any): Observable; + + /** + * Searches for person by ID. + * + * @endpoint get /api/inse-service/person/{id} + * @param id OpenAlex author ID + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + */ + getPersonByID_1(id: string, include: string, extraHttpRequestParams?: any): Observable; + + /** + * Searches for persons by ID or name. + * + * @endpoint get /api/inse-service/persons/search + * @param authorId OpenAlex author ID (e.g., A5093075883) + * @param query Search query (e.g., Arman AND Arzani) + * @param include Comma-separated include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, sources, counts_by_year, works_api_url, dates, cited_by_count_boost + */ + searchPersons(authorId?: string, query?: string, include?: string, extraHttpRequestParams?: any): Observable; + + /** + * Searches for person by name. + * + * @endpoint get /api/inse-service/persons/autocomplete + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + */ + searchPersonsAutocomplete(authorName: string, include: string, extraHttpRequestParams?: any): Observable; + + /** + * Searches for person by name. + * + * @endpoint get /api/inse-service/persons/autocomplete + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + */ + searchPersonsAutocomplete_2(authorName: string, include: string, extraHttpRequestParams?: any): Observable; + + /** + * Searches for persons by institution name. + * + * @endpoint get /api/inse-service/persons/searchByInstitution + * @param institutionName Institution name (e.g., MIT, Oxford University) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + */ + searchPersonsByInstitution(institutionName: string, include: string, limit?: number, pageOffset?: number, extraHttpRequestParams?: any): Observable; + + /** + * Searches for persons by institution name. + * + * @endpoint get /api/inse-service/persons/searchByInstitution + * @param institutionName Institution name (e.g., MIT, Oxford University) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + */ + searchPersonsByInstitution_3(institutionName: string, include: string, limit?: number, pageOffset?: number, extraHttpRequestParams?: any): Observable; + + /** + * Searches for person by name. + * + * @endpoint get /api/inse-service/persons/searchByName + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + */ + searchPersonsByName(authorName: string, include: string, limit?: number, pageOffset?: number, extraHttpRequestParams?: any): Observable; + + /** + * Searches for person by name. + * + * @endpoint get /api/inse-service/persons/searchByName + * @param authorName Authors name (e.g., Arman Arzani) + * @param include Which data do we require? include tags: topics_full, topic_share, summary_stats, ids, last_known_institutions, ... + * @param limit Limit of search page results + * @param pageOffset Offset of the result page + */ + searchPersonsByName_4(authorName: string, include: string, limit?: number, pageOffset?: number, extraHttpRequestParams?: any): Observable; + + /** + * Searches for persons with advanced filters (Topic & Institution) and pagination. + * + * @endpoint get /api/inse-service/persons/search-list + * @param query Search query (e.g., Arman AND Arzani) + * @param institutionName Filter by institution name + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param strict Strict institution search by target year + * @param filterMode Filter mode: \'in\' or \'from\' + * @param filterYear Filter year + */ + searchPersonsList(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, extraHttpRequestParams?: any): Observable; + + /** + * Searches for persons with advanced filters (Topic & Institution) and pagination. + * + * @endpoint get /api/inse-service/persons/search-list + * @param query Search query (e.g., Arman AND Arzani) + * @param institutionName Filter by institution name + * @param topic Filter by topic display names + * @param page Page number (1-indexed) + * @param pageSize Results per page + * @param include Comma-separated include tags + * @param strict Strict institution search by target year + * @param filterMode Filter mode: \'in\' or \'from\' + * @param filterYear Filter year + */ + searchPersonsList_5(query?: string, institutionName?: string, topic?: Array, page?: number, pageSize?: number, include?: string, strict?: boolean, filterMode?: string, filterYear?: number, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/topics.service.ts b/webapp/src/app/api/api/topics.service.ts index 2667546d..d0874989 100644 --- a/webapp/src/app/api/api/topics.service.ts +++ b/webapp/src/app/api/api/topics.service.ts @@ -17,23 +17,26 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { AutocompleteResponse } from '../model/autocompleteResponse'; +import { AutocompleteResponse } from '../model/autocomplete-response'; // @ts-ignore -import { HTTPValidationError } from '../model/hTTPValidationError'; +import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore -import { TopicsListResponse } from '../model/topicsListResponse'; +import { TopicsListResponse } from '../model/topics-list-response'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { + TopicsServiceInterface +} from './topics.serviceInterface'; @Injectable({ providedIn: 'root' }) -export class TopicsService extends BaseService { +export class TopicsService extends BaseService implements TopicsServiceInterface { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { super(basePath, configuration); diff --git a/webapp/src/app/api/api/topics.serviceInterface.ts b/webapp/src/app/api/api/topics.serviceInterface.ts new file mode 100644 index 00000000..f17e7433 --- /dev/null +++ b/webapp/src/app/api/api/topics.serviceInterface.ts @@ -0,0 +1,79 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { AutocompleteResponse } from '../model/models'; +import { HTTPValidationError } from '../model/models'; +import { TopicsListResponse } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface TopicsServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Returns topic options for autocomplete inputs. + * + * @endpoint get /api/topics/autocomplete + * @param query Topic search text, for example \'machine learning\'. + * @param domainId Optional OpenAlex domain id filter. + * @param fieldId Optional OpenAlex field id filter. + * @param subfieldId Optional OpenAlex subfield id filter. + * @param limit Maximum number of autocomplete options. + */ + autocompleteTopics(query: string, domainId?: string, fieldId?: string, subfieldId?: string, limit?: number, extraHttpRequestParams?: any): Observable; + + /** + * Builds the topic hierarchy cache. + * + * @endpoint get /api/inse-service/topics/cache + * @param pageSize Page size for each search page. + * @param saveJson Persist cache JSON to data folder. + */ + buildTopicCache(pageSize?: number, saveJson?: boolean, extraHttpRequestParams?: any): Observable; + + /** + * Counts topic hierarchy occurrences from cache. + * + * @endpoint get /api/inse-service/topics/count + * @param topic Topic names (repeat parameter). + */ + countTopicHierarchy(topic: Array, extraHttpRequestParams?: any): Observable; + + /** + * Returns the nested topic hierarchy (Domains -> Fields -> Subfields -> Topics). + * + * @endpoint get /api/inse-service/topics/hierarchy + */ + getTopicHierarchy(extraHttpRequestParams?: any): Observable; + + /** + * Returns a list of OpenAlex topics. + * + * @endpoint get /api/topics + * @param search Full-text search, for example \'machine learning\'. + * @param filter OpenAlex filter, for example \'domain.id:1,works_count:>1000\'. + * @param sort Sort field, for example \'works_count:desc\'. + * @param groupBy OpenAlex group_by field, for example \'domain.id\'. + * @param perPage Results per page. + * @param page Page number. Use cursor for deep pagination. + * @param cursor Cursor pagination token. Use \'*\' to start. + * @param sample Random sample size. Cannot be combined with sort or page. + * @param select Comma-separated fields to return. + */ + listTopics(search?: string, filter?: string, sort?: string, groupBy?: string, perPage?: number, page?: number, cursor?: string, sample?: number, select?: string, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/api/works.service.ts b/webapp/src/app/api/api/works.service.ts index 63355411..958dbae1 100644 --- a/webapp/src/app/api/api/works.service.ts +++ b/webapp/src/app/api/api/works.service.ts @@ -17,29 +17,32 @@ import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; // @ts-ignore -import { HTTPValidationError } from '../model/hTTPValidationError'; +import { HTTPValidationError } from '../model/http-validation-error'; // @ts-ignore -import { TopicCount } from '../model/topicCount'; +import { TopicCount } from '../model/topic-count'; // @ts-ignore -import { TopicsByTime } from '../model/topicsByTime'; +import { TopicsByTime } from '../model/topics-by-time'; // @ts-ignore import { Work } from '../model/work'; // @ts-ignore -import { WorkPage } from '../model/workPage'; +import { WorkPage } from '../model/work-page'; // @ts-ignore -import { WorksListResponse } from '../model/worksListResponse'; +import { WorksListResponse } from '../model/works-list-response'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { + WorksServiceInterface +} from './works.serviceInterface'; @Injectable({ providedIn: 'root' }) -export class WorksService extends BaseService { +export class WorksService extends BaseService implements WorksServiceInterface { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) { super(basePath, configuration); @@ -268,13 +271,15 @@ export class WorksService extends BaseService { * @endpoint get /api/works/{author_id}/topics-by-time * @param authorId The author id, for example A5023888391. * @param maxTopicsPerYear The maximum number of topics per year. + * @param targetPublications Target number of publications used for the timeline. Complete years are always included. + * @param includeAll If true, all publications are used for the timeline. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { if (authorId === null || authorId === undefined) { throw new Error('Required parameter authorId was null or undefined when calling getTopicsByTimeByAuthor.'); } @@ -282,6 +287,10 @@ export class WorksService extends BaseService { let localVarQueryParameters = new HttpParams({encoder: this.encoder}); localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, maxTopicsPerYear, 'max_topics_per_year'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + targetPublications, 'target_publications'); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + includeAll, 'include_all'); let localVarHeaders = this.defaultHeaders; diff --git a/webapp/src/app/api/api/works.serviceInterface.ts b/webapp/src/app/api/api/works.serviceInterface.ts new file mode 100644 index 00000000..750853b0 --- /dev/null +++ b/webapp/src/app/api/api/works.serviceInterface.ts @@ -0,0 +1,80 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HttpHeaders } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { HTTPValidationError } from '../model/models'; +import { TopicCount } from '../model/models'; +import { TopicsByTime } from '../model/models'; +import { Work } from '../model/models'; +import { WorkPage } from '../model/models'; +import { WorksListResponse } from '../model/models'; + + +import { Configuration } from '../configuration'; + + + +export interface WorksServiceInterface { + defaultHeaders: HttpHeaders; + configuration: Configuration; + + /** + * Returns all works for an author. + * + * @endpoint get /api/works/{author_id}/all + * @param authorId The author id, for example A5023888391. + */ + getAllAuthorWorks(authorId: string, extraHttpRequestParams?: any): Observable; + + /** + * Returns a page of works for an author. + * + * @endpoint get /api/works/{author_id} + * @param authorId The author id, for example A5023888391. + * @param page The page number. + * @param size The page size. + * @param publicationYear Filter by publication year. Can be repeated. + * @param type Filter by publication type. Can be repeated. + * @param language Filter by language code. Can be repeated. + * @param institutionId Filter by OpenAlex institution id. Can be repeated. + * @param topicId Filter by OpenAlex topic id. Can be repeated. + */ + getAuthorWorks(authorId: string, page?: number, size?: number, publicationYear?: Array, type?: Array, language?: Array, institutionId?: Array, topicId?: Array, extraHttpRequestParams?: any): Observable; + + /** + * Returns work counts per primary topic for an author. + * + * @endpoint get /api/works/{author_id}/primary-topic-counts + * @param authorId The author id, for example A5023888391. + */ + getPrimaryTopicCountsByAuthor(authorId: string, extraHttpRequestParams?: any): Observable>; + + /** + * Returns topics grouped by publication year for an author. + * + * @endpoint get /api/works/{author_id}/topics-by-time + * @param authorId The author id, for example A5023888391. + * @param maxTopicsPerYear The maximum number of topics per year. + * @param targetPublications Target number of publications used for the timeline. Complete years are always included. + * @param includeAll If true, all publications are used for the timeline. + */ + getTopicsByTimeByAuthor(authorId: string, maxTopicsPerYear?: number, targetPublications?: number, includeAll?: boolean, extraHttpRequestParams?: any): Observable; + + /** + * Returns one publication. + * + * @endpoint get /api/works/detail/{work_id} + * @param workId The OpenAlex work id, for example W2741809807. + */ + getWork(workId: string, extraHttpRequestParams?: any): Observable; + +} diff --git a/webapp/src/app/api/model/access-grant.ts b/webapp/src/app/api/model/access-grant.ts new file mode 100644 index 00000000..9de129ac --- /dev/null +++ b/webapp/src/app/api/model/access-grant.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AuthScope } from './auth-scope'; + + +export interface AccessGrant { + token_type: string; + access_token: string; + expires_in: number; + scope: AuthScope; + refresh_token: string; +} + diff --git a/webapp/src/app/api/model/auth-account.ts b/webapp/src/app/api/model/auth-account.ts new file mode 100644 index 00000000..0c76d8dc --- /dev/null +++ b/webapp/src/app/api/model/auth-account.ts @@ -0,0 +1,17 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AuthAccount { + i: number; + l: string; + o: number; +} + diff --git a/webapp/src/app/api/model/auth-scope.ts b/webapp/src/app/api/model/auth-scope.ts new file mode 100644 index 00000000..0d9d325d --- /dev/null +++ b/webapp/src/app/api/model/auth-scope.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AuthAccount } from './auth-account'; + + +export interface AuthScope { + t: string; + a: AuthAccount; + d?: number | null; + r?: Array; +} + diff --git a/webapp/src/app/api/model/author-affiliations-inner.ts b/webapp/src/app/api/model/author-affiliations-inner.ts new file mode 100644 index 00000000..7d3ee92b --- /dev/null +++ b/webapp/src/app/api/model/author-affiliations-inner.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { DehydratedInstitution } from './dehydrated-institution'; + + +/** + * AuthorAffiliationsInner + */ +export interface AuthorAffiliationsInner { + institution?: DehydratedInstitution | null; + years?: Array | null; +} + diff --git a/webapp/src/app/api/model/author-counts-by-year-inner.ts b/webapp/src/app/api/model/author-counts-by-year-inner.ts new file mode 100644 index 00000000..d16c7c21 --- /dev/null +++ b/webapp/src/app/api/model/author-counts-by-year-inner.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * AuthorCountsByYearInner + */ +export interface AuthorCountsByYearInner { + year?: number | null; + works_count?: number | null; + cited_by_count?: number | null; +} + diff --git a/webapp/src/app/api/model/author-ids.ts b/webapp/src/app/api/model/author-ids.ts new file mode 100644 index 00000000..9235a207 --- /dev/null +++ b/webapp/src/app/api/model/author-ids.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * External identifiers: + */ +export interface AuthorIds { + openalex?: string | null; + orcid?: string | null; + scopus?: string | null; +} + diff --git a/webapp/src/app/api/model/author-network-node.ts b/webapp/src/app/api/model/author-network-node.ts new file mode 100644 index 00000000..e9d71c5a --- /dev/null +++ b/webapp/src/app/api/model/author-network-node.ts @@ -0,0 +1,30 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; + + +export interface AuthorNetworkNode { + /** + * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. + */ + raw_id: string; + /** + * The display name of the node. + */ + display_name: string; + /** + * The category of the node, either \'author\', \'institution\', or \'work\'. + */ + category: CollaborationNetworkNodeType; +} +export namespace AuthorNetworkNode { +} + + diff --git a/webapp/src/app/api/model/author-parsed-longest-name.ts b/webapp/src/app/api/model/author-parsed-longest-name.ts new file mode 100644 index 00000000..f49e04be --- /dev/null +++ b/webapp/src/app/api/model/author-parsed-longest-name.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The longest name parsed into its component parts. + */ +export interface AuthorParsedLongestName { + first?: string | null; + middle?: string | null; + last?: string | null; + suffix?: string | null; + nickname?: string | null; +} + diff --git a/webapp/src/app/api/model/author-position-count.ts b/webapp/src/app/api/model/author-position-count.ts new file mode 100644 index 00000000..a02e3749 --- /dev/null +++ b/webapp/src/app/api/model/author-position-count.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AuthorPositionCount { + first?: number; + middle?: number; + last?: number; + unknown?: number; +} + diff --git a/webapp/src/app/api/model/author-summary-stats.ts b/webapp/src/app/api/model/author-summary-stats.ts new file mode 100644 index 00000000..9bdb23e8 --- /dev/null +++ b/webapp/src/app/api/model/author-summary-stats.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Model2YrMeanCitedness } from './model2-yr-mean-citedness'; + + +/** + * Citation metrics: + */ +export interface AuthorSummaryStats { + '2yr_mean_citedness'?: Model2YrMeanCitedness | null; + h_index?: number | null; + i10_index?: number | null; +} + diff --git a/webapp/src/app/api/model/author.ts b/webapp/src/app/api/model/author.ts index 9ba12273..8d91fe5d 100644 --- a/webapp/src/app/api/model/author.ts +++ b/webapp/src/app/api/model/author.ts @@ -7,13 +7,13 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { AuthorAffiliationsInner } from './authorAffiliationsInner'; -import { AuthorParsedLongestName } from './authorParsedLongestName'; -import { DehydratedInstitution } from './dehydratedInstitution'; -import { AuthorCountsByYearInner } from './authorCountsByYearInner'; -import { AuthorIds } from './authorIds'; -import { AuthorSummaryStats } from './authorSummaryStats'; -import { WorkTopic } from './workTopic'; +import { AuthorAffiliationsInner } from './author-affiliations-inner'; +import { AuthorParsedLongestName } from './author-parsed-longest-name'; +import { DehydratedInstitution } from './dehydrated-institution'; +import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; +import { AuthorIds } from './author-ids'; +import { AuthorSummaryStats } from './author-summary-stats'; +import { WorkTopic } from './work-topic'; /** diff --git a/webapp/src/app/api/model/authors-filter-properties.ts b/webapp/src/app/api/model/authors-filter-properties.ts new file mode 100644 index 00000000..7312558f --- /dev/null +++ b/webapp/src/app/api/model/authors-filter-properties.ts @@ -0,0 +1,26 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface AuthorsFilterProperties { + /** + * The list of raw institution IDs to include in the collaboration network. If empty, all institutions will be included. + */ + allowed_institutions?: Array; + /** + * The minimum number of collaborations required for an author to be included in the collaboration network. + */ + min_collaborations?: number; + /** + * The maximum number of collaborations allowed for an author to be included in the collaboration network. + */ + max_collaborations?: number; +} + diff --git a/webapp/src/app/api/model/authors-list-response.ts b/webapp/src/app/api/model/authors-list-response.ts new file mode 100644 index 00000000..37a9fc2c --- /dev/null +++ b/webapp/src/app/api/model/authors-list-response.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Meta } from './meta'; +import { Author } from './author'; +import { GroupByResult } from './group-by-result'; + + +/** + * AuthorsListResponse + */ +export interface AuthorsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; +} + diff --git a/webapp/src/app/api/model/authorship.ts b/webapp/src/app/api/model/authorship.ts index db3a0bf0..cd95a07b 100644 --- a/webapp/src/app/api/model/authorship.ts +++ b/webapp/src/app/api/model/authorship.ts @@ -7,8 +7,8 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { DehydratedInstitution } from './dehydratedInstitution'; -import { DehydratedAuthor } from './dehydratedAuthor'; +import { DehydratedInstitution } from './dehydrated-institution'; +import { DehydratedAuthor } from './dehydrated-author'; /** diff --git a/webapp/src/app/api/model/autocomplete-response-meta.ts b/webapp/src/app/api/model/autocomplete-response-meta.ts new file mode 100644 index 00000000..2e080d39 --- /dev/null +++ b/webapp/src/app/api/model/autocomplete-response-meta.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * AutocompleteResponseMeta + */ +export interface AutocompleteResponseMeta { + count?: number | null; + db_response_time_ms?: number | null; +} + diff --git a/webapp/src/app/api/model/autocomplete-response-results-inner.ts b/webapp/src/app/api/model/autocomplete-response-results-inner.ts new file mode 100644 index 00000000..99ba71fe --- /dev/null +++ b/webapp/src/app/api/model/autocomplete-response-results-inner.ts @@ -0,0 +1,24 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * AutocompleteResponseResultsInner + */ +export interface AutocompleteResponseResultsInner { + id?: string | null; + display_name?: string | null; + hint?: string | null; + cited_by_count?: number | null; + works_count?: number | null; + entity_type?: string | null; + external_id?: string | null; +} + diff --git a/webapp/src/app/api/model/autocomplete-response.ts b/webapp/src/app/api/model/autocomplete-response.ts new file mode 100644 index 00000000..131fb559 --- /dev/null +++ b/webapp/src/app/api/model/autocomplete-response.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AutocompleteResponseMeta } from './autocomplete-response-meta'; +import { AutocompleteResponseResultsInner } from './autocomplete-response-results-inner'; + + +/** + * AutocompleteResponse + */ +export interface AutocompleteResponse { + meta?: AutocompleteResponseMeta | null; + results?: Array | null; +} + diff --git a/webapp/src/app/api/model/collaboration-network-edge.ts b/webapp/src/app/api/model/collaboration-network-edge.ts new file mode 100644 index 00000000..16fb5fc6 --- /dev/null +++ b/webapp/src/app/api/model/collaboration-network-edge.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface CollaborationNetworkEdge { + /** + * The raw ID of the source node. + */ + raw_source_id: string; + /** + * The raw ID of the target node. + */ + raw_target_id: string; +} + diff --git a/webapp/src/app/api/model/collaboration-network-node-type.ts b/webapp/src/app/api/model/collaboration-network-node-type.ts new file mode 100644 index 00000000..1b3c0d84 --- /dev/null +++ b/webapp/src/app/api/model/collaboration-network-node-type.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const CollaborationNetworkNodeType = { + author: 'author', + institution: 'institution', + work: 'work' +} as const; +export type CollaborationNetworkNodeType = typeof CollaborationNetworkNodeType[keyof typeof CollaborationNetworkNodeType]; + diff --git a/webapp/src/app/api/model/collaboration-network.ts b/webapp/src/app/api/model/collaboration-network.ts new file mode 100644 index 00000000..93788a02 --- /dev/null +++ b/webapp/src/app/api/model/collaboration-network.ts @@ -0,0 +1,43 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { FilterInformation } from './filter-information'; +import { WorkNetworkNode } from './work-network-node'; +import { CollaborationNetworkEdge } from './collaboration-network-edge'; +import { InstitutionNetworkNode } from './institution-network-node'; +import { AuthorNetworkNode } from './author-network-node'; + + +export interface CollaborationNetwork { + /** + * The raw person ID of the person whose collaboration network this is. + */ + raw_person_id: string; + /** + * The work nodes in the collaboration network. + */ + work_nodes: Array; + /** + * The author nodes in the collaboration network. + */ + author_nodes: Array; + /** + * The institution nodes in the collaboration network. + */ + institution_nodes: Array; + /** + * The collaboration edges in the collaboration network. A collaboration edge represents a collaboration between two nodes. A -> W and A -> I + */ + collaboration_edges: Array; + /** + * The filter information for the collaboration network, including the minimum and maximum publication years of the works in the collaboration network. + */ + filter_information: FilterInformation; +} + diff --git a/webapp/src/app/api/model/cost-usd.ts b/webapp/src/app/api/model/cost-usd.ts new file mode 100644 index 00000000..c7bcbee8 --- /dev/null +++ b/webapp/src/app/api/model/cost-usd.ts @@ -0,0 +1,17 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Cost of this request in USD + */ +export interface CostUsd { +} + diff --git a/webapp/src/app/api/model/custom-author.ts b/webapp/src/app/api/model/custom-author.ts new file mode 100644 index 00000000..07000ade --- /dev/null +++ b/webapp/src/app/api/model/custom-author.ts @@ -0,0 +1,39 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AuthorAffiliationsInner } from './author-affiliations-inner'; +import { AuthorParsedLongestName } from './author-parsed-longest-name'; +import { DehydratedInstitution } from './dehydrated-institution'; +import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; +import { AuthorIds } from './author-ids'; +import { AuthorSummaryStats } from './author-summary-stats'; +import { WorkTopic } from './work-topic'; + + +export interface CustomAuthor { + id?: string | null; + orcid?: string | null; + display_name?: string | null; + display_name_alternatives?: Array | null; + longest_name?: string | null; + parsed_longest_name?: AuthorParsedLongestName | null; + works_count?: number | null; + cited_by_count?: number | null; + summary_stats?: AuthorSummaryStats | null; + affiliations?: Array | null; + last_known_institutions?: Array | null; + topics?: Array | null; + counts_by_year?: Array | null; + ids?: AuthorIds | null; + works_api_url?: string | null; + created_date?: string | null; + updated_date?: string | null; + relevance_rating?: string | null; +} + diff --git a/webapp/src/app/api/model/custom-authors-list-response.ts b/webapp/src/app/api/model/custom-authors-list-response.ts new file mode 100644 index 00000000..f6dc8f0b --- /dev/null +++ b/webapp/src/app/api/model/custom-authors-list-response.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Meta } from './meta'; +import { CustomAuthor } from './custom-author'; +import { Author } from './author'; +import { GroupByResult } from './group-by-result'; + + +export interface CustomAuthorsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; + placeholder?: CustomAuthor | null; +} + diff --git a/webapp/src/app/api/model/dehydrated-author.ts b/webapp/src/app/api/model/dehydrated-author.ts new file mode 100644 index 00000000..4d3817f1 --- /dev/null +++ b/webapp/src/app/api/model/dehydrated-author.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * [Dehydrated Author](/api-reference/authors#the-dehydratedauthor-object) — reduced-field version used in nested contexts + */ +export interface DehydratedAuthor { + id?: string | null; + display_name?: string | null; + orcid?: string | null; +} + diff --git a/webapp/src/app/api/model/dehydrated-funder.ts b/webapp/src/app/api/model/dehydrated-funder.ts new file mode 100644 index 00000000..b134bbb1 --- /dev/null +++ b/webapp/src/app/api/model/dehydrated-funder.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * [Dehydrated Funder](/api-reference/funders) — reduced-field version used in nested contexts + */ +export interface DehydratedFunder { + id?: string | null; + display_name?: string | null; + ror?: string | null; +} + diff --git a/webapp/src/app/api/model/dehydrated-institution.ts b/webapp/src/app/api/model/dehydrated-institution.ts new file mode 100644 index 00000000..7b6c9824 --- /dev/null +++ b/webapp/src/app/api/model/dehydrated-institution.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * [Dehydrated Institution](/api-reference/institutions#the-dehydratedinstitution-object) — reduced-field version used in nested contexts + */ +export interface DehydratedInstitution { + id?: string | null; + display_name?: string | null; + ror?: string | null; + country_code?: string | null; + type?: string | null; + lineage?: Array | null; +} + diff --git a/webapp/src/app/api/model/dehydrated-source.ts b/webapp/src/app/api/model/dehydrated-source.ts new file mode 100644 index 00000000..ae714846 --- /dev/null +++ b/webapp/src/app/api/model/dehydrated-source.ts @@ -0,0 +1,28 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * [Dehydrated Source](/api-reference/sources#the-dehydratedsource-object) — reduced-field version used in nested contexts + */ +export interface DehydratedSource { + id?: string | null; + display_name?: string | null; + issn_l?: string | null; + issn?: Array | null; + is_oa?: boolean | null; + is_in_doaj?: boolean | null; + is_core?: boolean | null; + host_organization?: string | null; + host_organization_name?: string | null; + host_organization_lineage?: Array | null; + type?: string | null; +} + diff --git a/webapp/src/app/api/model/filter-information.ts b/webapp/src/app/api/model/filter-information.ts new file mode 100644 index 00000000..a8e9d5dd --- /dev/null +++ b/webapp/src/app/api/model/filter-information.ts @@ -0,0 +1,32 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { InstitutionInformation } from './institution-information'; +import { WorkTopicInformation } from './work-topic-information'; + + +export interface FilterInformation { + /** + * The minimum publication year of the works in the collaboration network. + */ + min_possible_year: number; + /** + * The maximum publication year of the works in the collaboration network. + */ + max_possible_year: number; + /** + * The list of institutions associated with the works in the collaboration network. + */ + institutions: Array; + /** + * The list of topics associated with the works in the collaboration network. + */ + topics: Array; +} + diff --git a/webapp/src/app/api/model/filter-properties.ts b/webapp/src/app/api/model/filter-properties.ts new file mode 100644 index 00000000..bb3cc934 --- /dev/null +++ b/webapp/src/app/api/model/filter-properties.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { WorksFilterProperties } from './works-filter-properties'; +import { AuthorsFilterProperties } from './authors-filter-properties'; + + +export interface FilterProperties { + /** + * The type of filter to apply when generating the collaboration network. Can be either \'works\' or \'authors\'. If \'works\', the filter properties in the \'works_filter_properties\' field will be used. If \'authors\', the filter properties in the \'authors_filter_properties\' field will be used. + */ + filter_by?: string; + works_filter_properties: WorksFilterProperties | null; + authors_filter_properties: AuthorsFilterProperties | null; +} + diff --git a/webapp/src/app/api/model/funder-by-author.ts b/webapp/src/app/api/model/funder-by-author.ts new file mode 100644 index 00000000..e1bacf69 --- /dev/null +++ b/webapp/src/app/api/model/funder-by-author.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PublicationIdsByAuthorPosition } from './publication-ids-by-author-position'; +import { AuthorPositionCount } from './author-position-count'; + + +export interface FunderByAuthor { + funder_id?: string | null; + funder_name?: string | null; + publication_count: number; + author_position_count: AuthorPositionCount; + publication_ids: PublicationIdsByAuthorPosition; + publication_urls?: { [key: string]: string; }; + publication_titles?: { [key: string]: string; }; +} + diff --git a/webapp/src/app/api/model/funders-by-author-response.ts b/webapp/src/app/api/model/funders-by-author-response.ts new file mode 100644 index 00000000..6949ed4b --- /dev/null +++ b/webapp/src/app/api/model/funders-by-author-response.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { FunderByAuthor } from './funder-by-author'; + + +export interface FundersByAuthorResponse { + author_id: string; + author_name?: string | null; + funder_count: number; + funders: Array; +} + diff --git a/webapp/src/app/api/model/group-by-result.ts b/webapp/src/app/api/model/group-by-result.ts new file mode 100644 index 00000000..68c51855 --- /dev/null +++ b/webapp/src/app/api/model/group-by-result.ts @@ -0,0 +1,20 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * GroupByResult + */ +export interface GroupByResult { + key?: string | null; + key_display_name?: string | null; + count?: number | null; +} + diff --git a/webapp/src/app/api/model/http-validation-error.ts b/webapp/src/app/api/model/http-validation-error.ts new file mode 100644 index 00000000..a82a8f71 --- /dev/null +++ b/webapp/src/app/api/model/http-validation-error.ts @@ -0,0 +1,16 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ValidationError } from './validation-error'; + + +export interface HTTPValidationError { + detail?: Array; +} + diff --git a/webapp/src/app/api/model/identity-grant.ts b/webapp/src/app/api/model/identity-grant.ts new file mode 100644 index 00000000..fd48137c --- /dev/null +++ b/webapp/src/app/api/model/identity-grant.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { AuthScope } from './auth-scope'; + + +export interface IdentityGrant { + token_type: string; + access_token: string; + expires_in: number; + scope: AuthScope; +} + diff --git a/webapp/src/app/api/model/institution-geo.ts b/webapp/src/app/api/model/institution-geo.ts new file mode 100644 index 00000000..949b73f4 --- /dev/null +++ b/webapp/src/app/api/model/institution-geo.ts @@ -0,0 +1,26 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Latitude } from './latitude'; +import { Longitude } from './longitude'; + + +/** + * Location information: + */ +export interface InstitutionGeo { + city?: string | null; + geonames_city_id?: string | null; + region?: string | null; + country_code?: string | null; + country?: string | null; + latitude?: Latitude | null; + longitude?: Longitude | null; +} + diff --git a/webapp/src/app/api/model/institution-ids.ts b/webapp/src/app/api/model/institution-ids.ts new file mode 100644 index 00000000..93d801e1 --- /dev/null +++ b/webapp/src/app/api/model/institution-ids.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * External identifiers: + */ +export interface InstitutionIds { + openalex?: string | null; + ror?: string | null; + mag?: number | null; + grid?: string | null; + wikipedia?: string | null; + wikidata?: string | null; +} + diff --git a/webapp/src/app/api/model/institution-information.ts b/webapp/src/app/api/model/institution-information.ts new file mode 100644 index 00000000..e287b0fa --- /dev/null +++ b/webapp/src/app/api/model/institution-information.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface InstitutionInformation { + /** + * The raw institution ID of the institution. + */ + raw_id: string; + /** + * The display name of the institution. + */ + display_name: string; +} + diff --git a/webapp/src/app/api/model/institution-network-node.ts b/webapp/src/app/api/model/institution-network-node.ts new file mode 100644 index 00000000..e1c85a17 --- /dev/null +++ b/webapp/src/app/api/model/institution-network-node.ts @@ -0,0 +1,30 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; + + +export interface InstitutionNetworkNode { + /** + * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. + */ + raw_id: string; + /** + * The display name of the node. + */ + display_name: string; + /** + * The category of the node, either \'author\', \'institution\', or \'work\'. + */ + category: CollaborationNetworkNodeType; +} +export namespace InstitutionNetworkNode { +} + + diff --git a/webapp/src/app/api/model/institution.ts b/webapp/src/app/api/model/institution.ts index 6b1a5778..3c6b9d4c 100644 --- a/webapp/src/app/api/model/institution.ts +++ b/webapp/src/app/api/model/institution.ts @@ -7,10 +7,10 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { InstitutionIds } from './institutionIds'; -import { AuthorCountsByYearInner } from './authorCountsByYearInner'; -import { AuthorSummaryStats } from './authorSummaryStats'; -import { InstitutionGeo } from './institutionGeo'; +import { InstitutionIds } from './institution-ids'; +import { AuthorCountsByYearInner } from './author-counts-by-year-inner'; +import { AuthorSummaryStats } from './author-summary-stats'; +import { InstitutionGeo } from './institution-geo'; /** diff --git a/webapp/src/app/api/model/institutions-list-response.ts b/webapp/src/app/api/model/institutions-list-response.ts new file mode 100644 index 00000000..747faa03 --- /dev/null +++ b/webapp/src/app/api/model/institutions-list-response.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Meta } from './meta'; +import { Institution } from './institution'; +import { GroupByResult } from './group-by-result'; + + +/** + * InstitutionsListResponse + */ +export interface InstitutionsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; +} + diff --git a/webapp/src/app/api/model/item-create.ts b/webapp/src/app/api/model/item-create.ts new file mode 100644 index 00000000..608d6910 --- /dev/null +++ b/webapp/src/app/api/model/item-create.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ItemCreate { + /** + * The name of the item. + */ + name: string; + /** + * The description of the item. + */ + description: string; +} + diff --git a/webapp/src/app/api/model/item-page.ts b/webapp/src/app/api/model/item-page.ts new file mode 100644 index 00000000..56595b8a --- /dev/null +++ b/webapp/src/app/api/model/item-page.ts @@ -0,0 +1,31 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Item } from './item'; + + +export interface ItemPage { + /** + * The elements of the page. + */ + elements?: Array; + /** + * The page offset in elements. + */ + offset?: number; + /** + * The total number of elements. + */ + total?: number; + /** + * The page size in elements. + */ + size?: number; +} + diff --git a/webapp/src/app/api/model/location.ts b/webapp/src/app/api/model/location.ts index f207d751..ed2aa1e2 100644 --- a/webapp/src/app/api/model/location.ts +++ b/webapp/src/app/api/model/location.ts @@ -7,7 +7,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { DehydratedSource } from './dehydratedSource'; +import { DehydratedSource } from './dehydrated-source'; /** diff --git a/webapp/src/app/api/model/meta.ts b/webapp/src/app/api/model/meta.ts index 8481062a..cf47d6d3 100644 --- a/webapp/src/app/api/model/meta.ts +++ b/webapp/src/app/api/model/meta.ts @@ -7,7 +7,7 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { CostUsd } from './costUsd'; +import { CostUsd } from './cost-usd'; /** diff --git a/webapp/src/app/api/model/model2-yr-mean-citedness.ts b/webapp/src/app/api/model/model2-yr-mean-citedness.ts new file mode 100644 index 00000000..67ec623c --- /dev/null +++ b/webapp/src/app/api/model/model2-yr-mean-citedness.ts @@ -0,0 +1,14 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface Model2YrMeanCitedness { +} + diff --git a/webapp/src/app/api/model/models.ts b/webapp/src/app/api/model/models.ts index 3c24b908..cd44ec17 100644 --- a/webapp/src/app/api/model/models.ts +++ b/webapp/src/app/api/model/models.ts @@ -1,86 +1,86 @@ -export * from './accessGrant'; -export * from './authAccount'; -export * from './authScope'; +export * from './access-grant'; +export * from './auth-account'; +export * from './auth-scope'; export * from './author'; -export * from './authorAffiliationsInner'; -export * from './authorCountsByYearInner'; -export * from './authorIds'; -export * from './authorNetworkNode'; -export * from './authorParsedLongestName'; -export * from './authorPositionCount'; -export * from './authorSummaryStats'; -export * from './authorsFilterProperties'; -export * from './authorsListResponse'; +export * from './author-affiliations-inner'; +export * from './author-counts-by-year-inner'; +export * from './author-ids'; +export * from './author-network-node'; +export * from './author-parsed-longest-name'; +export * from './author-position-count'; +export * from './author-summary-stats'; +export * from './authors-filter-properties'; +export * from './authors-list-response'; export * from './authorship'; -export * from './autocompleteResponse'; -export * from './autocompleteResponseMeta'; -export * from './autocompleteResponseResultsInner'; +export * from './autocomplete-response'; +export * from './autocomplete-response-meta'; +export * from './autocomplete-response-results-inner'; export * from './award'; -export * from './collaborationNetwork'; -export * from './collaborationNetworkEdge'; -export * from './collaborationNetworkNodeType'; -export * from './costUsd'; -export * from './customAuthor'; -export * from './customAuthorsListResponse'; -export * from './dehydratedAuthor'; -export * from './dehydratedFunder'; -export * from './dehydratedInstitution'; -export * from './dehydratedSource'; -export * from './filterInformation'; -export * from './filterProperties'; -export * from './funderByAuthor'; -export * from './fundersByAuthorResponse'; +export * from './collaboration-network'; +export * from './collaboration-network-edge'; +export * from './collaboration-network-node-type'; +export * from './cost-usd'; +export * from './custom-author'; +export * from './custom-authors-list-response'; +export * from './dehydrated-author'; +export * from './dehydrated-funder'; +export * from './dehydrated-institution'; +export * from './dehydrated-source'; +export * from './filter-information'; +export * from './filter-properties'; +export * from './funder-by-author'; +export * from './funders-by-author-response'; export * from './fwci'; -export * from './groupByResult'; -export * from './hTTPValidationError'; -export * from './identityGrant'; +export * from './group-by-result'; +export * from './http-validation-error'; +export * from './identity-grant'; export * from './institution'; -export * from './institutionGeo'; -export * from './institutionIds'; -export * from './institutionInformation'; -export * from './institutionNetworkNode'; -export * from './institutionsListResponse'; +export * from './institution-geo'; +export * from './institution-ids'; +export * from './institution-information'; +export * from './institution-network-node'; +export * from './institutions-list-response'; export * from './item'; -export * from './itemCreate'; -export * from './itemPage'; +export * from './item-create'; +export * from './item-page'; export * from './latitude'; export * from './location'; export * from './longitude'; export * from './meta'; -export * from './model2YrMeanCitedness'; -export * from './openAccess'; -export * from './personBio'; -export * from './publicationIdsByAuthorPosition'; -export * from './publicationsByAuthorResponse'; +export * from './model2-yr-mean-citedness'; +export * from './open-access'; +export * from './person-bio'; +export * from './publication-ids-by-author-position'; +export * from './publications-by-author-response'; export * from './score'; export * from './topic'; -export * from './topicCount'; -export * from './topicDomain'; -export * from './topicField'; -export * from './topicIds'; -export * from './topicSubfield'; -export * from './topicsByTime'; -export * from './topicsByYear'; -export * from './topicsListResponse'; -export * from './validationError'; -export * from './validationErrorLocInner'; +export * from './topic-count'; +export * from './topic-domain'; +export * from './topic-field'; +export * from './topic-ids'; +export * from './topic-subfield'; +export * from './topics-by-time'; +export * from './topics-by-year'; +export * from './topics-list-response'; +export * from './validation-error'; +export * from './validation-error-loc-inner'; export * from './value'; export * from './work'; -export * from './workBiblio'; -export * from './workCitationNormalizedPercentile'; -export * from './workCitedByPercentileYear'; -export * from './workCountsByYearInner'; -export * from './workHasContent'; -export * from './workIds'; -export * from './workKeyword'; -export * from './workMeshInner'; -export * from './workNetworkNode'; -export * from './workPage'; -export * from './workSustainableDevelopmentGoalsInner'; -export * from './workTopic'; -export * from './workTopicDomain'; -export * from './workTopicField'; -export * from './workTopicInformation'; -export * from './workTopicSubfield'; -export * from './worksFilterProperties'; -export * from './worksListResponse'; +export * from './work-biblio'; +export * from './work-citation-normalized-percentile'; +export * from './work-cited-by-percentile-year'; +export * from './work-counts-by-year-inner'; +export * from './work-has-content'; +export * from './work-ids'; +export * from './work-keyword'; +export * from './work-mesh-inner'; +export * from './work-network-node'; +export * from './work-page'; +export * from './work-sustainable-development-goals-inner'; +export * from './work-topic'; +export * from './work-topic-domain'; +export * from './work-topic-field'; +export * from './work-topic-information'; +export * from './work-topic-subfield'; +export * from './works-filter-properties'; +export * from './works-list-response'; diff --git a/webapp/src/app/api/model/open-access.ts b/webapp/src/app/api/model/open-access.ts new file mode 100644 index 00000000..32a4ddd9 --- /dev/null +++ b/webapp/src/app/api/model/open-access.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Open access information + */ +export interface OpenAccess { + is_oa?: boolean | null; + oa_status?: string | null; + oa_url?: string | null; + any_repository_has_fulltext?: boolean | null; +} + diff --git a/webapp/src/app/api/model/person-bio.ts b/webapp/src/app/api/model/person-bio.ts new file mode 100644 index 00000000..f7291e6f --- /dev/null +++ b/webapp/src/app/api/model/person-bio.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface PersonBio { + /** + * The generated biography. + */ + bio: string; +} + diff --git a/webapp/src/app/api/model/publication-ids-by-author-position.ts b/webapp/src/app/api/model/publication-ids-by-author-position.ts new file mode 100644 index 00000000..c35050ef --- /dev/null +++ b/webapp/src/app/api/model/publication-ids-by-author-position.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface PublicationIdsByAuthorPosition { + first?: Array; + middle?: Array; + last?: Array; + unknown?: Array; +} + diff --git a/webapp/src/app/api/model/publications-by-author-response.ts b/webapp/src/app/api/model/publications-by-author-response.ts new file mode 100644 index 00000000..5176fe39 --- /dev/null +++ b/webapp/src/app/api/model/publications-by-author-response.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface PublicationsByAuthorResponse { + author_id: string; + page: number; + page_size: number; + total_works: number; + total: number; + results_count: number; + results: Array; +} + diff --git a/webapp/src/app/api/model/topic-count.ts b/webapp/src/app/api/model/topic-count.ts new file mode 100644 index 00000000..520042ec --- /dev/null +++ b/webapp/src/app/api/model/topic-count.ts @@ -0,0 +1,24 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface TopicCount { + id?: string | null; + /** + * The topic display name. + */ + name: string; + /** + * The number of occurrences. + */ + count?: number; + description?: string | null; +} + diff --git a/webapp/src/app/api/model/topic-domain.ts b/webapp/src/app/api/model/topic-domain.ts new file mode 100644 index 00000000..652b1bca --- /dev/null +++ b/webapp/src/app/api/model/topic-domain.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The domain (highest level) containing this topic: + */ +export interface TopicDomain { + id?: string | null; + display_name?: string | null; +} + diff --git a/webapp/src/app/api/model/topic-field.ts b/webapp/src/app/api/model/topic-field.ts new file mode 100644 index 00000000..c7351675 --- /dev/null +++ b/webapp/src/app/api/model/topic-field.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The field (second level) containing this topic: + */ +export interface TopicField { + id?: string | null; + display_name?: string | null; +} + diff --git a/webapp/src/app/api/model/topic-ids.ts b/webapp/src/app/api/model/topic-ids.ts new file mode 100644 index 00000000..4aa6738f --- /dev/null +++ b/webapp/src/app/api/model/topic-ids.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * External identifiers: + */ +export interface TopicIds { + openalex?: string | null; + wikipedia?: string | null; +} + diff --git a/webapp/src/app/api/model/topic-subfield.ts b/webapp/src/app/api/model/topic-subfield.ts new file mode 100644 index 00000000..53d37842 --- /dev/null +++ b/webapp/src/app/api/model/topic-subfield.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The subfield (third level) containing this topic: + */ +export interface TopicSubfield { + id?: string | null; + display_name?: string | null; +} + diff --git a/webapp/src/app/api/model/topic.ts b/webapp/src/app/api/model/topic.ts index 9fc0ee63..cb66621f 100644 --- a/webapp/src/app/api/model/topic.ts +++ b/webapp/src/app/api/model/topic.ts @@ -7,10 +7,10 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { TopicDomain } from './topicDomain'; -import { TopicIds } from './topicIds'; -import { TopicSubfield } from './topicSubfield'; -import { TopicField } from './topicField'; +import { TopicDomain } from './topic-domain'; +import { TopicIds } from './topic-ids'; +import { TopicSubfield } from './topic-subfield'; +import { TopicField } from './topic-field'; /** diff --git a/webapp/src/app/api/model/topicCount.ts b/webapp/src/app/api/model/topicCount.ts index c4e4ef18..520042ec 100644 --- a/webapp/src/app/api/model/topicCount.ts +++ b/webapp/src/app/api/model/topicCount.ts @@ -19,5 +19,6 @@ export interface TopicCount { * The number of occurrences. */ count?: number; + description?: string | null; } diff --git a/webapp/src/app/api/model/topics-by-time.ts b/webapp/src/app/api/model/topics-by-time.ts new file mode 100644 index 00000000..d2ecf101 --- /dev/null +++ b/webapp/src/app/api/model/topics-by-time.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { TopicsByYear } from './topics-by-year'; + + +export interface TopicsByTime { + /** + * Topics grouped by year. + */ + elements?: Array; + /** + * The number of years. + */ + total?: number; +} + diff --git a/webapp/src/app/api/model/topics-by-year.ts b/webapp/src/app/api/model/topics-by-year.ts new file mode 100644 index 00000000..707cda16 --- /dev/null +++ b/webapp/src/app/api/model/topics-by-year.ts @@ -0,0 +1,31 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { TopicCount } from './topic-count'; + + +export interface TopicsByYear { + /** + * The publication year. + */ + year: number; + /** + * The number of works in this year. + */ + publication_count?: number; + /** + * The topics in this year. + */ + topics?: Array; + /** + * The primary topics in this year. + */ + primary_topics?: Array; +} + diff --git a/webapp/src/app/api/model/topics-list-response.ts b/webapp/src/app/api/model/topics-list-response.ts new file mode 100644 index 00000000..f6974837 --- /dev/null +++ b/webapp/src/app/api/model/topics-list-response.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Meta } from './meta'; +import { GroupByResult } from './group-by-result'; +import { Topic } from './topic'; + + +/** + * TopicsListResponse + */ +export interface TopicsListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; +} + diff --git a/webapp/src/app/api/model/validation-error-loc-inner.ts b/webapp/src/app/api/model/validation-error-loc-inner.ts new file mode 100644 index 00000000..d248a9b7 --- /dev/null +++ b/webapp/src/app/api/model/validation-error-loc-inner.ts @@ -0,0 +1,14 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ValidationErrorLocInner { +} + diff --git a/webapp/src/app/api/model/validation-error.ts b/webapp/src/app/api/model/validation-error.ts new file mode 100644 index 00000000..c71e7bfa --- /dev/null +++ b/webapp/src/app/api/model/validation-error.ts @@ -0,0 +1,18 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { ValidationErrorLocInner } from './validation-error-loc-inner'; + + +export interface ValidationError { + loc: Array; + msg: string; + type: string; +} + diff --git a/webapp/src/app/api/model/work-biblio.ts b/webapp/src/app/api/model/work-biblio.ts new file mode 100644 index 00000000..f6d7079b --- /dev/null +++ b/webapp/src/app/api/model/work-biblio.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Bibliographic info: `volume`, `issue`, `first_page`, `last_page`. + */ +export interface WorkBiblio { + volume?: string | null; + issue?: string | null; + first_page?: string | null; + last_page?: string | null; +} + diff --git a/webapp/src/app/api/model/work-citation-normalized-percentile.ts b/webapp/src/app/api/model/work-citation-normalized-percentile.ts new file mode 100644 index 00000000..a587ddf6 --- /dev/null +++ b/webapp/src/app/api/model/work-citation-normalized-percentile.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Value } from './value'; + + +/** + * Percentile of citation count normalized by work type, year, and subfield. Includes `value`, `is_in_top_1_percent`, `is_in_top_10_percent`. + */ +export interface WorkCitationNormalizedPercentile { + value?: Value | null; + is_in_top_1_percent?: boolean | null; + is_in_top_10_percent?: boolean | null; +} + diff --git a/webapp/src/app/api/model/work-cited-by-percentile-year.ts b/webapp/src/app/api/model/work-cited-by-percentile-year.ts new file mode 100644 index 00000000..5257eb3b --- /dev/null +++ b/webapp/src/app/api/model/work-cited-by-percentile-year.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Percentile rank compared to other works published in the same year. Contains `min` and `max`. + */ +export interface WorkCitedByPercentileYear { + min?: number | null; + max?: number | null; +} + diff --git a/webapp/src/app/api/model/work-counts-by-year-inner.ts b/webapp/src/app/api/model/work-counts-by-year-inner.ts new file mode 100644 index 00000000..76d97d77 --- /dev/null +++ b/webapp/src/app/api/model/work-counts-by-year-inner.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * WorkCountsByYearInner + */ +export interface WorkCountsByYearInner { + year?: number | null; + cited_by_count?: number | null; +} + diff --git a/webapp/src/app/api/model/work-has-content.ts b/webapp/src/app/api/model/work-has-content.ts new file mode 100644 index 00000000..44fbe446 --- /dev/null +++ b/webapp/src/app/api/model/work-has-content.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Information about downloadable full-text content: + */ +export interface WorkHasContent { + pdf?: boolean | null; + grobid_xml?: boolean | null; +} + diff --git a/webapp/src/app/api/model/work-ids.ts b/webapp/src/app/api/model/work-ids.ts new file mode 100644 index 00000000..e8315250 --- /dev/null +++ b/webapp/src/app/api/model/work-ids.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * External identifiers: `openalex`, `doi`, `mag`, `pmid`, `pmcid`. + */ +export interface WorkIds { + openalex?: string | null; + doi?: string | null; + mag?: number | null; + pmid?: string | null; + pmcid?: string | null; +} + diff --git a/webapp/src/app/api/model/work-keyword.ts b/webapp/src/app/api/model/work-keyword.ts new file mode 100644 index 00000000..c9c99afb --- /dev/null +++ b/webapp/src/app/api/model/work-keyword.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Score } from './score'; + + +/** + * WorkKeyword + */ +export interface WorkKeyword { + id?: string | null; + display_name?: string | null; + score?: Score | null; +} + diff --git a/webapp/src/app/api/model/work-mesh-inner.ts b/webapp/src/app/api/model/work-mesh-inner.ts new file mode 100644 index 00000000..40633524 --- /dev/null +++ b/webapp/src/app/api/model/work-mesh-inner.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * WorkMeshInner + */ +export interface WorkMeshInner { + descriptor_ui?: string | null; + descriptor_name?: string | null; + qualifier_ui?: string | null; + qualifier_name?: string | null; + is_major_topic?: boolean | null; +} + diff --git a/webapp/src/app/api/model/work-network-node.ts b/webapp/src/app/api/model/work-network-node.ts new file mode 100644 index 00000000..58b7ab07 --- /dev/null +++ b/webapp/src/app/api/model/work-network-node.ts @@ -0,0 +1,33 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { WorkTopicInformation } from './work-topic-information'; +import { CollaborationNetworkNodeType } from './collaboration-network-node-type'; + + +export interface WorkNetworkNode { + /** + * The raw ID of the node. For an author node, this is the raw person ID. For an institution node, this is the raw institution ID. For a work node, this is the raw work ID. + */ + raw_id: string; + /** + * The display name of the node. + */ + display_name: string; + /** + * The category of the node, either \'author\', \'institution\', or \'work\'. + */ + category: CollaborationNetworkNodeType; + publication_year: number | null; + work_topics_information: Set | null; +} +export namespace WorkNetworkNode { +} + + diff --git a/webapp/src/app/api/model/work-page.ts b/webapp/src/app/api/model/work-page.ts new file mode 100644 index 00000000..8490c3ab --- /dev/null +++ b/webapp/src/app/api/model/work-page.ts @@ -0,0 +1,35 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Work } from './work'; + + +export interface WorkPage { + /** + * Total number of works matching the query + */ + total: number; + /** + * List of works on the current page + */ + elements: Array; + /** + * Offset of the current page + */ + offset: number; + /** + * Size of the current page + */ + size: number; + /** + * Indicates if the current page is the last page + */ + last_page: boolean; +} + diff --git a/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts b/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts new file mode 100644 index 00000000..c9ecd00f --- /dev/null +++ b/webapp/src/app/api/model/work-sustainable-development-goals-inner.ts @@ -0,0 +1,21 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Score } from './score'; + + +/** + * WorkSustainableDevelopmentGoalsInner + */ +export interface WorkSustainableDevelopmentGoalsInner { + id?: string | null; + display_name?: string | null; + score?: Score | null; +} + diff --git a/webapp/src/app/api/model/work-topic-domain.ts b/webapp/src/app/api/model/work-topic-domain.ts new file mode 100644 index 00000000..1a9879d4 --- /dev/null +++ b/webapp/src/app/api/model/work-topic-domain.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The parent [domain](/api-reference/domains) + */ +export interface WorkTopicDomain { + id?: string | null; + display_name?: string | null; +} + diff --git a/webapp/src/app/api/model/work-topic-field.ts b/webapp/src/app/api/model/work-topic-field.ts new file mode 100644 index 00000000..1807cfc1 --- /dev/null +++ b/webapp/src/app/api/model/work-topic-field.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The parent [field](/api-reference/fields) + */ +export interface WorkTopicField { + id?: string | null; + display_name?: string | null; +} + diff --git a/webapp/src/app/api/model/work-topic-information.ts b/webapp/src/app/api/model/work-topic-information.ts new file mode 100644 index 00000000..ca3b9454 --- /dev/null +++ b/webapp/src/app/api/model/work-topic-information.ts @@ -0,0 +1,22 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface WorkTopicInformation { + /** + * The ID of the topic. + */ + raw_topic_id: string; + /** + * The name of the topic. + */ + display_name: string; +} + diff --git a/webapp/src/app/api/model/work-topic-subfield.ts b/webapp/src/app/api/model/work-topic-subfield.ts new file mode 100644 index 00000000..b6e7278a --- /dev/null +++ b/webapp/src/app/api/model/work-topic-subfield.ts @@ -0,0 +1,19 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * The parent [subfield](/api-reference/subfields) + */ +export interface WorkTopicSubfield { + id?: string | null; + display_name?: string | null; +} + diff --git a/webapp/src/app/api/model/work-topic.ts b/webapp/src/app/api/model/work-topic.ts new file mode 100644 index 00000000..87f829f2 --- /dev/null +++ b/webapp/src/app/api/model/work-topic.ts @@ -0,0 +1,27 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Score } from './score'; +import { WorkTopicDomain } from './work-topic-domain'; +import { WorkTopicSubfield } from './work-topic-subfield'; +import { WorkTopicField } from './work-topic-field'; + + +/** + * WorkTopic + */ +export interface WorkTopic { + id?: string | null; + display_name?: string | null; + score?: Score | null; + subfield?: WorkTopicSubfield | null; + field?: WorkTopicField | null; + domain?: WorkTopicDomain | null; +} + diff --git a/webapp/src/app/api/model/work.ts b/webapp/src/app/api/model/work.ts index 07d94a1c..b84cc7b6 100644 --- a/webapp/src/app/api/model/work.ts +++ b/webapp/src/app/api/model/work.ts @@ -7,22 +7,22 @@ * https://openapi-generator.tech * Do not edit the class manually. */ -import { DehydratedFunder } from './dehydratedFunder'; +import { DehydratedFunder } from './dehydrated-funder'; import { Authorship } from './authorship'; -import { OpenAccess } from './openAccess'; -import { WorkIds } from './workIds'; -import { WorkSustainableDevelopmentGoalsInner } from './workSustainableDevelopmentGoalsInner'; -import { WorkTopic } from './workTopic'; -import { WorkCountsByYearInner } from './workCountsByYearInner'; -import { WorkKeyword } from './workKeyword'; -import { WorkCitationNormalizedPercentile } from './workCitationNormalizedPercentile'; +import { OpenAccess } from './open-access'; +import { WorkIds } from './work-ids'; +import { WorkSustainableDevelopmentGoalsInner } from './work-sustainable-development-goals-inner'; +import { WorkTopic } from './work-topic'; +import { WorkCountsByYearInner } from './work-counts-by-year-inner'; +import { WorkKeyword } from './work-keyword'; +import { WorkCitationNormalizedPercentile } from './work-citation-normalized-percentile'; import { Award } from './award'; import { Fwci } from './fwci'; -import { WorkMeshInner } from './workMeshInner'; -import { WorkCitedByPercentileYear } from './workCitedByPercentileYear'; -import { WorkHasContent } from './workHasContent'; +import { WorkMeshInner } from './work-mesh-inner'; +import { WorkCitedByPercentileYear } from './work-cited-by-percentile-year'; +import { WorkHasContent } from './work-has-content'; import { Location } from './location'; -import { WorkBiblio } from './workBiblio'; +import { WorkBiblio } from './work-biblio'; /** diff --git a/webapp/src/app/api/model/works-filter-properties.ts b/webapp/src/app/api/model/works-filter-properties.ts new file mode 100644 index 00000000..bd6cc9a4 --- /dev/null +++ b/webapp/src/app/api/model/works-filter-properties.ts @@ -0,0 +1,34 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface WorksFilterProperties { + /** + * The start publication year for the works to include in the collaboration network. + */ + start_year?: number; + /** + * The end publication year for the works to include in the collaboration network. + */ + end_year?: number; + /** + * The list of raw topic IDs to include in the collaboration network. If empty, all topics will be included. + */ + allowed_topics?: Array; + /** + * The minimum number of contributors required for a work to be included in the collaboration network. + */ + min_contributors?: number; + /** + * The maximum number of contributors allowed for a work to be included in the collaboration network. + */ + max_contributors?: number; +} + diff --git a/webapp/src/app/api/model/works-list-response.ts b/webapp/src/app/api/model/works-list-response.ts new file mode 100644 index 00000000..cf03bd2e --- /dev/null +++ b/webapp/src/app/api/model/works-list-response.ts @@ -0,0 +1,23 @@ +/** + * Innovation Search Engine API + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Meta } from './meta'; +import { Work } from './work'; +import { GroupByResult } from './group-by-result'; + + +/** + * WorksListResponse + */ +export interface WorksListResponse { + meta?: Meta | null; + results?: Array | null; + group_by?: Array | null; +} + diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.html b/webapp/src/app/modules/person-interesting/person-interesting.component.html index 14767892..2f26336a 100644 --- a/webapp/src/app/modules/person-interesting/person-interesting.component.html +++ b/webapp/src/app/modules/person-interesting/person-interesting.component.html @@ -8,7 +8,9 @@
@if (tags().length > 0) { @for (tag of tags(); track tag.label) { - + } } @else { Keine Themen gefunden diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.ts b/webapp/src/app/modules/person-interesting/person-interesting.component.ts index 4607210d..6179a384 100644 --- a/webapp/src/app/modules/person-interesting/person-interesting.component.ts +++ b/webapp/src/app/modules/person-interesting/person-interesting.component.ts @@ -1,17 +1,19 @@ import { Component, input, computed } from '@angular/core'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { TopicCount } from '../../api'; interface InterestTag { label: string; count: number; + description: string; } const MAX_TAGS = 5; @Component({ selector: 'app-person-interesting', - imports: [], + imports: [MatTooltipModule], templateUrl: './person-interesting.component.html', styleUrl: './person-interesting.component.scss', }) @@ -26,7 +28,11 @@ export class PersonInterestingComponent { const label = (topic.name ?? '').trim(); if (!label) continue; - tags.push({ label, count: topic.count ?? 0 }); + tags.push({ + label, + count: topic.count ?? 0, + description: (topic.description ?? '').trim(), + }); } return tags.sort((a, b) => b.count - a.count).slice(0, MAX_TAGS);