239dd6339468be0d51f41388f81dfd3a621abbb6
[ccsdk/cds.git] /
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';
6
7
8 @Injectable({
9     providedIn: 'root'
10 })
11 export class ConfigurationDashboardService {
12     constructor(private api: ApiService<BluePrintDetailModel>) {
13
14     }
15
16     private getBluePrintModel(id: string): Observable<BluePrintDetailModel> {
17         return this.api.getOne(BlueprintURLs.getOneBlueprint + '/' + id);
18     }
19     getPagedPackages(id: string) {
20         return this.getBluePrintModel(id);
21     }
22
23     public downloadResource(path: string) {
24         return this.api.getCustomized(BlueprintURLs.download + path, {responseType: 'blob'});
25     }
26
27 }