Add A1 Policy Type/Policy Types logic from backend
[portal/nonrtric-controlpanel.git] / webapp-frontend / src / app / services / ei / ei.service.ts
index 976b7b8..d09b5ef 100644 (file)
@@ -22,7 +22,7 @@ import { Injectable } from '@angular/core';
 import { HttpClient } from '@angular/common/http';
 import { Observable } from 'rxjs';
 import { map } from 'rxjs/operators';
-import { EIJob, EIType, EIProducer } from '../../interfaces/ei.jobs';
+import { EIJob, EIProducer } from '../../interfaces/ei.types';
 import { ControlpanelSuccessTransport } from '../../interfaces/controlpanel.types';
 
 /**
@@ -34,9 +34,8 @@ import { ControlpanelSuccessTransport } from '../../interfaces/controlpanel.type
 export class EIService {
 
     private basePath = 'api/enrichment';
-    private eiTypePath = 'eitypes';
-    private eiJobPath = 'eijobs';
-    private eiProducerPath = 'eiproducers';
+    eiJobPath = 'eijobs';
+    eiProducerPath = 'eiproducers';
 
     private buildPath(...args: any[]) {
         let result = this.basePath;
@@ -50,23 +49,6 @@ export class EIService {
         // injects to variable httpClient
     }
 
-    /**
-     * Gets version details
-     * @returns Observable that should yield a String
-     */
-    getVersion(): Observable<string> {
-        const url = this.buildPath('version');
-        return this.httpClient.get<ControlpanelSuccessTransport>(url).pipe(
-            // Extract the string here
-            map(res => res['data'])
-        );
-    }
-
-    getEITypes(): Observable<EIType[]> {
-        const url = this.buildPath(this.eiTypePath);
-        return this.httpClient.get<EIType[]>(url);
-    }
-
     getEIJobs(): Observable<EIJob[]> {
         const url = this.buildPath(this.eiJobPath);
         return this.httpClient.get<EIJob[]>(url);