1 import { Injectable } from '@angular/core';
2 import { ApiService } from '../../../../common/core/services/api.typed.service';
3 import { BlueprintURLs } from '../../../../common/constants/app-constants';
4 import { Observable } from 'rxjs';
5 import { BluePrintDetailModel } from '../model/BluePrint.detail.model';
11 export class ConfigurationDashboardService {
12 constructor(private api: ApiService<BluePrintDetailModel>) {
16 private getBluePrintModel(id: string): Observable<BluePrintDetailModel> {
17 return this.api.getOne(BlueprintURLs.getOneBlueprint + '/' + id);
20 getPagedPackages(id: string) {
21 return this.getBluePrintModel(id);
24 public downloadResource(path: string) {
25 return this.api.getCustomized(BlueprintURLs.download + path, { responseType: 'blob' });
28 deployPost(body: any | null): Observable<any> {
29 return this.api.post(BlueprintURLs.deploy, body, { responseType: 'text' });
31 deletePackage(id: string) {
32 return this.api.delete(BlueprintURLs.getOneBlueprint + '/' + id, { observe: 'response' });