@veloceapps/api 8.0.0-46 → 8.0.0-48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/services/portals-api.service.mjs +22 -2
- package/fesm2015/veloceapps-api.mjs +21 -1
- package/fesm2015/veloceapps-api.mjs.map +1 -1
- package/fesm2020/veloceapps-api.mjs +21 -1
- package/fesm2020/veloceapps-api.mjs.map +1 -1
- package/lib/services/portals-api.service.d.ts +3 -0
- package/package.json +1 -1
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
|
|
4
4
|
import { Injectable, NgModule } from '@angular/core';
|
5
5
|
import * as i1 from '@veloceapps/core';
|
6
6
|
import { uiDefinitionFromDTO, isLegacyUIDefinition, ModelTranslatorUtils, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, Operator, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, UUID, BaseHttpService, XrayService } from '@veloceapps/core';
|
7
|
-
import { noop, throwError, of, zip, forkJoin, map as map$1, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
|
7
|
+
import { noop, throwError, of, zip, forkJoin, map as map$1, catchError as catchError$1, switchMap as switchMap$1, delay } from 'rxjs';
|
8
8
|
import { map, catchError, tap, switchMap, defaultIfEmpty } from 'rxjs/operators';
|
9
9
|
import * as i2 from 'primeng/api';
|
10
10
|
import { CurrencyPipe } from '@angular/common';
|
@@ -2930,6 +2930,26 @@ class PortalsApiService {
|
|
2930
2930
|
body: expression || {},
|
2931
2931
|
});
|
2932
2932
|
};
|
2933
|
+
this.removePortal$ = (id) => {
|
2934
|
+
return of(id); // remove when API will be ready
|
2935
|
+
return this.baseHttpService.api({
|
2936
|
+
url: `${this.serviceUrl}/${id}`,
|
2937
|
+
method: 'delete',
|
2938
|
+
});
|
2939
|
+
};
|
2940
|
+
this.restore$ = (id) => {
|
2941
|
+
return of(); // remove what API will be ready
|
2942
|
+
return this.baseHttpService.api({
|
2943
|
+
method: 'patch',
|
2944
|
+
url: `${this.serviceUrl}/${id}/restore`,
|
2945
|
+
});
|
2946
|
+
};
|
2947
|
+
this.getPortal$ = (id) => {
|
2948
|
+
return of({ name: 'Awesome Portal', description: 'I am an awesome portal!', id }).pipe(delay(400));
|
2949
|
+
// return this.baseHttpService.api({ todo uncomment when DM-1275 is ready
|
2950
|
+
// url: `${this.serviceUrl}/${id}`,
|
2951
|
+
// });
|
2952
|
+
};
|
2933
2953
|
}
|
2934
2954
|
}
|
2935
2955
|
PortalsApiService.MAX_RESULTS = 60;
|