diff --git a/src/modules/mgmt-api-client/api.module.ts b/src/modules/mgmt-api-client/api.module.ts index 677ff2d40..17e6fad30 100644 --- a/src/modules/mgmt-api-client/api.module.ts +++ b/src/modules/mgmt-api-client/api.module.ts @@ -4,7 +4,6 @@ import { HttpClient } from '@angular/common/http'; import { ApplicationObservabilityService } from './api/applicationObservability.service'; import { AssetService } from './api/asset.service'; -import { CatalogService } from './api/catalog.service'; import { ContractAgreementService } from './api/contractAgreement.service'; import { ContractDefinitionService } from './api/contractDefinition.service'; import { ContractNegotiationService } from './api/contractNegotiation.service'; diff --git a/src/modules/mgmt-api-client/api/api.ts b/src/modules/mgmt-api-client/api/api.ts index c0cab0b7d..0d30304ec 100644 --- a/src/modules/mgmt-api-client/api/api.ts +++ b/src/modules/mgmt-api-client/api/api.ts @@ -2,8 +2,6 @@ export * from './applicationObservability.service'; import { ApplicationObservabilityService } from './applicationObservability.service'; export * from './asset.service'; import { AssetService } from './asset.service'; -export * from './catalog.service'; -import { CatalogService } from './catalog.service'; export * from './contractAgreement.service'; import { ContractAgreementService } from './contractAgreement.service'; export * from './contractDefinition.service'; @@ -18,4 +16,4 @@ export * from './policy.service'; import { PolicyService } from './policy.service'; export * from './transferProcess.service'; import { TransferProcessService } from './transferProcess.service'; -export const APIS = [ApplicationObservabilityService, AssetService, CatalogService, ContractAgreementService, ContractDefinitionService, ContractNegotiationService, DataplaneSelectorService, HTTPProvisionerWebhookService, PolicyService, TransferProcessService]; +export const APIS = [ApplicationObservabilityService, AssetService, ContractAgreementService, ContractDefinitionService, ContractNegotiationService, DataplaneSelectorService, HTTPProvisionerWebhookService, PolicyService, TransferProcessService]; diff --git a/src/modules/mgmt-api-client/api/catalog.service.ts b/src/modules/mgmt-api-client/api/catalog.service.ts deleted file mode 100644 index ce89fabfa..000000000 --- a/src/modules/mgmt-api-client/api/catalog.service.ts +++ /dev/null @@ -1,252 +0,0 @@ -/** - * EDC REST API - * EDC REST APIs - merged by OpenApiMerger - * - * The version of the OpenAPI document: 0.0.1-SNAPSHOT - * - * - * 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 { Catalog } from '../model/catalog'; -// @ts-ignore -import { CatalogRequestDto } from '../model/catalogRequestDto'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable({ - providedIn: 'root' -}) -export class CatalogService { - - protected basePath = 'http://localhost'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (Array.isArray(basePath) && basePath.length > 0) { - basePath = basePath[0]; - } - - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - // @ts-ignore - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - httpParams = this.addToHttpParamsRecursive(httpParams, value); - } else { - httpParams = this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams = httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * @param providerUrl - * @param offset - * @param limit - * @param filter - * @param sort - * @param sortField - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - * @deprecated - */ - public getCatalog(providerUrl: string, offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; - public getCatalog(providerUrl: string, offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getCatalog(providerUrl: string, offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public getCatalog(providerUrl: string, offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { - if (providerUrl === null || providerUrl === undefined) { - throw new Error('Required parameter providerUrl was null or undefined when calling getCatalog.'); - } - - let localVarQueryParameters = new HttpParams({encoder: this.encoder}); - if (providerUrl !== undefined && providerUrl !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - providerUrl, 'providerUrl'); - } - if (offset !== undefined && offset !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - offset, 'offset'); - } - if (limit !== undefined && limit !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - limit, 'limit'); - } - if (filter !== undefined && filter !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - filter, 'filter'); - } - if (sort !== undefined && sort !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sort, 'sort'); - } - if (sortField !== undefined && sortField !== null) { - localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, - sortField, 'sortField'); - } - - let localVarHeaders = this.defaultHeaders; - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - let 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 = `/catalog`; - return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - params: localVarQueryParameters, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * @param catalogRequestDto - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public requestCatalog(catalogRequestDto: CatalogRequestDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; - public requestCatalog(catalogRequestDto: CatalogRequestDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public requestCatalog(catalogRequestDto: CatalogRequestDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; - public requestCatalog(catalogRequestDto: CatalogRequestDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { - if (catalogRequestDto === null || catalogRequestDto === undefined) { - throw new Error('Required parameter catalogRequestDto was null or undefined when calling requestCatalog.'); - } - - let localVarHeaders = this.defaultHeaders; - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'application/json' - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - ]; - 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 = `/catalog/request`; - return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, - { - context: localVarHttpContext, - body: catalogRequestDto, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - -}