Id |
- {{item['@id']}} |
+ {{item.id}} |
State |
- {{item['edc:state']}} |
+ {{item.state}} |
- Last updated |
- {{asDate(item['edc:stateTimestamp'])}} |
-
+ Last updated |
+ {{asDate(item.mandatoryValue('edc', 'stateTimestamp'))}} |
+
ConnectorId |
- {{item['edc:connectorId']}} |
+ {{item.connectorId}} |
AssetId |
- {{item['edc:assetId']}} |
+ {{item.assetId}} |
ContractId |
- {{item['edc:contractId']}} |
+ {{item.contractId}} |
diff --git a/src/modules/edc-demo/components/transfer-history/transfer-history-viewer.component.ts b/src/modules/edc-demo/components/transfer-history/transfer-history-viewer.component.ts
index f2e0c1b54..0416452b8 100644
--- a/src/modules/edc-demo/components/transfer-history/transfer-history-viewer.component.ts
+++ b/src/modules/edc-demo/components/transfer-history/transfer-history-viewer.component.ts
@@ -1,6 +1,7 @@
import {Component, OnInit} from '@angular/core';
import {Observable, of} from 'rxjs';
-import {TransferProcessDto, TransferProcessService} from "../../../mgmt-api-client";
+import {TransferProcessService} from "../../../mgmt-api-client";
+import {TransferProcess} from "../../../mgmt-api-client/model";
import {AppConfigService} from "../../../app/app-config.service";
import {ConfirmationDialogComponent, ConfirmDialogModel} from "../confirmation-dialog/confirmation-dialog.component";
import {MatDialog} from "@angular/material/dialog";
@@ -13,7 +14,7 @@ import {MatDialog} from "@angular/material/dialog";
export class TransferHistoryViewerComponent implements OnInit {
columns: string[] = ['id', 'state', 'lastUpdated', 'connectorId', 'assetId', 'contractId', 'action'];
- transferProcesses$: Observable = of([]);
+ transferProcesses$: Observable = of([]);
storageExplorerLinkTemplate: string | undefined;
constructor(private transferProcessService: TransferProcessService,
@@ -26,7 +27,7 @@ export class TransferHistoryViewerComponent implements OnInit {
this.storageExplorerLinkTemplate = this.appConfigService.getConfig()?.storageExplorerLinkTemplate
}
- onDeprovision(transferProcess: TransferProcessDto): void {
+ onDeprovision(transferProcess: TransferProcess): void {
const dialogData = new ConfirmDialogModel("Confirm deprovision", `Deprovisioning resources for transfer [${transferProcess["@id"]}] will take some time and once started, it cannot be stopped.`)
dialogData.confirmColor = "warn";
@@ -36,21 +37,21 @@ export class TransferHistoryViewerComponent implements OnInit {
ref.afterClosed().subscribe(res => {
if (res) {
- this.transferProcessService.deprovisionTransferProcess(transferProcess["@id"]!).subscribe(() => this.loadTransferProcesses());
+ this.transferProcessService.deprovisionTransferProcess(transferProcess["@id"]!).subscribe(() => this.loadTransferProcesses());
}
});
}
- showStorageExplorerLink(transferProcess: TransferProcessDto) {
- return transferProcess["edc:dataDestination"]?.properties?.type === 'AzureStorage' && transferProcess["edc:state"] === 'COMPLETED';
+ showStorageExplorerLink(transferProcess: TransferProcess) {
+ return transferProcess.dataDestination?.properties?.type === 'AzureStorage' && transferProcess.state === 'COMPLETED';
}
- showDeprovisionButton(transferProcess: TransferProcessDto) {
- return ['COMPLETED', 'PROVISIONED', 'REQUESTED', 'REQUESTED_ACK', 'IN_PROGRESS', 'STREAMING'].includes(transferProcess["edc:state"]!);
+ showDeprovisionButton(transferProcess: TransferProcess) {
+ return ['COMPLETED', 'PROVISIONED', 'REQUESTED', 'REQUESTED_ACK', 'IN_PROGRESS', 'STREAMING'].includes(transferProcess.state!);
}
loadTransferProcesses() {
- this.transferProcesses$ = this.transferProcessService.queryAllTransferProcesses();
+ this.transferProcesses$ = this.transferProcessService.queryAllTransferProcesses();
}
asDate(epochMillis?: number) {
diff --git a/src/modules/edc-demo/models/asset.ts b/src/modules/edc-demo/models/asset.ts
deleted file mode 100644
index 4421ef327..000000000
--- a/src/modules/edc-demo/models/asset.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-
-export class Asset {
- private static readonly PROPERTY_ID:string = "edc:id";
- private static readonly PROPERTY_NAME = "edc:name";
- private static readonly PROPERTY_VERSION = "edc:version";
- private static readonly PROPERTY_CONTENT_TYPE = "edc:contenttype";
- private static readonly PROPERTY_POLICY_ID = "edc:policy-id";
- private static readonly PROPERTY_ORIGINATOR = "edc:originator";
- private static readonly PROPERTY_TYPE = "type";
- private static readonly KNOWN_PROPERTY_KEYS = [
- Asset.PROPERTY_ID,
- Asset.PROPERTY_NAME,
- Asset.PROPERTY_VERSION,
- Asset.PROPERTY_CONTENT_TYPE,
- Asset.PROPERTY_POLICY_ID,
- Asset.PROPERTY_TYPE,
- Asset.PROPERTY_ORIGINATOR
- ];
-
- constructor(public properties: { [key: string]: string; }) {
- }
-
- public get id() {
- return this.properties[Asset.PROPERTY_ID];
- }
-
- public set id(value: string) {
- this.properties[Asset.PROPERTY_ID] = value;
- }
-
- public get name() {
- return this.properties[Asset.PROPERTY_NAME];
- }
-
- public set name(value: string) {
- this.properties[Asset.PROPERTY_NAME] = value;
- }
-
- public get version() {
- return this.properties[Asset.PROPERTY_VERSION];
- }
-
- public set version(value: string) {
- this.properties[Asset.PROPERTY_VERSION] = value;
- }
-
- public get contentType() {
- return this.properties[Asset.PROPERTY_CONTENT_TYPE];
- }
-
- public set contentType(value: string) {
- this.properties[Asset.PROPERTY_CONTENT_TYPE] = value;
- }
-
- public get policyId() {
- return this.properties[Asset.PROPERTY_POLICY_ID];
- }
-
- public set policyId(value: string) {
- this.properties[Asset.PROPERTY_POLICY_ID] = value;
- }
-
- public get type() {
- return this.properties[Asset.PROPERTY_TYPE];
- }
-
- public set type(value: string) {
- this.properties[Asset.PROPERTY_TYPE] = value;
- }
-
- public get originator() {
- return this.properties[Asset.PROPERTY_ORIGINATOR];
- }
-
- public set originator(value: string) {
- this.properties[Asset.PROPERTY_ORIGINATOR] = value;
- }
-
- public get additionalPropertyKeys() {
- return Object.keys(this.properties)
- .filter(propertyKey => !Asset.KNOWN_PROPERTY_KEYS.includes(propertyKey));
- }
-
- public get isAsync() {
- return this.type !== 'http'
- }
-}
diff --git a/src/modules/edc-demo/models/catalog.ts b/src/modules/edc-demo/models/catalog.ts
new file mode 100644
index 000000000..af380797a
--- /dev/null
+++ b/src/modules/edc-demo/models/catalog.ts
@@ -0,0 +1,10 @@
+import { ContractOffer } from './contract-offer';
+import { DataService } from "./data-service";
+
+export interface Catalog {
+ id?: string;
+ contractOffers?: Array;
+ "dcat:dataset": Array;
+ "dcat:service": DataService;
+ "edc:originator": string;
+}
diff --git a/src/modules/edc-demo/models/contract-offer.ts b/src/modules/edc-demo/models/contract-offer.ts
index b39115187..1e99ba865 100644
--- a/src/modules/edc-demo/models/contract-offer.ts
+++ b/src/modules/edc-demo/models/contract-offer.ts
@@ -1,13 +1,12 @@
-import { Asset } from "./asset";
-import {Policy} from "../../mgmt-api-client";
import {DataService} from "./data-service";
+import {PolicyInput} from "../../mgmt-api-client/model";
export interface ContractOffer {
id: string;
- contractOffers: Array;
+ assetId: string;
+ properties: any;
"dcat:dataset": Array;
"dcat:service": DataService;
- asset: Asset;
- policy: Policy;
- "edc:originator": string;
+ policy: PolicyInput;
+ originator: string;
}
diff --git a/src/modules/edc-demo/services/catalog-browser.service.ts b/src/modules/edc-demo/services/catalog-browser.service.ts
index 51253fe7a..ecd8063d1 100644
--- a/src/modules/edc-demo/services/catalog-browser.service.ts
+++ b/src/modules/edc-demo/services/catalog-browser.service.ts
@@ -2,19 +2,22 @@ import {HttpClient, HttpErrorResponse, HttpHeaders, HttpParams} from '@angular/c
import {Inject, Injectable} from '@angular/core';
import {EMPTY, Observable} from 'rxjs';
import {catchError, map, reduce} from 'rxjs/operators';
-import {Asset} from '../models/asset';
+import {Catalog} from '../models/catalog';
import {ContractOffer} from '../models/contract-offer';
import {
- ContractNegotiationDto,
ContractNegotiationService,
- NegotiationInitiateRequestDto,
- Policy,
- TransferProcessDto,
TransferProcessService,
- TransferRequestDto,
} from "../../mgmt-api-client";
import {CONNECTOR_CATALOG_API, CONNECTOR_MANAGEMENT_API} from "../../app/variables";
-import TypeEnum = Policy.TypeEnum;
+// import TypeEnum = Policy.TypeEnum; //TODO Use TypeEnum https://github.com/Think-iT-Labs/edc-connector-client/issues/103
+import {
+ ContractNegotiationRequest,
+ ContractNegotiation,
+ PolicyInput,
+ TransferProcess,
+ TransferProcessInput
+} from "../../mgmt-api-client/model";
+
/**
@@ -34,55 +37,50 @@ export class CatalogBrowserService {
getContractOffers(): Observable {
let url = this.catalogApiUrl || this.managementApiUrl;
- return this.post(url + "/federatedcatalog")
- .pipe(map(contractOffers => contractOffers.map(contractOffer => {
+ return this.post(url + "/federatedcatalog")
+ .pipe(map(catalogs => catalogs.map(catalog => {
const arr = Array();
- let isFirst = true;
- //divides multiple offers in dataSets into separate contractOffers.
- for(let i = 0; i {
@@ -95,19 +93,19 @@ export class CatalogBrowserService {
}, new Array()));
}
- initiateTransfer(transferRequest: TransferRequestDto): Observable {
- return this.transferProcessService.initiateTransfer(transferRequest).pipe(map(t => t["@id"]!))
+ initiateTransfer(transferRequest: TransferProcessInput): Observable {
+ return this.transferProcessService.initiateTransfer(transferRequest).pipe(map(t => t.id!))
}
- getTransferProcessesById(id: string): Observable {
+ getTransferProcessesById(id: string): Observable {
return this.transferProcessService.getTransferProcess(id);
}
- initiateNegotiation(initiateDto: NegotiationInitiateRequestDto): Observable {
- return this.negotiationService.initiateContractNegotiation(initiateDto, 'body', false,).pipe(map(t => t["@id"]!))
+ initiateNegotiation(initiate: ContractNegotiationRequest): Observable {
+ return this.negotiationService.initiateContractNegotiation(initiate).pipe(map(t => t.id!))
}
- getNegotiationState(id: string): Observable {
+ getNegotiationState(id: string): Observable {
return this.negotiationService.getNegotiation(id);
}
diff --git a/src/modules/mgmt-api-client/.openapi-generator/FILES b/src/modules/mgmt-api-client/.openapi-generator/FILES
deleted file mode 100644
index c65775f94..000000000
--- a/src/modules/mgmt-api-client/.openapi-generator/FILES
+++ /dev/null
@@ -1,62 +0,0 @@
-.gitignore
-README.md
-api.module.ts
-api/api.ts
-api/applicationObservability.service.ts
-api/asset.service.ts
-api/catalog.service.ts
-api/contractAgreement.service.ts
-api/contractDefinition.service.ts
-api/contractNegotiation.service.ts
-api/dataplaneSelector.service.ts
-api/hTTPProvisionerWebhook.service.ts
-api/policy.service.ts
-api/transferProcess.service.ts
-configuration.ts
-encoder.ts
-git_push.sh
-index.ts
-model/action.ts
-model/apiErrorDetail.ts
-model/asset.ts
-model/assetEntryDto.ts
-model/assetRequestDto.ts
-model/assetResponseDto.ts
-model/catalog.ts
-model/catalogRequestDto.ts
-model/constraint.ts
-model/contractAgreementDto.ts
-model/contractDefinitionRequestDto.ts
-model/contractDefinitionResponseDto.ts
-model/contractNegotiationDto.ts
-model/contractOffer.ts
-model/contractOfferDescription.ts
-model/criterionDto.ts
-model/dataAddress.ts
-model/dataAddressDto.ts
-model/dataAddressInformationDto.ts
-model/dataPlaneInstance.ts
-model/dataRequestDto.ts
-model/deprovisionedResource.ts
-model/duty.ts
-model/failure.ts
-model/healthCheckResult.ts
-model/healthStatus.ts
-model/idResponseDto.ts
-model/models.ts
-model/negotiationInitiateRequestDto.ts
-model/negotiationState.ts
-model/permission.ts
-model/policy.ts
-model/policyDefinitionRequestDto.ts
-model/policyDefinitionResponseDto.ts
-model/prohibition.ts
-model/provisionerWebhookRequest.ts
-model/querySpecDto.ts
-model/selectionRequest.ts
-model/transferProcessDto.ts
-model/transferRequestDto.ts
-model/transferState.ts
-model/transferType.ts
-param.ts
-variables.ts
diff --git a/src/modules/mgmt-api-client/.openapi-generator/VERSION b/src/modules/mgmt-api-client/.openapi-generator/VERSION
deleted file mode 100644
index d6b4ec4aa..000000000
--- a/src/modules/mgmt-api-client/.openapi-generator/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-6.3.0-SNAPSHOT
\ No newline at end of file
diff --git a/src/modules/mgmt-api-client/api.module.ts b/src/modules/mgmt-api-client/api.module.ts
index 677ff2d40..12b394df9 100644
--- a/src/modules/mgmt-api-client/api.module.ts
+++ b/src/modules/mgmt-api-client/api.module.ts
@@ -2,17 +2,6 @@ import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core
import { Configuration } from './configuration';
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';
-import { DataplaneSelectorService } from './api/dataplaneSelector.service';
-import { HTTPProvisionerWebhookService } from './api/hTTPProvisionerWebhook.service';
-import { PolicyService } from './api/policy.service';
-import { TransferProcessService } from './api/transferProcess.service';
-
@NgModule({
imports: [],
declarations: [],
diff --git a/src/modules/mgmt-api-client/api/api.ts b/src/modules/mgmt-api-client/api/api.ts
index c0cab0b7d..3795f3ea0 100644
--- a/src/modules/mgmt-api-client/api/api.ts
+++ b/src/modules/mgmt-api-client/api/api.ts
@@ -1,21 +1,13 @@
-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';
import { ContractDefinitionService } from './contractDefinition.service';
export * from './contractNegotiation.service';
import { ContractNegotiationService } from './contractNegotiation.service';
-export * from './dataplaneSelector.service';
-import { DataplaneSelectorService } from './dataplaneSelector.service';
-export * from './hTTPProvisionerWebhook.service';
-import { HTTPProvisionerWebhookService } from './hTTPProvisionerWebhook.service';
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 = [AssetService, ContractAgreementService, ContractDefinitionService, ContractNegotiationService, PolicyService, TransferProcessService];
diff --git a/src/modules/mgmt-api-client/api/applicationObservability.service.ts b/src/modules/mgmt-api-client/api/applicationObservability.service.ts
deleted file mode 100644
index 157ef5028..000000000
--- a/src/modules/mgmt-api-client/api/applicationObservability.service.ts
+++ /dev/null
@@ -1,310 +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 { HealthStatus } from '../model/healthStatus';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class ApplicationObservabilityService {
-
- 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;
- }
-
- /**
- * Performs a liveness probe to determine whether the runtime is working properly.
- * @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 checkHealth(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public checkHealth(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public checkHealth(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public checkHealth(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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 = `/check/health`;
- return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Performs a liveness probe to determine whether the runtime is working properly.
- * @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 getLiveness(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getLiveness(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getLiveness(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getLiveness(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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 = `/check/liveness`;
- return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Performs a readiness probe to determine whether the runtime is able to accept requests.
- * @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 getReadiness(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getReadiness(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getReadiness(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getReadiness(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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 = `/check/readiness`;
- return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Performs a startup probe to determine whether the runtime has completed startup.
- * @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 getStartup(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getStartup(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getStartup(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getStartup(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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 = `/check/startup`;
- return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
-}
diff --git a/src/modules/mgmt-api-client/api/asset.service.ts b/src/modules/mgmt-api-client/api/asset.service.ts
index 44b3945cb..261326393 100644
--- a/src/modules/mgmt-api-client/api/asset.service.ts
+++ b/src/modules/mgmt-api-client/api/asset.service.ts
@@ -78,15 +78,15 @@ export class AssetService {
/**
* all assets according to a particular query
- * @param querySpecDto
+ * @param querySpec
* @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 requestAssets(querySpecDto?: QuerySpec, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public requestAssets(querySpecDto?: QuerySpec, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public requestAssets(querySpecDto?: QuerySpec, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public requestAssets(querySpecDto?: QuerySpec): Observable {
- return from(this.assets.queryAll(querySpecDto))
+ public requestAssets(querySpec?: QuerySpec, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public requestAssets(querySpec?: QuerySpec, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
+ public requestAssets(querySpec?: QuerySpec, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
+ public requestAssets(querySpec?: QuerySpec): Observable {
+ return from(this.assets.queryAll(querySpec))
}
}
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
- }
- );
- }
-
-}
diff --git a/src/modules/mgmt-api-client/api/contractAgreement.service.ts b/src/modules/mgmt-api-client/api/contractAgreement.service.ts
index 239c81e8a..0f6c7cc50 100644
--- a/src/modules/mgmt-api-client/api/contractAgreement.service.ts
+++ b/src/modules/mgmt-api-client/api/contractAgreement.service.ts
@@ -11,24 +11,12 @@
*/
/* 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 { ApiErrorDetail } from '../model/apiErrorDetail';
-// @ts-ignore
-import { ContractAgreementDto } from '../model/contractAgreementDto';
-// @ts-ignore
-import { QuerySpecDto } from '../model/querySpecDto';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
+import { Injectable } from '@angular/core';
+import { HttpResponse, HttpEvent, HttpContext } from '@angular/common/http';
+import { Observable, from } from 'rxjs';
+import { EdcConnectorClient } from '@think-it-labs/edc-connector-client';
+import { ContractAgreement, QuerySpec } from '../model'
@Injectable({
@@ -36,268 +24,23 @@ import { Configuration } from '../configurat
})
export class ContractAgreementService {
- 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();
- }
+ private contractAgreements = this.edcConnectorClient.management.contractAgreements;
+ constructor(private edcConnectorClient: EdcConnectorClient) {
- // @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;
}
/**
* Gets all contract agreements according to a particular query
- * @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 getAllAgreements(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getAllAgreements(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAllAgreements(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAllAgreements(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- let localVarQueryParameters = new HttpParams({encoder: this.encoder});
- 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 = `/v2/contractagreements`;
- 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
- }
- );
- }
-
- /**
- * Gets an contract agreement with the given ID
- * @param id
+ * @param querySpec
* @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 getContractAgreement(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public getContractAgreement(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getContractAgreement(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getContractAgreement(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getContractAgreement.');
- }
-
- 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 = `/v2/contractagreements/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Gets all contract agreements according to a particular query
- * @param querySpecDto
- * @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 queryAllAgreements(querySpecDto?: QuerySpecDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public queryAllAgreements(querySpecDto?: QuerySpecDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public queryAllAgreements(querySpecDto?: QuerySpecDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public queryAllAgreements(querySpecDto?: QuerySpecDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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 = `/v2/contractagreements/request`;
- return this.httpClient.request>('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: querySpecDto,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
+ public queryAllAgreements(querySpec?: QuerySpec, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public queryAllAgreements(querySpec?: QuerySpec, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
+ public queryAllAgreements(querySpec?: QuerySpec, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
+ public queryAllAgreements(querySpec?: QuerySpec): Observable {
+ return from(this.contractAgreements.queryAll(querySpec))
}
}
diff --git a/src/modules/mgmt-api-client/api/contractDefinition.service.ts b/src/modules/mgmt-api-client/api/contractDefinition.service.ts
index bc9f352ca..4577135be 100644
--- a/src/modules/mgmt-api-client/api/contractDefinition.service.ts
+++ b/src/modules/mgmt-api-client/api/contractDefinition.service.ts
@@ -58,20 +58,6 @@ export class ContractDefinitionService {
return from(this.contractDefinitions.delete(id))
}
- /**
- * Returns all contract definitions according to a query
- * @param querySpec
- * @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 getAllContractDefinitions(querySpec?: QuerySpec, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getAllContractDefinitions(querySpec?: QuerySpec, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAllContractDefinitions(querySpec?: QuerySpec, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAllContractDefinitions(querySpec?: QuerySpec): Observable {
- return from(this.contractDefinitions.queryAll(querySpec))
- }
-
/**
* Gets an contract definition with the given ID
* @param id
diff --git a/src/modules/mgmt-api-client/api/contractNegotiation.service.ts b/src/modules/mgmt-api-client/api/contractNegotiation.service.ts
index 2decfd31d..92fb7d9f9 100644
--- a/src/modules/mgmt-api-client/api/contractNegotiation.service.ts
+++ b/src/modules/mgmt-api-client/api/contractNegotiation.service.ts
@@ -11,32 +11,11 @@
*/
/* 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 { ApiErrorDetail } from '../model/apiErrorDetail';
-// @ts-ignore
-import { ContractAgreementDto } from '../model/contractAgreementDto';
-// @ts-ignore
-import { ContractNegotiationDto } from '../model/contractNegotiationDto';
-// @ts-ignore
-import { IdResponseDto } from '../model/idResponseDto';
-// @ts-ignore
-import { NegotiationInitiateRequestDto } from '../model/negotiationInitiateRequestDto';
-// @ts-ignore
-import { NegotiationState } from '../model/negotiationState';
-// @ts-ignore
-import { QuerySpecDto } from '../model/querySpecDto';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
+import { Injectable } from '@angular/core';
+import { HttpResponse, HttpEvent, HttpContext} from '@angular/common/http';
+import {from, Observable} from 'rxjs';
+import {EdcConnectorClient, IdResponse, QuerySpec} from "@think-it-labs/edc-connector-client";
+import {ContractNegotiation, ContractNegotiationState, ContractNegotiationRequest} from "../model"
@Injectable({
@@ -44,63 +23,9 @@ import { Configuration } from '../configurat
})
export class ContractNegotiationService {
- 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;
- }
+ private contractNegotiation = this.edcConnectorClient.management.contractNegotiations;
- 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;
+ constructor(private edcConnectorClient: EdcConnectorClient) {
}
/**
@@ -112,53 +37,8 @@ export class ContractNegotiationService {
public cancelNegotiation(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
public cancelNegotiation(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
public cancelNegotiation(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public cancelNegotiation(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling cancelNegotiation.');
- }
-
- 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 = `/v2/contractnegotiations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/cancel`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
+ public cancelNegotiation(id: string): Observable {
+ return from(this.contractNegotiation.terminate(id, "Cancelled by DataDashboard"))
}
/**
@@ -170,111 +50,8 @@ export class ContractNegotiationService {
public declineNegotiation(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
public declineNegotiation(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
public declineNegotiation(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public declineNegotiation(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling declineNegotiation.');
- }
-
- 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 = `/v2/contractnegotiations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/decline`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Gets a contract agreement for a contract negotiation with the given ID
- * @param 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 getAgreementForNegotiation(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public getAgreementForNegotiation(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getAgreementForNegotiation(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getAgreementForNegotiation(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getAgreementForNegotiation.');
- }
-
- 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 = `/v2/contractnegotiations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/agreement`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
+ public declineNegotiation(id: string): Observable {
+ return from(this.contractNegotiation.terminate(id, "Terminated by the DataDashboard"))
}
/**
@@ -283,57 +60,12 @@ export class ContractNegotiationService {
* @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 getNegotiation(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public getNegotiation(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getNegotiation(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getNegotiation(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getNegotiation.');
- }
-
- 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 = `/v2/contractnegotiations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
+ public getNegotiation(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
+ public getNegotiation(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public getNegotiation(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public getNegotiation(id: string): Observable {
+ return from(this.contractNegotiation.get(id))
+ }
/**
* Gets the state of a contract negotiation with the given ID
@@ -341,269 +73,37 @@ export class ContractNegotiationService {
* @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 getNegotiationState(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public getNegotiationState(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getNegotiationState(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getNegotiationState(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getNegotiationState.');
- }
-
- 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 = `/v2/contractnegotiations/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/state`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Returns all contract negotiations according to a query
- * @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 getNegotiations(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getNegotiations(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getNegotiations(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getNegotiations(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- let localVarQueryParameters = new HttpParams({encoder: this.encoder});
- 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 = `/v2/contractnegotiations`;
- 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
- }
- );
+ public getNegotiationState(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
+ public getNegotiationState(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public getNegotiationState(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public getNegotiationState(id: string): Observable {
+ return from(this.contractNegotiation.getState(id))
}
/**
* Initiates a contract negotiation for a given offer and with the given counter part. Please note that successfully invoking this endpoint only means that the negotiation was initiated. Clients must poll the /{id}/state endpoint to track the state
- * @param negotiationInitiateRequestDto
+ * @param negotiationInitiateRequest
* @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 initiateContractNegotiation(negotiationInitiateRequestDto?: NegotiationInitiateRequestDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public initiateContractNegotiation(negotiationInitiateRequestDto?: NegotiationInitiateRequestDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public initiateContractNegotiation(negotiationInitiateRequestDto?: NegotiationInitiateRequestDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public initiateContractNegotiation(negotiationInitiateRequestDto?: NegotiationInitiateRequestDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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[] = [
- '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 = `/v2/contractnegotiations`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: negotiationInitiateRequestDto,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
+ public initiateContractNegotiation(negotiationInitiateRequest: ContractNegotiationRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
+ public initiateContractNegotiation(negotiationInitiateRequest: ContractNegotiationRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public initiateContractNegotiation(negotiationInitiateRequest: ContractNegotiationRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public initiateContractNegotiation(negotiationInitiateRequest: ContractNegotiationRequest): Observable {
+ return from(this.contractNegotiation.initiate(negotiationInitiateRequest));
}
/**
* Returns all contract negotiations according to a query
- * @param querySpecDto
+ * @param querySpec
* @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 queryNegotiations(querySpecDto?: QuerySpecDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public queryNegotiations(querySpecDto?: QuerySpecDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public queryNegotiations(querySpecDto?: QuerySpecDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public queryNegotiations(querySpecDto?: QuerySpecDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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[] = [
- '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 = `/v2/contractnegotiations/request`;
- return this.httpClient.request>('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: querySpecDto,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
+ public queryNegotiations(querySpec: QuerySpec, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
+ public queryNegotiations(querySpec: QuerySpec, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
+ public queryNegotiations(querySpec: QuerySpec, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
+ public queryNegotiations(querySpec: QuerySpec): Observable {
+ return from(this.contractNegotiation.queryAll(querySpec))
}
}
diff --git a/src/modules/mgmt-api-client/api/dataplaneSelector.service.ts b/src/modules/mgmt-api-client/api/dataplaneSelector.service.ts
deleted file mode 100644
index a92368913..000000000
--- a/src/modules/mgmt-api-client/api/dataplaneSelector.service.ts
+++ /dev/null
@@ -1,277 +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 { DataPlaneInstance } from '../model/dataPlaneInstance';
-// @ts-ignore
-import { SelectionRequest } from '../model/selectionRequest';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class DataplaneSelectorService {
-
- 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 dataPlaneInstance
- * @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 addEntry(dataPlaneInstance?: DataPlaneInstance, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public addEntry(dataPlaneInstance?: DataPlaneInstance, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public addEntry(dataPlaneInstance?: DataPlaneInstance, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public addEntry(dataPlaneInstance?: DataPlaneInstance, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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[] = [
- '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 = `/v2/dataplanes`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: dataPlaneInstance,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * @param selectionRequest
- * @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 find(selectionRequest?: SelectionRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public find(selectionRequest?: SelectionRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public find(selectionRequest?: SelectionRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public find(selectionRequest?: SelectionRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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[] = [
- '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 = `/v2/dataplanes/select`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: selectionRequest,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * @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 getAll(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getAll(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAll(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAll(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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 = `/v2/dataplanes`;
- return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
-}
diff --git a/src/modules/mgmt-api-client/api/hTTPProvisionerWebhook.service.ts b/src/modules/mgmt-api-client/api/hTTPProvisionerWebhook.service.ts
deleted file mode 100644
index 70181f41f..000000000
--- a/src/modules/mgmt-api-client/api/hTTPProvisionerWebhook.service.ts
+++ /dev/null
@@ -1,232 +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 { DeprovisionedResource } from '../model/deprovisionedResource';
-// @ts-ignore
-import { ProvisionerWebhookRequest } from '../model/provisionerWebhookRequest';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
-
-
-@Injectable({
- providedIn: 'root'
-})
-export class HTTPProvisionerWebhookService {
-
- 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 processId
- * @param deprovisionedResource
- * @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 callDeprovisionWebhook(processId: string, deprovisionedResource?: DeprovisionedResource, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public callDeprovisionWebhook(processId: string, deprovisionedResource?: DeprovisionedResource, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public callDeprovisionWebhook(processId: string, deprovisionedResource?: DeprovisionedResource, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public callDeprovisionWebhook(processId: string, deprovisionedResource?: DeprovisionedResource, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (processId === null || processId === undefined) {
- throw new Error('Required parameter processId was null or undefined when calling callDeprovisionWebhook.');
- }
-
- 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[] = [
- '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 = `/callback/${this.configuration.encodeParam({name: "processId", value: processId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/deprovision`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: deprovisionedResource,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * @param processId
- * @param provisionerWebhookRequest
- * @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 callProvisionWebhook(processId: string, provisionerWebhookRequest?: ProvisionerWebhookRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public callProvisionWebhook(processId: string, provisionerWebhookRequest?: ProvisionerWebhookRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public callProvisionWebhook(processId: string, provisionerWebhookRequest?: ProvisionerWebhookRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public callProvisionWebhook(processId: string, provisionerWebhookRequest?: ProvisionerWebhookRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (processId === null || processId === undefined) {
- throw new Error('Required parameter processId was null or undefined when calling callProvisionWebhook.');
- }
-
- 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[] = [
- '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 = `/callback/${this.configuration.encodeParam({name: "processId", value: processId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}/provision`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: provisionerWebhookRequest,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
-}
diff --git a/src/modules/mgmt-api-client/api/policy.service.ts b/src/modules/mgmt-api-client/api/policy.service.ts
index b614a2f32..7f8362c50 100644
--- a/src/modules/mgmt-api-client/api/policy.service.ts
+++ b/src/modules/mgmt-api-client/api/policy.service.ts
@@ -11,28 +11,11 @@
*/
/* 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 { ApiErrorDetail } from '../model/apiErrorDetail';
-// @ts-ignore
-import { IdResponseDto } from '../model/idResponseDto';
-// @ts-ignore
-import { PolicyDefinitionRequestDto } from '../model/policyDefinitionRequestDto';
-// @ts-ignore
-import { PolicyDefinitionResponseDto } from '../model/policyDefinitionResponseDto';
-// @ts-ignore
-import { QuerySpecDto } from '../model/querySpecDto';
-
-// @ts-ignore
-import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
-import { Configuration } from '../configuration';
-
+import {Injectable} from '@angular/core';
+import {HttpResponse, HttpEvent, HttpContext} from '@angular/common/http';
+import {Observable, from} from 'rxjs';
+import {EdcConnectorClient} from "@think-it-labs/edc-connector-client";
+import { PolicyDefinition, PolicyDefinitionInput, IdResponse, QuerySpec } from "../model"
@Injectable({
@@ -40,392 +23,69 @@ import { Configuration } from '../configurat
})
export class PolicyService {
- 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;
+ private policyDefinition = this.edcConnectorClient.management.policyDefinitions;
+
+
+ constructor(private edcConnectorClient: EdcConnectorClient) {
+ }
+
+ /**
+ * Creates a new policy definition
+ * @param input
+ * @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 createPolicy(input: PolicyDefinitionInput, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable;
+ public createPolicy(input: PolicyDefinitionInput, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public createPolicy(input: PolicyDefinitionInput, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public createPolicy(input: PolicyDefinitionInput): Observable {
+ return from(this.policyDefinition.create(input));
+ }
+
+ /**
+ * Removes a policy definition with the given ID if possible. Deleting a policy definition is only possible if that policy definition is not yet referenced by a contract definition, in which case an error is returned. DANGER ZONE: Note that deleting policy definitions can have unexpected results, do this at your own risk!
+ * @param 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 deletePolicy(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable;
+ public deletePolicy(id: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public deletePolicy(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public deletePolicy(id: string): Observable {
+ if (id === null || id === undefined) {
+ throw new Error('Required parameter id was null or undefined when calling deletePolicy.');
}
-
- /**
- * Creates a new policy definition
- * @param policyDefinitionRequestDto
- * @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 createPolicy(policyDefinitionRequestDto?: PolicyDefinitionRequestDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public createPolicy(policyDefinitionRequestDto?: PolicyDefinitionRequestDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public createPolicy(policyDefinitionRequestDto?: PolicyDefinitionRequestDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public createPolicy(policyDefinitionRequestDto?: PolicyDefinitionRequestDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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[] = [
- '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 = `/v2/policydefinitions`;
- return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: policyDefinitionRequestDto,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Removes a policy definition with the given ID if possible. Deleting a policy definition is only possible if that policy definition is not yet referenced by a contract definition, in which case an error is returned. DANGER ZONE: Note that deleting policy definitions can have unexpected results, do this at your own risk!
- * @param 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 deletePolicy(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public deletePolicy(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public deletePolicy(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public deletePolicy(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling deletePolicy.');
- }
-
- 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 = `/v2/policydefinitions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
- return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Returns all policy definitions according to a query
- * @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 getAllPolicies(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getAllPolicies(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAllPolicies(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public getAllPolicies(offset?: number, limit?: number, filter?: string, sort?: 'ASC' | 'DESC', sortField?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- let localVarQueryParameters = new HttpParams({encoder: this.encoder});
- 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 = `/v2/policydefinitions`;
- 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
- }
- );
- }
-
- /**
- * Gets a policy definition with the given ID
- * @param 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 getPolicy(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable;
- public getPolicy(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getPolicy(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public getPolicy(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
- if (id === null || id === undefined) {
- throw new Error('Required parameter id was null or undefined when calling getPolicy.');
- }
-
- 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 = `/v2/policydefinitions/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
- return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
- }
-
- /**
- * Returns all policy definitions according to a query
- * @param querySpecDto
- * @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 queryAllPolicies(querySpecDto?: QuerySpecDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>;
- public queryAllPolicies(querySpecDto?: QuerySpecDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public queryAllPolicies(querySpecDto?: QuerySpecDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>;
- public queryAllPolicies(querySpecDto?: QuerySpecDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable {
-
- 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[] = [
- '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 = `/v2/policydefinitions/request`;
- return this.httpClient.request>('post', `${this.configuration.basePath}${localVarPath}`,
- {
- context: localVarHttpContext,
- body: querySpecDto,
- responseType: responseType_,
- withCredentials: this.configuration.withCredentials,
- headers: localVarHeaders,
- observe: observe,
- reportProgress: reportProgress
- }
- );
+ return from(this.policyDefinition.delete(id))
+ }
+
+ /**
+ * Gets a policy definition with the given ID
+ * @param 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 getPolicy(id: string, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable;
+ public getPolicy(id: string, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public getPolicy(id: string, observe?: 'events', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public getPolicy(id: string): Observable {
+ if (id === null || id === undefined) {
+ throw new Error('Required parameter id was null or undefined when calling getPolicy.');
}
+ return from(this.policyDefinition.get(id))
+
+ }
+
+ /**
+ * Returns all policy definitions according to a query
+ * @param querySpec
+ * @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 queryAllPolicies(querySpec?: QuerySpec, observe?: 'body', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable>;
+ public queryAllPolicies(querySpec?: QuerySpec, observe?: 'response', reportProgress?: boolean, options?: { httpHeaderAccept?: 'application/json', context?: HttpContext }): Observable