@veloceapps/api 8.0.0-58 → 8.0.0-59

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.
@@ -3,13 +3,13 @@ import { HttpParams, HttpHeaders, HttpErrorResponse, HttpClientModule } from '@a
3
3
  import * as i0 from '@angular/core';
4
4
  import { Injectable, NgModule } from '@angular/core';
5
5
  import * as i1 from '@veloceapps/core';
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, delay } from 'rxjs';
6
+ import { uiDefinitionFromDTO, isLegacyUIDefinition, ModelTranslatorUtils, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, Operator, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, 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';
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';
11
11
  import * as _ from 'lodash';
12
- import { omit, uniqueId } from 'lodash';
12
+ import { omit } from 'lodash';
13
13
  import moment from 'moment';
14
14
 
15
15
  class AccountApiService {
@@ -2904,19 +2904,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2904
2904
  class PortalsApiService {
2905
2905
  constructor(baseHttpService) {
2906
2906
  this.baseHttpService = baseHttpService;
2907
- this.serviceUrl = '/portals';
2907
+ this.serviceUrl = '/admin/portal';
2908
2908
  this.getPortals$ = (skip = 1, name = '') => {
2909
2909
  let params = new HttpParams();
2910
2910
  params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
2911
2911
  params = params.append('skip', '0');
2912
2912
  params = params.append('name', name);
2913
- return of([
2914
- { id: UUID.UUID(), name: 'portal1', description: 'portal1 description' },
2915
- { id: UUID.UUID(), name: 'portal2', description: 'portal2 description' },
2916
- { id: UUID.UUID(), name: 'portal3', description: 'portal3 description' },
2917
- { id: UUID.UUID(), name: 'portal4', description: 'portal4 description' },
2918
- { id: UUID.UUID(), name: 'portal5', description: 'portal5 description' },
2919
- ]);
2920
2913
  return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
2921
2914
  };
2922
2915
  this.searchPortals$ = (skip = 0, expression) => {
@@ -2931,28 +2924,24 @@ class PortalsApiService {
2931
2924
  });
2932
2925
  };
2933
2926
  this.removePortal$ = (id) => {
2934
- return of(id); // remove when API will be ready
2935
2927
  return this.baseHttpService.api({
2936
2928
  url: `${this.serviceUrl}/${id}`,
2937
2929
  method: 'delete',
2938
2930
  });
2939
2931
  };
2940
2932
  this.restore$ = (id) => {
2941
- return of(); // remove what API will be ready
2942
2933
  return this.baseHttpService.api({
2943
2934
  method: 'patch',
2944
2935
  url: `${this.serviceUrl}/${id}/restore`,
2945
2936
  });
2946
2937
  };
2947
2938
  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
- // });
2939
+ return this.baseHttpService.api({
2940
+ url: `${this.serviceUrl}/${id}`,
2941
+ });
2952
2942
  };
2953
2943
  }
2954
2944
  createNewPortal$(body) {
2955
- return of({ ...body, id: uniqueId() });
2956
2945
  return this.baseHttpService.api({
2957
2946
  url: `${this.serviceUrl}`,
2958
2947
  method: 'post',