This commit is contained in:
@@ -10,6 +10,7 @@ api/funding.service.ts
|
||||
api/iNSEService.service.ts
|
||||
api/institutions.service.ts
|
||||
api/news.service.ts
|
||||
api/organization.service.ts
|
||||
api/patents.service.ts
|
||||
api/personNetwork.service.ts
|
||||
api/persons.service.ts
|
||||
@@ -56,6 +57,7 @@ model/cordisEuProject.ts
|
||||
model/cordisEuProjectPage.ts
|
||||
model/costUsd.ts
|
||||
model/createAccountRequest.ts
|
||||
model/createOrganizationRequest.ts
|
||||
model/customAuthor.ts
|
||||
model/customAuthorsListResponse.ts
|
||||
model/dehydratedAuthor.ts
|
||||
@@ -77,6 +79,8 @@ model/fwci.ts
|
||||
model/groupByResult.ts
|
||||
model/hTTPValidationError.ts
|
||||
model/idToken.ts
|
||||
model/inseAccountManagementModelOrganizationProfile.ts
|
||||
model/inseOrganizationManagementModelOrganizationProfile.ts
|
||||
model/institution.ts
|
||||
model/institutionFunderSummary.ts
|
||||
model/institutionGeo.ts
|
||||
@@ -99,7 +103,7 @@ model/newsArticle.ts
|
||||
model/newsArticleDetail.ts
|
||||
model/newsPage.ts
|
||||
model/openAccess.ts
|
||||
model/organizationProfile.ts
|
||||
model/organizationPage.ts
|
||||
model/patentEntry.ts
|
||||
model/patentsByAuthorResponse.ts
|
||||
model/personBio.ts
|
||||
@@ -127,6 +131,7 @@ model/topicsListResponse.ts
|
||||
model/universityRanking.ts
|
||||
model/universityTopicData.ts
|
||||
model/updateAccountRequest.ts
|
||||
model/updateOrganizationRequest.ts
|
||||
model/userRole.ts
|
||||
model/validationError.ts
|
||||
model/validationErrorLocInner.ts
|
||||
|
||||
@@ -10,6 +10,8 @@ export * from './institutions.service';
|
||||
import { InstitutionsService } from './institutions.service';
|
||||
export * from './news.service';
|
||||
import { NewsService } from './news.service';
|
||||
export * from './organization.service';
|
||||
import { OrganizationService } from './organization.service';
|
||||
export * from './patents.service';
|
||||
import { PatentsService } from './patents.service';
|
||||
export * from './personNetwork.service';
|
||||
@@ -22,4 +24,4 @@ export * from './topics.service';
|
||||
import { TopicsService } from './topics.service';
|
||||
export * from './works.service';
|
||||
import { WorksService } from './works.service';
|
||||
export const APIS = [AuthService, CompanyConnectionsService, FundingService, INSEServiceService, InstitutionsService, NewsService, PatentsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, WorksService];
|
||||
export const APIS = [AuthService, CompanyConnectionsService, FundingService, INSEServiceService, InstitutionsService, NewsService, OrganizationService, PatentsService, PersonNetworkService, PersonsService, ProjectsService, TopicsService, WorksService];
|
||||
|
||||
@@ -37,9 +37,9 @@ import { CreateAccountRequest } from '../model/createAccountRequest';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
// @ts-ignore
|
||||
import { LoginResponse } from '../model/loginResponse';
|
||||
import { InseAccountManagementModelOrganizationProfile } from '../model/inseAccountManagementModelOrganizationProfile';
|
||||
// @ts-ignore
|
||||
import { OrganizationProfile } from '../model/organizationProfile';
|
||||
import { LoginResponse } from '../model/loginResponse';
|
||||
// @ts-ignore
|
||||
import { UpdateAccountRequest } from '../model/updateAccountRequest';
|
||||
|
||||
@@ -434,9 +434,9 @@ export class AuthService extends BaseService {
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public listAccountOrganizations(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<OrganizationProfile>>;
|
||||
public listAccountOrganizations(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<OrganizationProfile>>>;
|
||||
public listAccountOrganizations(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<OrganizationProfile>>>;
|
||||
public listAccountOrganizations(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<InseAccountManagementModelOrganizationProfile>>;
|
||||
public listAccountOrganizations(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<InseAccountManagementModelOrganizationProfile>>>;
|
||||
public listAccountOrganizations(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<InseAccountManagementModelOrganizationProfile>>>;
|
||||
public listAccountOrganizations(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
@@ -469,7 +469,7 @@ export class AuthService extends BaseService {
|
||||
|
||||
let localVarPath = `/api/accounts/organizations`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<Array<OrganizationProfile>>('get', `${basePath}${localVarPath}`,
|
||||
return this.httpClient.request<Array<InseAccountManagementModelOrganizationProfile>>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
|
||||
@@ -0,0 +1,310 @@
|
||||
/**
|
||||
* Innovation Search Engine 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 { CreateOrganizationRequest } from '../model/createOrganizationRequest';
|
||||
// @ts-ignore
|
||||
import { HTTPValidationError } from '../model/hTTPValidationError';
|
||||
// @ts-ignore
|
||||
import { InseOrganizationManagementModelOrganizationProfile } from '../model/inseOrganizationManagementModelOrganizationProfile';
|
||||
// @ts-ignore
|
||||
import { OrganizationPage } from '../model/organizationPage';
|
||||
// @ts-ignore
|
||||
import { UpdateOrganizationRequest } from '../model/updateOrganizationRequest';
|
||||
|
||||
// @ts-ignore
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
import { BaseService } from '../api.base.service';
|
||||
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OrganizationService extends BaseService {
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string|string[], @Optional() configuration?: Configuration) {
|
||||
super(basePath, configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Organization
|
||||
* @endpoint post /api/organizations
|
||||
* @param createOrganizationRequest
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InseOrganizationManagementModelOrganizationProfile>;
|
||||
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InseOrganizationManagementModelOrganizationProfile>>;
|
||||
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InseOrganizationManagementModelOrganizationProfile>>;
|
||||
public createOrganisation(createOrganizationRequest: CreateOrganizationRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (createOrganizationRequest === null || createOrganizationRequest === undefined) {
|
||||
throw new Error('Required parameter createOrganizationRequest was null or undefined when calling createOrganisation.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (HTTPBearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/organizations`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<InseOrganizationManagementModelOrganizationProfile>('post', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: createOrganizationRequest,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete Organization
|
||||
* @endpoint delete /api/organizations/{organization_id}
|
||||
* @param organizationId
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteOrganisation(organizationId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
||||
public deleteOrganisation(organizationId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
||||
public deleteOrganisation(organizationId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
||||
public deleteOrganisation(organizationId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (organizationId === null || organizationId === undefined) {
|
||||
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganisation.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (HTTPBearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/organizations/${this.configuration.encodeParam({name: "organizationId", value: organizationId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Organizations
|
||||
* @endpoint get /api/organizations
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @param offset
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getOrganisations(page?: number, pageSize?: number, offset?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<OrganizationPage>;
|
||||
public getOrganisations(page?: number, pageSize?: number, offset?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<OrganizationPage>>;
|
||||
public getOrganisations(page?: number, pageSize?: number, offset?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<OrganizationPage>>;
|
||||
public getOrganisations(page?: number, pageSize?: number, offset?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
|
||||
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>page, 'page');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>pageSize, 'page_size');
|
||||
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
|
||||
<any>offset, 'offset');
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (HTTPBearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/organizations`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<OrganizationPage>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
params: localVarQueryParameters,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Organization
|
||||
* @endpoint put /api/organizations/{organization_id}
|
||||
* @param organizationId
|
||||
* @param updateOrganizationRequest
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<InseOrganizationManagementModelOrganizationProfile>;
|
||||
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<InseOrganizationManagementModelOrganizationProfile>>;
|
||||
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<InseOrganizationManagementModelOrganizationProfile>>;
|
||||
public updateOrganisation(organizationId: string, updateOrganizationRequest: UpdateOrganizationRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (organizationId === null || organizationId === undefined) {
|
||||
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganisation.');
|
||||
}
|
||||
if (updateOrganizationRequest === null || updateOrganizationRequest === undefined) {
|
||||
throw new Error('Required parameter updateOrganizationRequest was null or undefined when calling updateOrganisation.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
// authentication (HTTPBearer) required
|
||||
localVarHeaders = this.configuration.addCredentialToHeaders('HTTPBearer', 'Authorization', localVarHeaders, 'Bearer ');
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [
|
||||
'application/json'
|
||||
];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/organizations/${this.configuration.encodeParam({name: "organizationId", value: organizationId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: "uuid"})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<InseOrganizationManagementModelOrganizationProfile>('put', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
body: updateOrganizationRequest,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
export interface CreateOrganizationRequest {
|
||||
name: string;
|
||||
other_inst_id?: string | null;
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
|
||||
export interface OrganizationProfile {
|
||||
export interface InseAccountManagementModelOrganizationProfile {
|
||||
id: string;
|
||||
name: string;
|
||||
openalex_institution_id?: string | null;
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
export interface InseOrganizationManagementModelOrganizationProfile {
|
||||
id: string;
|
||||
name: string;
|
||||
other_inst_id?: string | null;
|
||||
deleted: boolean;
|
||||
member_count: number;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ export * from './cordisEuProject';
|
||||
export * from './cordisEuProjectPage';
|
||||
export * from './costUsd';
|
||||
export * from './createAccountRequest';
|
||||
export * from './createOrganizationRequest';
|
||||
export * from './customAuthor';
|
||||
export * from './customAuthorsListResponse';
|
||||
export * from './dehydratedAuthor';
|
||||
@@ -55,6 +56,8 @@ export * from './fwci';
|
||||
export * from './groupByResult';
|
||||
export * from './hTTPValidationError';
|
||||
export * from './idToken';
|
||||
export * from './inseAccountManagementModelOrganizationProfile';
|
||||
export * from './inseOrganizationManagementModelOrganizationProfile';
|
||||
export * from './institution';
|
||||
export * from './institutionFunderSummary';
|
||||
export * from './institutionGeo';
|
||||
@@ -76,7 +79,7 @@ export * from './newsArticle';
|
||||
export * from './newsArticleDetail';
|
||||
export * from './newsPage';
|
||||
export * from './openAccess';
|
||||
export * from './organizationProfile';
|
||||
export * from './organizationPage';
|
||||
export * from './patentEntry';
|
||||
export * from './patentsByAuthorResponse';
|
||||
export * from './personBio';
|
||||
@@ -104,6 +107,7 @@ export * from './topicsListResponse';
|
||||
export * from './universityRanking';
|
||||
export * from './universityTopicData';
|
||||
export * from './updateAccountRequest';
|
||||
export * from './updateOrganizationRequest';
|
||||
export * from './userRole';
|
||||
export * from './validationError';
|
||||
export * from './validationErrorLocInner';
|
||||
|
||||
@@ -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 { InseOrganizationManagementModelOrganizationProfile } from './inseOrganizationManagementModelOrganizationProfile';
|
||||
|
||||
|
||||
export interface OrganizationPage {
|
||||
items: Array<InseOrganizationManagementModelOrganizationProfile>;
|
||||
total: number;
|
||||
page: number;
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
@@ -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 UpdateOrganizationRequest {
|
||||
name?: string | null;
|
||||
other_inst_id?: string | null;
|
||||
deleted?: boolean | null;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import { registerLocaleData } from '@angular/common';
|
||||
import { authenticationInterceptor } from './shared/interceptors/authentication.interceptor';
|
||||
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
||||
import { MatPaginatorIntl } from '@angular/material/paginator';
|
||||
import { PaginatorIntl } from './shared/utils/paginatorIntl';
|
||||
import { PaginatorIntl } from './resolvers/utils/paginatorIntl';
|
||||
import { provideEchartsCore } from 'ngx-echarts';
|
||||
import { ErrorService } from './shared/services/error.service';
|
||||
import { provideApi } from './api/provide-api';
|
||||
|
||||
@@ -18,6 +18,7 @@ import { cordisEuProjectPageResolver } from './resolvers/cordis-eu-project-page.
|
||||
import { cordisEuProjectsFundingResolver } from './resolvers/cordis-eu-projects-funding.resolver';
|
||||
import { fundingProjectPageResolver } from './resolvers/funding-project-page.resolver';
|
||||
import { personCordisEuProjectPageResolver } from './resolvers/person-cordis-eu-project-page.resolver';
|
||||
import { accountResolver } from './resolvers/account.resolver';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
@@ -92,6 +93,17 @@ export const routes: Routes = [
|
||||
loadComponent: () =>
|
||||
import('./modules/news/news.component').then((mod) => mod.NewsComponent),
|
||||
},
|
||||
{
|
||||
path: 'account',
|
||||
canActivate: [userGuard],
|
||||
loadComponent: () =>
|
||||
import('./modules/account/account.component').then(
|
||||
(mod) => mod.AccountComponent,
|
||||
),
|
||||
resolve: {
|
||||
accountProfile: accountResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'accounts',
|
||||
canActivate: [adminGuard],
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<div class="content">
|
||||
<div class="account-profile-information">
|
||||
<div class="personal-information">
|
||||
<span class="name">{{ accountProfile().name }}</span>
|
||||
<span class="mail">{{ accountProfile().email }}</span>
|
||||
</div>
|
||||
<span class="organization">{{ accountProfile().organization_name }}</span>
|
||||
<mat-chip-set>
|
||||
@for (role of roles; track $index) {
|
||||
<mat-chip class="role-chip">{{ role | role }}</mat-chip>
|
||||
}
|
||||
</mat-chip-set>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-divider />
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Einstellungen"></mat-tab>
|
||||
</mat-tab-group>
|
||||
@@ -0,0 +1,44 @@
|
||||
.content {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.account-profile-information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.personal-information {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.role-chip {
|
||||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text-muted);
|
||||
background: var(--sg-surface-muted);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text-primary);
|
||||
}
|
||||
|
||||
.mail {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.organization {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import { Component, effect, input } from '@angular/core';
|
||||
import { AccountProfile, UserRole } from '../../api';
|
||||
import { RolePipe } from '../../shared/pipes/role.pipe';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import { MatDividerModule } from '@angular/material/divider';
|
||||
|
||||
@Component({
|
||||
selector: 'app-account',
|
||||
imports: [RolePipe, MatChipsModule, MatTabsModule, MatDividerModule],
|
||||
templateUrl: './account.component.html',
|
||||
styleUrl: './account.component.scss',
|
||||
})
|
||||
export class AccountComponent {
|
||||
readonly accountProfile = input.required<AccountProfile>();
|
||||
|
||||
roles: UserRole[] = [];
|
||||
|
||||
constructor() {
|
||||
effect(() => {
|
||||
this.roles = [this.accountProfile().role];
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
<td>{{ account.email }}</td>
|
||||
<td>{{ account.organization_name }}</td>
|
||||
<td>
|
||||
<span class="role">{{ account.role }}</span>
|
||||
<span class="role">{{ account.role | role }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="status" [class.status--deleted]="account.deleted">
|
||||
|
||||
@@ -21,6 +21,7 @@ import type {
|
||||
AccountDialogComponent,
|
||||
AccountDialogResult,
|
||||
} from './account-dialog.component';
|
||||
import { RolePipe } from '../../shared/pipes/role.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-accounts',
|
||||
@@ -34,6 +35,7 @@ import type {
|
||||
MatSelectModule,
|
||||
MatSnackBarModule,
|
||||
MatDialogModule,
|
||||
RolePipe,
|
||||
],
|
||||
templateUrl: './accounts.component.html',
|
||||
styleUrl: './accounts.component.scss',
|
||||
@@ -164,8 +166,7 @@ export class AccountsComponent implements OnInit {
|
||||
data: {
|
||||
...data,
|
||||
organizations: this.organizations,
|
||||
canSelectOrganization:
|
||||
this.credentialService.isEffectiveSuperAdmin(),
|
||||
canSelectOrganization: this.credentialService.isEffectiveSuperAdmin(),
|
||||
roles: this.availableRoles,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
import { TopicCount } from '../../api';
|
||||
import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component';
|
||||
import { topicHierarchyColor } from '../../shared/utils/topic-colors';
|
||||
import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
|
||||
|
||||
interface InterestTag {
|
||||
id: string;
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ import {
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import { TopicChipComponent } from '../../../../shared/ui/topic-chip/topic-chip.component';
|
||||
import { topicHierarchyColor } from '../../../../shared/utils/topic-colors';
|
||||
import { buildTopicHierarchyTooltip } from '../../../../shared/utils/topic-tooltip';
|
||||
import { topicHierarchyColor } from '../../../../resolvers/utils/topic-colors';
|
||||
import { buildTopicHierarchyTooltip } from '../../../../resolvers/utils/topic-tooltip';
|
||||
|
||||
export interface TopicTimelineTopic {
|
||||
id?: string;
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
|
||||
import { Work, WorksService } from '../../api';
|
||||
import { PaginationService } from '../../shared/services/pagination.service';
|
||||
import { createLoadError } from '../../shared/utils/errorHandler';
|
||||
import { createLoadError } from '../../resolvers/utils/errorHandler';
|
||||
import { ChipComponent } from '../../shared/ui/chip/chip.component';
|
||||
|
||||
interface InstitutionAutocompleteOption {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import { ResolveFn } from '@angular/router';
|
||||
import { AccountProfile } from '../api';
|
||||
import { inject } from '@angular/core';
|
||||
import { AccountManagementService } from '../shared/services/account-management.service';
|
||||
|
||||
export const accountResolver: ResolveFn<AccountProfile> = (route, state) => {
|
||||
return inject(AccountManagementService).getCurrentAccount();
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { UserRole } from '../../api';
|
||||
|
||||
@Pipe({
|
||||
name: 'role',
|
||||
})
|
||||
export class RolePipe implements PipeTransform {
|
||||
transform(value: UserRole, ...args: unknown[]): string {
|
||||
switch (value) {
|
||||
case UserRole.SuperAdmin:
|
||||
return 'Super Admin';
|
||||
case UserRole.Admin:
|
||||
return 'Admin';
|
||||
case UserRole.Manager:
|
||||
return 'Manager';
|
||||
case UserRole.User:
|
||||
return 'Benutzer';
|
||||
default:
|
||||
return 'Unknown';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,9 @@ export class AccountManagementService {
|
||||
private readonly apiConfiguration = inject(Configuration, { optional: true });
|
||||
|
||||
getCurrentAccount(): Observable<AccountProfile> {
|
||||
return this.httpClient.get<AccountProfile>(`${this.apiBasePath}/api/accounts/me`);
|
||||
return this.httpClient.get<AccountProfile>(
|
||||
`${this.apiBasePath}/api/accounts/me`,
|
||||
);
|
||||
}
|
||||
|
||||
listAccounts(options: {
|
||||
@@ -77,9 +79,12 @@ export class AccountManagementService {
|
||||
params = params.set('organization_id', options.organizationId);
|
||||
}
|
||||
|
||||
return this.httpClient.get<AccountPage>(`${this.apiBasePath}/api/accounts`, {
|
||||
params,
|
||||
});
|
||||
return this.httpClient.get<AccountPage>(
|
||||
`${this.apiBasePath}/api/accounts`,
|
||||
{
|
||||
params,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
createAccount(payload: CreateAccountPayload): Observable<AccountProfile> {
|
||||
|
||||
@@ -111,17 +111,20 @@
|
||||
</div>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="account-card">
|
||||
<div class="avatar">
|
||||
{{ (credentialService.login | async)?.charAt(0) }}
|
||||
</div>
|
||||
<div>
|
||||
<strong>{{
|
||||
(credentialService.login | async) || 'Max Mustermann'
|
||||
}}</strong>
|
||||
<strong>{{ credentialService.organizationName | async }}</strong>
|
||||
</div>
|
||||
<mat-icon>expand_more</mat-icon>
|
||||
<div [routerLink]="['/account']">
|
||||
<mat-card appearance="outlined" class="account-card-content">
|
||||
<mat-card-content class="account-card">
|
||||
<div class="avatar">
|
||||
{{ (credentialService.login | async)?.charAt(0) }}
|
||||
</div>
|
||||
<div>
|
||||
<strong>{{
|
||||
(credentialService.login | async) || 'Max Mustermann'
|
||||
}}</strong>
|
||||
<strong>{{ credentialService.organizationName | async }}</strong>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -174,16 +174,22 @@
|
||||
min-height: 28px;
|
||||
}
|
||||
|
||||
.account-card-content {
|
||||
background: var(--sg-none);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
}
|
||||
|
||||
.account-card {
|
||||
display: grid;
|
||||
grid-template-columns: 40px 1fr 20px;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
min-height: 68px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid var(--sg-border);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: var(--sg-surface);
|
||||
|
||||
:hover {
|
||||
cursor: pointer;
|
||||
background: var(--sg-background-hover);
|
||||
}
|
||||
}
|
||||
|
||||
.account-icon {
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { Component, computed, inject, input, output } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {
|
||||
IsActiveMatchOptions,
|
||||
Router,
|
||||
RouterLink,
|
||||
RouterLinkActive,
|
||||
} from '@angular/router';
|
||||
import { IsActiveMatchOptions, Router, RouterModule } from '@angular/router';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
@@ -14,6 +9,7 @@ import { CredentialService } from '../../services/credential.service';
|
||||
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { ConfirmationDialogComponent } from '../confirmation-dialog/confirmation-dialog.component';
|
||||
import { MatCardContent, MatCardModule } from '@angular/material/card';
|
||||
|
||||
type NavItem = {
|
||||
label: string;
|
||||
@@ -36,13 +32,14 @@ type NavItemGroup = {
|
||||
selector: 'app-menu',
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterLink,
|
||||
RouterModule,
|
||||
MatIconModule,
|
||||
MatListModule,
|
||||
RouterLinkActive,
|
||||
MatProgressBarModule,
|
||||
MatButtonModule,
|
||||
MatTooltipModule,
|
||||
MatCardModule,
|
||||
MatCardContent,
|
||||
],
|
||||
templateUrl: './app-menu.component.html',
|
||||
styleUrl: './app-menu.component.scss',
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatTooltipModule } from '@angular/material/tooltip';
|
||||
import { buildTopicHierarchyTooltip } from '../../utils/topic-tooltip';
|
||||
import { buildTopicHierarchyTooltip } from '../../../resolvers/utils/topic-tooltip';
|
||||
|
||||
export const TOPIC_CHIP_PALETTE = [
|
||||
'purple',
|
||||
|
||||
Reference in New Issue
Block a user