@veloceapps/api 2.0.12 → 2.0.14

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,7 +3,7 @@ import { HttpParams, HttpClientModule } from '@angular/common/http';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Injectable, NgModule } from '@angular/core';
5
5
  import * as i1 from '@veloce/core';
6
- import { ModelTranslatorUtils, ConfigurationContextMode, QuoteDraft, DocxTemplater, StringUtils, ProductModelsContainer, ModelUtils, EntityUtil, Expression, BaseHttpService, XrayService } from '@veloce/core';
6
+ import { ModelTranslatorUtils, ConfigurationContextMode, QuoteDraft, DocxTemplater, StringUtils, Expression, ProductModelsContainer, ModelUtils, EntityUtil, BaseHttpService, XrayService } from '@veloce/core';
7
7
  import { throwError, forkJoin, zip, of, map as map$1, noop, catchError as catchError$1, switchMap as switchMap$1 } from 'rxjs';
8
8
  import { map, tap, defaultIfEmpty, switchMap, catchError } from 'rxjs/operators';
9
9
  import * as _ from 'lodash';
@@ -358,6 +358,7 @@ class ConfigurePriceDTO {
358
358
  lineItem: LineItemDTO.fromDTO(dto.lineItem),
359
359
  charges: dto.charges,
360
360
  context: dto.context,
361
+ deletedLineItems: dto.deletedLineItems.map(deletedLineItem => LineItemDTO.fromDTO(deletedLineItem)),
361
362
  };
362
363
  }
363
364
  }
@@ -367,36 +368,23 @@ class ConfigurationApiService {
367
368
  this.httpService = httpService;
368
369
  this.SERVICE_URL = '/configuration';
369
370
  }
370
- configureLineItem(configurationRequest, runtimeModel) {
371
+ configureLineItem({ configurationRequest, runtimeModel, pricingEnabled, }) {
371
372
  return this.httpService
372
373
  .api({
373
374
  method: 'post',
374
- url: `${this.SERVICE_URL}`,
375
+ url: `${this.SERVICE_URL}${pricingEnabled ? '/price' : ''}`,
375
376
  body: configurationRequest,
376
377
  errorHandler: e => throwError(e),
377
378
  })
378
- .pipe(map(response => {
379
- const lineItem = LineItemDTO.fromDTO(response);
379
+ .pipe(map(response => ConfigurePriceDTO.fromDTO(response)), map(configurePrice => {
380
380
  if (runtimeModel) {
381
- return this.updatePortDomains(lineItem, runtimeModel);
381
+ return Object.assign(Object.assign({}, configurePrice), { lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel) });
382
382
  }
383
383
  else {
384
- return lineItem;
384
+ return configurePrice;
385
385
  }
386
386
  }));
387
387
  }
388
- configureAndPriceLineItem(configurationRequest, runtimeModel) {
389
- return this.httpService
390
- .api({
391
- method: 'post',
392
- url: `${this.SERVICE_URL}/price`,
393
- body: configurationRequest,
394
- errorHandler: e => throwError(e),
395
- })
396
- .pipe(map(response => ConfigurePriceDTO.fromDTO(response)), map(configurePrice => {
397
- return Object.assign(Object.assign({}, configurePrice), { lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel) });
398
- }));
399
- }
400
388
  getRuntimeDataByProductId(productId, offeringId) {
401
389
  return this.httpService
402
390
  .api({
@@ -435,9 +423,9 @@ class ConfigurationApiService {
435
423
  return Object.assign(Object.assign({}, lineItem), { lineItems: (_c = lineItem.lineItems) === null || _c === void 0 ? void 0 : _c.map(i => this.updatePortDomains(i, runtimeModel)), portDomains });
436
424
  }
437
425
  }
438
- ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
439
- ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationApiService });
440
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationApiService, decorators: [{
426
+ ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
427
+ ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationApiService });
428
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationApiService, decorators: [{
441
429
  type: Injectable
442
430
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
443
431
 
@@ -521,9 +509,9 @@ class ConfigurationSettingsApiService {
521
509
  });
522
510
  }
523
511
  }
524
- ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
525
- ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationSettingsApiService });
526
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
512
+ ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
513
+ ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationSettingsApiService });
514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
527
515
  type: Injectable
528
516
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
529
517
 
@@ -543,9 +531,9 @@ class ContextApiService {
543
531
  });
544
532
  }
545
533
  }
546
- ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
547
- ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextApiService });
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContextApiService, decorators: [{
534
+ ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
535
+ ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextApiService });
536
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ContextApiService, decorators: [{
549
537
  type: Injectable
550
538
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
551
539
 
@@ -604,9 +592,9 @@ class DocumentAttachmentApiService {
604
592
  });
605
593
  }
606
594
  }
607
- DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
608
- DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentAttachmentApiService });
609
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
595
+ DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
596
+ DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocumentAttachmentApiService });
597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
610
598
  type: Injectable
611
599
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
612
600
 
@@ -651,9 +639,9 @@ class SalesforceApiService {
651
639
  });
652
640
  }
653
641
  }
654
- SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
655
- SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SalesforceApiService });
656
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SalesforceApiService, decorators: [{
642
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
643
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SalesforceApiService });
644
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: SalesforceApiService, decorators: [{
657
645
  type: Injectable
658
646
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
659
647
 
@@ -716,14 +704,24 @@ class DocumentTemplatesApiService {
716
704
  }
717
705
  removeTemplate(id) {
718
706
  return this.service.api({
719
- url: '/templates' + id,
707
+ url: '/templates/' + id,
720
708
  method: 'delete',
721
709
  });
722
710
  }
723
- cloneTemplate(id) {
711
+ restoreTemplate(id) {
712
+ return this.service.api({
713
+ url: `/templates/${id}/restore`,
714
+ method: 'patch',
715
+ });
716
+ }
717
+ cloneTemplate(id, propertiesToOverride = {}) {
724
718
  return this.service.api({
725
719
  url: '/templates/clone/' + id,
726
720
  method: 'post',
721
+ body: {
722
+ id,
723
+ propertiesToOverride,
724
+ },
727
725
  });
728
726
  }
729
727
  generateDocumentData(template, object, params) {
@@ -917,9 +915,9 @@ class DocumentTemplatesApiService {
917
915
  return this.sfRepo.query(searchRequest, objectName).pipe(mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
918
916
  }
919
917
  }
920
- DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
921
- DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentTemplatesApiService });
922
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
918
+ DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
919
+ DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocumentTemplatesApiService });
920
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
923
921
  type: Injectable
924
922
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i4.HttpClient }]; } });
925
923
 
@@ -1000,9 +998,71 @@ class PriceApiService {
1000
998
  });
1001
999
  }
1002
1000
  }
1003
- PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1004
- PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PriceApiService });
1005
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PriceApiService, decorators: [{
1001
+ PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1002
+ PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PriceApiService });
1003
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: PriceApiService, decorators: [{
1004
+ type: Injectable
1005
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1006
+
1007
+ class ProceduresApiService {
1008
+ constructor(baseHttpService) {
1009
+ this.baseHttpService = baseHttpService;
1010
+ this.serviceUrl = '/admin/procedures';
1011
+ this.fetchProcedures$ = () => {
1012
+ return this.searchProcedures$(new Expression(), 0, 100);
1013
+ };
1014
+ this.searchProcedures$ = (expression, skip, count) => {
1015
+ let params = new HttpParams();
1016
+ params = params.set('skip', '' + skip);
1017
+ params = params.set('count', '' + count);
1018
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1019
+ };
1020
+ this.createProcedure$ = (newProcedure) => {
1021
+ return this.baseHttpService.api({
1022
+ url: `${this.serviceUrl}`,
1023
+ method: 'post',
1024
+ body: newProcedure,
1025
+ });
1026
+ };
1027
+ this.updateProcedure$ = (procedure) => {
1028
+ return this.baseHttpService.api({
1029
+ url: `${this.serviceUrl}/${procedure.id}`,
1030
+ method: 'put',
1031
+ body: procedure,
1032
+ });
1033
+ };
1034
+ this.duplicateProcedure$ = (body) => {
1035
+ return this.baseHttpService
1036
+ .api({
1037
+ url: `${this.serviceUrl}/${body.id}/clone`,
1038
+ method: 'post',
1039
+ body,
1040
+ })
1041
+ .pipe(map(response => response.clonedRecordId));
1042
+ };
1043
+ this.removeProcedure$ = (id) => {
1044
+ return this.baseHttpService.api({
1045
+ url: `${this.serviceUrl}/${id}`,
1046
+ method: 'delete',
1047
+ });
1048
+ };
1049
+ this.restoreProcedure$ = (id) => {
1050
+ return this.baseHttpService.api({
1051
+ url: `${this.serviceUrl}/${id}/restore`,
1052
+ method: 'patch',
1053
+ });
1054
+ };
1055
+ }
1056
+ fetchProcedure$(id) {
1057
+ return this.baseHttpService.api({
1058
+ url: `${this.serviceUrl}/${id}`,
1059
+ method: 'get',
1060
+ });
1061
+ }
1062
+ }
1063
+ ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1064
+ ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProceduresApiService });
1065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProceduresApiService, decorators: [{
1006
1066
  type: Injectable
1007
1067
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1008
1068
 
@@ -1226,9 +1286,9 @@ class ProductModelApiService {
1226
1286
  }
1227
1287
  }
1228
1288
  ProductModelApiService.MAX_RESULTS = 200;
1229
- ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1230
- ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProductModelApiService });
1231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProductModelApiService, decorators: [{
1289
+ ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1290
+ ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductModelApiService });
1291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProductModelApiService, decorators: [{
1232
1292
  type: Injectable
1233
1293
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1234
1294
 
@@ -1259,9 +1319,9 @@ class QuoteApiService {
1259
1319
  });
1260
1320
  }
1261
1321
  }
1262
- QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1263
- QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QuoteApiService });
1264
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: QuoteApiService, decorators: [{
1322
+ QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1323
+ QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteApiService });
1324
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: QuoteApiService, decorators: [{
1265
1325
  type: Injectable
1266
1326
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1267
1327
 
@@ -1298,9 +1358,171 @@ class RampApiService {
1298
1358
  // );
1299
1359
  }
1300
1360
  }
1301
- RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1302
- RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RampApiService });
1303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RampApiService, decorators: [{
1361
+ RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1362
+ RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RampApiService });
1363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RampApiService, decorators: [{
1364
+ type: Injectable
1365
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1366
+
1367
+ class RuleGroupsApiService {
1368
+ constructor(baseHttpService) {
1369
+ this.baseHttpService = baseHttpService;
1370
+ this.serviceUrl = '/admin/rule-groups';
1371
+ this.fetchRuleGroups$ = () => {
1372
+ return this.searchRuleGroups$(new Expression(), 0, 100);
1373
+ };
1374
+ this.searchRuleGroups$ = (expression, skip, count) => {
1375
+ let params = new HttpParams();
1376
+ params = params.set('skip', '' + skip);
1377
+ params = params.set('count', '' + count);
1378
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1379
+ };
1380
+ this.createRuleGroup$ = (ruleGroup) => {
1381
+ return this.baseHttpService.api({
1382
+ url: `${this.serviceUrl}`,
1383
+ method: 'post',
1384
+ body: ruleGroup,
1385
+ });
1386
+ };
1387
+ }
1388
+ }
1389
+ RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1390
+ RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RuleGroupsApiService });
1391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1392
+ type: Injectable
1393
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1394
+
1395
+ class RulesApiService {
1396
+ constructor(baseHttpService) {
1397
+ this.baseHttpService = baseHttpService;
1398
+ this.serviceUrl = '/admin/rules';
1399
+ this.fetchRules$ = () => {
1400
+ return this.searchRules$(new Expression(), 0, 100);
1401
+ };
1402
+ this.searchRules$ = (expression, skip, count) => {
1403
+ let params = new HttpParams();
1404
+ params = params.set('skip', '' + skip);
1405
+ params = params.set('count', '' + count);
1406
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1407
+ };
1408
+ this.createRule$ = (rule) => {
1409
+ return this.baseHttpService.api({
1410
+ url: `${this.serviceUrl}`,
1411
+ method: 'post',
1412
+ body: rule,
1413
+ });
1414
+ };
1415
+ this.updateRule$ = (rule) => {
1416
+ return this.baseHttpService.api({
1417
+ url: `${this.serviceUrl}/${rule.id}`,
1418
+ method: 'put',
1419
+ body: rule,
1420
+ });
1421
+ };
1422
+ this.duplicateRule$ = (body) => {
1423
+ return this.baseHttpService
1424
+ .api({
1425
+ url: `${this.serviceUrl}/${body.id}/clone`,
1426
+ method: 'post',
1427
+ body,
1428
+ })
1429
+ .pipe(map(response => response.clonedRecordId));
1430
+ };
1431
+ this.removeRule$ = (id) => {
1432
+ return this.baseHttpService.api({
1433
+ url: `${this.serviceUrl}/${id}`,
1434
+ method: 'delete',
1435
+ });
1436
+ };
1437
+ this.restoreRule$ = (id) => {
1438
+ return this.baseHttpService.api({
1439
+ url: `${this.serviceUrl}/${id}/restore`,
1440
+ method: 'patch',
1441
+ });
1442
+ };
1443
+ }
1444
+ fetchRule$(id) {
1445
+ return this.baseHttpService.api({
1446
+ url: `${this.serviceUrl}/${id}`,
1447
+ method: 'get',
1448
+ });
1449
+ }
1450
+ }
1451
+ RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1452
+ RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RulesApiService });
1453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RulesApiService, decorators: [{
1454
+ type: Injectable
1455
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1456
+
1457
+ class ScriptsApiService {
1458
+ constructor(baseHttpService) {
1459
+ this.baseHttpService = baseHttpService;
1460
+ this.serviceUrl = '/admin/scripts';
1461
+ this.fetchScripts$ = () => {
1462
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
1463
+ };
1464
+ this.searchScripts$ = (expression, skip, count) => {
1465
+ let params = new HttpParams();
1466
+ params = params.set('skip', '' + skip);
1467
+ params = params.set('count', '' + count);
1468
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1469
+ };
1470
+ this.fetchScript$ = (id) => {
1471
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1472
+ };
1473
+ this.createScript$ = (script) => {
1474
+ return this.baseHttpService.api({
1475
+ url: `${this.serviceUrl}`,
1476
+ method: 'post',
1477
+ body: script,
1478
+ });
1479
+ };
1480
+ this.updateScriptMeta$ = (script) => {
1481
+ return this.baseHttpService.api({
1482
+ url: `${this.serviceUrl}/${script.id}`,
1483
+ method: 'post',
1484
+ body: script,
1485
+ });
1486
+ };
1487
+ this.updateScriptDetails$ = (script) => {
1488
+ return this.baseHttpService.api({
1489
+ url: `${this.serviceUrl}/${script.id}`,
1490
+ method: 'put',
1491
+ body: script,
1492
+ });
1493
+ };
1494
+ this.cloneScript$ = (cloneRequest) => {
1495
+ return this.baseHttpService.api({
1496
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
1497
+ method: 'post',
1498
+ body: cloneRequest
1499
+ });
1500
+ };
1501
+ this.removeScript$ = (id) => {
1502
+ return this.baseHttpService.api({
1503
+ url: `${this.serviceUrl}/${id}`,
1504
+ method: 'delete',
1505
+ });
1506
+ };
1507
+ this.restoreScript$ = (id) => {
1508
+ return this.baseHttpService.api({
1509
+ url: `${this.serviceUrl}/${id}/restore`,
1510
+ method: 'patch',
1511
+ });
1512
+ };
1513
+ this.execute$ = (body) => {
1514
+ return this.baseHttpService.api({
1515
+ url: `/scripts/execute`,
1516
+ method: 'post',
1517
+ body,
1518
+ errorHandler: () => null
1519
+ });
1520
+ };
1521
+ }
1522
+ }
1523
+ ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1524
+ ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptsApiService });
1525
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptsApiService, decorators: [{
1304
1526
  type: Injectable
1305
1527
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1306
1528
 
@@ -1586,179 +1808,17 @@ class UITemplatesApiService {
1586
1808
  });
1587
1809
  }
1588
1810
  }
1589
- UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1590
- UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UITemplatesApiService });
1591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: UITemplatesApiService, decorators: [{
1592
- type: Injectable
1593
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1594
-
1595
- class ScriptsApiService {
1596
- constructor(baseHttpService) {
1597
- this.baseHttpService = baseHttpService;
1598
- this.serviceUrl = '/admin/scripts';
1599
- this.fetchScripts$ = () => {
1600
- return this.baseHttpService.api({ url: `${this.serviceUrl}` });
1601
- };
1602
- this.searchScripts$ = (expression, skip, count) => {
1603
- let params = new HttpParams();
1604
- params = params.set('skip', '' + skip);
1605
- params = params.set('count', '' + count);
1606
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1607
- };
1608
- this.fetchScript$ = (id) => {
1609
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
1610
- };
1611
- this.createScript$ = (script) => {
1612
- return this.baseHttpService.api({
1613
- url: `${this.serviceUrl}`,
1614
- method: 'post',
1615
- body: script,
1616
- });
1617
- };
1618
- this.updateScriptMeta$ = (script) => {
1619
- return this.baseHttpService.api({
1620
- url: `${this.serviceUrl}/${script.id}`,
1621
- method: 'post',
1622
- body: script,
1623
- });
1624
- };
1625
- this.updateScriptDetails$ = (script) => {
1626
- return this.baseHttpService.api({
1627
- url: `${this.serviceUrl}/${script.id}`,
1628
- method: 'put',
1629
- body: script,
1630
- });
1631
- };
1632
- this.cloneScript$ = (cloneRequest) => {
1633
- return this.baseHttpService.api({
1634
- url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
1635
- method: 'post',
1636
- body: cloneRequest
1637
- });
1638
- };
1639
- this.removeScript$ = (id) => {
1640
- return this.baseHttpService.api({
1641
- url: `${this.serviceUrl}/${id}`,
1642
- method: 'delete',
1643
- });
1644
- };
1645
- this.restoreScript$ = (id) => {
1646
- return this.baseHttpService.api({
1647
- url: `${this.serviceUrl}/${id}/restore`,
1648
- method: 'patch',
1649
- });
1650
- };
1651
- this.execute$ = (body) => {
1652
- return this.baseHttpService.api({
1653
- url: `/scripts/execute`,
1654
- method: 'post',
1655
- body,
1656
- errorHandler: () => null
1657
- });
1658
- };
1659
- }
1660
- }
1661
- ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1662
- ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScriptsApiService });
1663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ScriptsApiService, decorators: [{
1664
- type: Injectable
1665
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1666
-
1667
- class RulesApiService {
1668
- constructor(baseHttpService) {
1669
- this.baseHttpService = baseHttpService;
1670
- this.serviceUrl = '/admin/rules';
1671
- this.fetchRules$ = () => {
1672
- return this.searchRules$(new Expression(), 0, 100);
1673
- };
1674
- this.searchRules$ = (expression, skip, count) => {
1675
- let params = new HttpParams();
1676
- params = params.set('skip', '' + skip);
1677
- params = params.set('count', '' + count);
1678
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1679
- };
1680
- this.createRule$ = (rule) => {
1681
- return this.baseHttpService.api({
1682
- url: `${this.serviceUrl}`,
1683
- method: 'post',
1684
- body: rule,
1685
- });
1686
- };
1687
- this.updateRule$ = (rule) => {
1688
- return this.baseHttpService.api({
1689
- url: `${this.serviceUrl}/${rule.id}`,
1690
- method: 'put',
1691
- body: rule,
1692
- });
1693
- };
1694
- this.duplicateRule$ = (body) => {
1695
- return this.baseHttpService
1696
- .api({
1697
- url: `${this.serviceUrl}/${body.id}/clone`,
1698
- method: 'post',
1699
- body,
1700
- })
1701
- .pipe(map(response => response.clonedRecordId));
1702
- };
1703
- this.removeRule$ = (id) => {
1704
- return this.baseHttpService.api({
1705
- url: `${this.serviceUrl}/${id}`,
1706
- method: 'delete',
1707
- });
1708
- };
1709
- this.restoreRule$ = (id) => {
1710
- return this.baseHttpService.api({
1711
- url: `${this.serviceUrl}/${id}/restore`,
1712
- method: 'patch',
1713
- });
1714
- };
1715
- }
1716
- fetchRule$(id) {
1717
- return this.baseHttpService.api({
1718
- url: `${this.serviceUrl}/${id}`,
1719
- method: 'get',
1720
- });
1721
- }
1722
- }
1723
- RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1724
- RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RulesApiService });
1725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RulesApiService, decorators: [{
1726
- type: Injectable
1727
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1728
-
1729
- class RuleGroupsApiService {
1730
- constructor(baseHttpService) {
1731
- this.baseHttpService = baseHttpService;
1732
- this.serviceUrl = '/admin/rule-groups';
1733
- this.fetchRuleGroups$ = () => {
1734
- return this.searchRuleGroups$(new Expression(), 0, 100);
1735
- };
1736
- this.searchRuleGroups$ = (expression, skip, count) => {
1737
- let params = new HttpParams();
1738
- params = params.set('skip', '' + skip);
1739
- params = params.set('count', '' + count);
1740
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1741
- };
1742
- this.createRuleGroup$ = (ruleGroup) => {
1743
- return this.baseHttpService.api({
1744
- url: `${this.serviceUrl}`,
1745
- method: 'post',
1746
- body: ruleGroup,
1747
- });
1748
- };
1749
- }
1750
- }
1751
- RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1752
- RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RuleGroupsApiService });
1753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1811
+ UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1812
+ UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UITemplatesApiService });
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: UITemplatesApiService, decorators: [{
1754
1814
  type: Injectable
1755
1815
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1756
1816
 
1757
1817
  class ApiModule {
1758
1818
  }
1759
- ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1760
- ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
1761
- ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, providers: [
1819
+ ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1820
+ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
1821
+ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ApiModule, providers: [
1762
1822
  BaseHttpService,
1763
1823
  XrayService,
1764
1824
  ConfigurationApiService,
@@ -1767,6 +1827,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
1767
1827
  DocumentAttachmentApiService,
1768
1828
  PriceApiService,
1769
1829
  ProductModelApiService,
1830
+ ProceduresApiService,
1770
1831
  QuoteApiService,
1771
1832
  DocumentTemplatesApiService,
1772
1833
  RampApiService,
@@ -1776,7 +1837,7 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.
1776
1837
  RulesApiService,
1777
1838
  RuleGroupsApiService,
1778
1839
  ], imports: [[HttpClientModule]] });
1779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ApiModule, decorators: [{
1840
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ApiModule, decorators: [{
1780
1841
  type: NgModule,
1781
1842
  args: [{
1782
1843
  imports: [HttpClientModule],
@@ -1789,6 +1850,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1789
1850
  DocumentAttachmentApiService,
1790
1851
  PriceApiService,
1791
1852
  ProductModelApiService,
1853
+ ProceduresApiService,
1792
1854
  QuoteApiService,
1793
1855
  DocumentTemplatesApiService,
1794
1856
  RampApiService,
@@ -1801,75 +1863,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
1801
1863
  }]
1802
1864
  }] });
1803
1865
 
1804
- class ProceduresApiService {
1805
- constructor(baseHttpService) {
1806
- this.baseHttpService = baseHttpService;
1807
- this.serviceUrl = '/admin/procedures';
1808
- this.fetchProcedures$ = () => {
1809
- return this.searchProcedures$(new Expression(), 0, 100);
1810
- };
1811
- this.searchProcedures$ = (expression, skip, count) => {
1812
- return of([{ id: '1', name: 'test' }]);
1813
- let params = new HttpParams();
1814
- params = params.set('skip', '' + skip);
1815
- params = params.set('count', '' + count);
1816
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
1817
- };
1818
- this.createProcedure$ = (rule) => {
1819
- return of({ id: '1', name: 'test' });
1820
- return this.baseHttpService.api({
1821
- url: `${this.serviceUrl}`,
1822
- method: 'post',
1823
- body: rule,
1824
- });
1825
- };
1826
- this.updateProcedure$ = (rule) => {
1827
- return of({ id: '1', name: 'test' });
1828
- return this.baseHttpService.api({
1829
- url: `${this.serviceUrl}/${rule.id}`,
1830
- method: 'put',
1831
- body: rule,
1832
- });
1833
- };
1834
- this.duplicateProcedure$ = (body) => {
1835
- return of('1');
1836
- return this.baseHttpService
1837
- .api({
1838
- url: `${this.serviceUrl}/${body.id}/clone`,
1839
- method: 'post',
1840
- body,
1841
- })
1842
- .pipe(map(response => response.clonedRecordId));
1843
- };
1844
- this.removeProcedure$ = (id) => {
1845
- return of('1');
1846
- return this.baseHttpService.api({
1847
- url: `${this.serviceUrl}/${id}`,
1848
- method: 'delete',
1849
- });
1850
- };
1851
- this.restoreProcedure$ = (id) => {
1852
- return of('1');
1853
- return this.baseHttpService.api({
1854
- url: `${this.serviceUrl}/${id}/restore`,
1855
- method: 'patch',
1856
- });
1857
- };
1858
- }
1859
- fetchProcedure$(id) {
1860
- return of({ id: '1', name: 'test' });
1861
- return this.baseHttpService.api({
1862
- url: `${this.serviceUrl}/${id}`,
1863
- method: 'get',
1864
- });
1865
- }
1866
- }
1867
- ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1868
- ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProceduresApiService });
1869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ProceduresApiService, decorators: [{
1870
- type: Injectable
1871
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1872
-
1873
1866
  /**
1874
1867
  * Generated bundle index. Do not edit.
1875
1868
  */