@veloceapps/api 2.0.13 → 2.0.15

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({
@@ -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) {
@@ -1006,6 +1004,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1006
1004
  type: Injectable
1007
1005
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1008
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: [{
1066
+ type: Injectable
1067
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1068
+
1009
1069
  class ProductModelApiService {
1010
1070
  constructor(httpService) {
1011
1071
  this.httpService = httpService;
@@ -1304,6 +1364,168 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1304
1364
  type: Injectable
1305
1365
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1306
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: [{
1526
+ type: Injectable
1527
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1528
+
1307
1529
  const fromUIComponentStoryDTO = (dto, attachments) => {
1308
1530
  return {
1309
1531
  id: dto.id,
@@ -1592,168 +1814,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImpo
1592
1814
  type: Injectable
1593
1815
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1594
1816
 
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.15", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1662
- ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ScriptsApiService });
1663
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", 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.15", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1724
- RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RulesApiService });
1725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", 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.15", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1752
- RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RuleGroupsApiService });
1753
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1754
- type: Injectable
1755
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1756
-
1757
1817
  class ApiModule {
1758
1818
  }
1759
1819
  ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
@@ -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,
@@ -1789,6 +1850,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", 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.15", 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.15", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1868
- ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0, type: ProceduresApiService });
1869
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", 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
  */