@veloceapps/api 8.0.0-11 → 8.0.0-111

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.
Files changed (67) hide show
  1. package/esm2020/index.mjs +9 -3
  2. package/esm2020/lib/api.module.mjs +25 -7
  3. package/esm2020/lib/services/account-api.service.mjs +3 -3
  4. package/esm2020/lib/services/auth.service.mjs +22 -0
  5. package/esm2020/lib/services/catalog-admin-api.service.mjs +3 -3
  6. package/esm2020/lib/services/catalog-api.service.mjs +3 -3
  7. package/esm2020/lib/services/configuration-api.service.mjs +27 -13
  8. package/esm2020/lib/services/configuration-processors-api.service.mjs +38 -0
  9. package/esm2020/lib/services/configuration-settings-api.service.mjs +3 -3
  10. package/esm2020/lib/services/context-api.service.mjs +3 -3
  11. package/esm2020/lib/services/contracted-price-api.service.mjs +45 -0
  12. package/esm2020/lib/services/delta-api.service.mjs +3 -3
  13. package/esm2020/lib/services/document-attachment-api.service.mjs +3 -3
  14. package/esm2020/lib/services/document-templates-api.service.mjs +5 -5
  15. package/esm2020/lib/services/endpoints-api.service.mjs +3 -3
  16. package/esm2020/lib/services/flow-state-api.mjs +80 -0
  17. package/esm2020/lib/services/flows-api.service.mjs +12 -8
  18. package/esm2020/lib/services/guided-sellings-admin-api.service.mjs +3 -3
  19. package/esm2020/lib/services/guided-sellings-api.service.mjs +3 -3
  20. package/esm2020/lib/services/offers-api.service.mjs +3 -3
  21. package/esm2020/lib/services/org-info-api.service.mjs +3 -3
  22. package/esm2020/lib/services/picklists-api.service.mjs +3 -3
  23. package/esm2020/lib/services/portals-api.service.mjs +76 -0
  24. package/esm2020/lib/services/price-api.service.mjs +3 -3
  25. package/esm2020/lib/services/procedures-api.service.mjs +3 -3
  26. package/esm2020/lib/services/product-api.service.mjs +3 -3
  27. package/esm2020/lib/services/product-model-api.service.mjs +3 -3
  28. package/esm2020/lib/services/promotions-api.service.mjs +68 -0
  29. package/esm2020/lib/services/quote-api.service.mjs +3 -3
  30. package/esm2020/lib/services/ramp-api.service.mjs +3 -3
  31. package/esm2020/lib/services/rebate-program-api.service.mjs +4 -4
  32. package/esm2020/lib/services/rebate-type-api.service.mjs +3 -3
  33. package/esm2020/lib/services/rule-groups-api.service.mjs +3 -3
  34. package/esm2020/lib/services/rules-api.service.mjs +14 -5
  35. package/esm2020/lib/services/salesforce-api.service.mjs +6 -4
  36. package/esm2020/lib/services/scripts-api.service.mjs +3 -3
  37. package/esm2020/lib/services/shopping-cart-settings-api.service.mjs +3 -3
  38. package/esm2020/lib/services/stateful-configuration-api.mjs +4 -4
  39. package/esm2020/lib/services/ui-definitions-api.service.mjs +3 -3
  40. package/esm2020/lib/services/ui-templates-api.service.mjs +9 -4
  41. package/esm2020/lib/services/veloce-objects-api.service.mjs +14 -4
  42. package/esm2020/lib/types/auth.types.mjs +2 -0
  43. package/esm2020/lib/types/index.mjs +2 -1
  44. package/esm2020/lib/types/stateful-configuration.types.mjs +1 -1
  45. package/fesm2015/veloceapps-api.mjs +598 -244
  46. package/fesm2015/veloceapps-api.mjs.map +1 -1
  47. package/fesm2020/veloceapps-api.mjs +603 -243
  48. package/fesm2020/veloceapps-api.mjs.map +1 -1
  49. package/index.d.ts +8 -2
  50. package/lib/services/auth.service.d.ts +11 -0
  51. package/lib/services/configuration-api.service.d.ts +5 -0
  52. package/lib/services/configuration-processors-api.service.d.ts +14 -0
  53. package/lib/services/contracted-price-api.service.d.ts +16 -0
  54. package/lib/services/flow-state-api.d.ts +44 -0
  55. package/lib/services/flows-api.service.d.ts +1 -1
  56. package/lib/services/portals-api.service.d.ts +20 -0
  57. package/lib/services/promotions-api.service.d.ts +19 -0
  58. package/lib/services/rebate-program-api.service.d.ts +1 -1
  59. package/lib/services/rules-api.service.d.ts +1 -0
  60. package/lib/services/salesforce-api.service.d.ts +1 -1
  61. package/lib/services/stateful-configuration-api.d.ts +2 -2
  62. package/lib/services/ui-templates-api.service.d.ts +1 -0
  63. package/lib/services/veloce-objects-api.service.d.ts +2 -1
  64. package/lib/types/auth.types.d.ts +4 -0
  65. package/lib/types/index.d.ts +1 -0
  66. package/lib/types/stateful-configuration.types.d.ts +1 -1
  67. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import * as i4 from '@angular/common/http';
2
- import { HttpParams, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
1
+ import * as i1$1 from '@angular/common/http';
2
+ import { HttpParams, HttpHeaders, HttpErrorResponse, 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 '@veloceapps/core';
6
- import { uiDefinitionFromDTO, isLegacyUIDefinition, ModelTranslatorUtils, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, Operator, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
6
+ import { uiDefinitionFromDTO, ConfigurationContextMode, isLegacyDocumentTemplate, DocxTemplater, QuoteDraft, StringUtils, Expression, toLatestFlow, isDefined, Operator, ModelTranslatorUtils, ProductModelsContainer, ModelUtils, EntityUtil, RuleGroupTypes, parseJsonSafely, uiDefinitionToDTO, BaseHttpService, XrayService } from '@veloceapps/core';
7
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';
@@ -82,12 +82,30 @@ class AccountApiService {
82
82
  });
83
83
  }
84
84
  }
85
- AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AccountApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
86
- AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AccountApiService });
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AccountApiService, decorators: [{
85
+ AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
86
+ AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService });
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, decorators: [{
88
88
  type: Injectable
89
89
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
90
90
 
91
+ class VeloceAuthService {
92
+ constructor(http) {
93
+ this.http = http;
94
+ }
95
+ auth$(instanceUrl, accessToken) {
96
+ const headers = new HttpHeaders({
97
+ 'Content-Type': 'application/json',
98
+ Authorization: `Bearer ${accessToken}`,
99
+ });
100
+ return this.http.get(`${instanceUrl}/services/apexrest/VELOCPQ/veloce-auth`, { headers });
101
+ }
102
+ }
103
+ VeloceAuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
104
+ VeloceAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService });
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, decorators: [{
106
+ type: Injectable
107
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
108
+
91
109
  class CatalogAdminApiService {
92
110
  constructor(baseHttpService) {
93
111
  this.baseHttpService = baseHttpService;
@@ -269,9 +287,9 @@ class CatalogAdminApiService {
269
287
  }
270
288
  }
271
289
  CatalogAdminApiService.MAX_RESULTS = 60;
272
- CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
273
- CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogAdminApiService });
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogAdminApiService, decorators: [{
290
+ CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
291
+ CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService });
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, decorators: [{
275
293
  type: Injectable
276
294
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
277
295
 
@@ -355,9 +373,9 @@ class CatalogApiService {
355
373
  });
356
374
  }
357
375
  }
358
- CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
359
- CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogApiService });
360
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogApiService, decorators: [{
376
+ CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
377
+ CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService });
378
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, decorators: [{
361
379
  type: Injectable
362
380
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
363
381
 
@@ -386,6 +404,26 @@ class ConfigurationApiService {
386
404
  }
387
405
  }));
388
406
  }
407
+ customConfigurePrice({ url, configurationRequest, runtimeModel, }) {
408
+ return this.httpService
409
+ .api({
410
+ method: 'post',
411
+ url,
412
+ body: configurationRequest,
413
+ errorHandler: e => throwError(e),
414
+ })
415
+ .pipe(map(configurePrice => {
416
+ if (runtimeModel) {
417
+ return {
418
+ ...configurePrice,
419
+ lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel),
420
+ };
421
+ }
422
+ else {
423
+ return configurePrice;
424
+ }
425
+ }));
426
+ }
389
427
  getRuntimeDataByProductId(productId, offeringId) {
390
428
  return this.httpService
391
429
  .api({
@@ -395,13 +433,7 @@ class ConfigurationApiService {
395
433
  .pipe(map(runtimeData => {
396
434
  return {
397
435
  ...runtimeData,
398
- uiDefinitions: runtimeData.uiDefinitions.map(dto => {
399
- const uiDefinitionContainer = uiDefinitionFromDTO(dto);
400
- if (isLegacyUIDefinition(uiDefinitionContainer.source)) {
401
- ModelTranslatorUtils.toLocalUIDefinition(uiDefinitionContainer.source);
402
- }
403
- return uiDefinitionContainer;
404
- }),
436
+ uiDefinitions: runtimeData.uiDefinitions.map(dto => uiDefinitionFromDTO(dto)),
405
437
  };
406
438
  }));
407
439
  }
@@ -416,7 +448,7 @@ class ConfigurationApiService {
416
448
  const portDomains = { ...lineItem.portDomains };
417
449
  for (const port of type?.ports ?? []) {
418
450
  const portDomain = portDomains[port.name];
419
- if (portDomain?.properties?.['domainComputation'] === 'false') {
451
+ if (portDomain?.properties?.['domainComputation'] === ('None')) {
420
452
  portDomain.domainTypes = port.domainTypes;
421
453
  }
422
454
  }
@@ -427,9 +459,44 @@ class ConfigurationApiService {
427
459
  };
428
460
  }
429
461
  }
430
- ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
431
- ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationApiService });
432
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationApiService, decorators: [{
462
+ ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
463
+ ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService });
464
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, decorators: [{
465
+ type: Injectable
466
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
467
+
468
+ class ConfigurationProcessorsApiService {
469
+ constructor(baseHttpService) {
470
+ this.baseHttpService = baseHttpService;
471
+ this.serviceUrl = '/configuration/processors/owners';
472
+ this.fetchConfigurationProcessors$ = (ownerId) => {
473
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
474
+ };
475
+ this.createConfigurationProcessors$ = (configurationProcessor) => {
476
+ return this.baseHttpService.api({
477
+ method: 'post',
478
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
479
+ body: configurationProcessor,
480
+ });
481
+ };
482
+ this.updateConfigurationProcessors$ = (configurationProcessor) => {
483
+ return this.baseHttpService.api({
484
+ method: 'put',
485
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
486
+ body: configurationProcessor,
487
+ });
488
+ };
489
+ this.deleteConfigurationProcessors$ = (configurationProcessor) => {
490
+ return this.baseHttpService.api({
491
+ method: 'delete',
492
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
493
+ });
494
+ };
495
+ }
496
+ }
497
+ ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
498
+ ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
499
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
433
500
  type: Injectable
434
501
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
435
502
 
@@ -537,9 +604,9 @@ class ConfigurationSettingsApiService {
537
604
  });
538
605
  }
539
606
  }
540
- ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
541
- ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationSettingsApiService });
542
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
607
+ ConfigurationSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, deps: [{ token: i1.BaseHttpService }, { token: i2.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
608
+ ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
543
610
  type: Injectable
544
611
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
545
612
 
@@ -559,9 +626,50 @@ class ContextApiService {
559
626
  });
560
627
  }
561
628
  }
562
- ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
563
- ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextApiService });
564
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextApiService, decorators: [{
629
+ ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
630
+ ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
632
+ type: Injectable
633
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
634
+
635
+ class ContractedPriceApiService {
636
+ constructor(baseHttpService) {
637
+ this.baseHttpService = baseHttpService;
638
+ this.serviceUrl = '/admin/contracted-price';
639
+ this.fetchContractedPrices$ = () => {
640
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
641
+ };
642
+ this.fetchContractedPrice$ = (id) => {
643
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
644
+ };
645
+ this.createContractedPrice$ = (data) => {
646
+ return this.baseHttpService.api({
647
+ url: `${this.serviceUrl}`,
648
+ method: 'put',
649
+ body: data,
650
+ });
651
+ };
652
+ this.updateContractedPrice$ = (data) => {
653
+ return this.baseHttpService.api({
654
+ url: `${this.serviceUrl}/${data.id}`,
655
+ method: 'put',
656
+ body: data,
657
+ });
658
+ };
659
+ this.searchContractedPrices$ = (searchParams, expression) => {
660
+ const params = new HttpParams({ fromObject: { ...searchParams } });
661
+ return this.baseHttpService.api({
662
+ method: 'post',
663
+ url: `${this.serviceUrl}/search`,
664
+ params,
665
+ body: expression || {},
666
+ });
667
+ };
668
+ }
669
+ }
670
+ ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
671
+ ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
565
673
  type: Injectable
566
674
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
567
675
 
@@ -579,9 +687,9 @@ class DeltaApiService {
579
687
  });
580
688
  }
581
689
  }
582
- DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
583
- DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DeltaApiService });
584
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DeltaApiService, decorators: [{
690
+ DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
691
+ DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
692
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
585
693
  type: Injectable
586
694
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
587
695
 
@@ -641,9 +749,9 @@ class DocumentAttachmentApiService {
641
749
  });
642
750
  }
643
751
  }
644
- DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
645
- DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentAttachmentApiService });
646
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
752
+ DocumentAttachmentApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, deps: [{ token: i1.BaseHttpService }, { token: i1.FileDownloadService }], target: i0.ɵɵFactoryTarget.Injectable });
753
+ DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
647
755
  type: Injectable
648
756
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
649
757
 
@@ -698,6 +806,8 @@ class SalesforceApiService {
698
806
  return this.httpService.api({ method: 'post', url: methodUrl, body: fields, ...options });
699
807
  }
700
808
  apexGetRequest(path, params, options) {
809
+ // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
810
+ // const httpParams = new HttpParams({ fromString: params.toString() });
701
811
  return this.httpService.api({ url: `${this.SERVICE_URL}/apex${path}`, params, ...options });
702
812
  }
703
813
  apexPostRequest(path, body, options) {
@@ -721,9 +831,9 @@ class SalesforceApiService {
721
831
  });
722
832
  }
723
833
  }
724
- SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
725
- SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SalesforceApiService });
726
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SalesforceApiService, decorators: [{
834
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
835
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
727
837
  type: Injectable
728
838
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
729
839
 
@@ -989,7 +1099,7 @@ class DocumentTemplatesApiService {
989
1099
  const patternLimit = /(\s*limit\s\d*)/i;
990
1100
  let limit = 1;
991
1101
  if (statement && patternLimit.test(statement)) {
992
- const limitStr = statement?.match(patternLimit)?.[1].trim().substring(5).trim();
1102
+ const limitStr = statement?.match(patternLimit)?.[1]?.trim().substring(5).trim();
993
1103
  if (limitStr) {
994
1104
  limit = Number.parseInt(limitStr, 10);
995
1105
  }
@@ -1007,11 +1117,11 @@ class DocumentTemplatesApiService {
1007
1117
  return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
1008
1118
  }
1009
1119
  }
1010
- DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1011
- DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentTemplatesApiService });
1012
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
1120
+ DocumentTemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, deps: [{ token: i1.BaseHttpService }, { token: SalesforceApiService }, { token: i1.FileDownloadService }, { token: DocumentAttachmentApiService }, { token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1121
+ DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
1122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
1013
1123
  type: Injectable
1014
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i4.HttpClient }]; } });
1124
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
1015
1125
 
1016
1126
  class EndpointsApiService {
1017
1127
  constructor(baseHttpService) {
@@ -1082,9 +1192,86 @@ class EndpointsApiService {
1082
1192
  });
1083
1193
  }
1084
1194
  }
1085
- EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1086
- EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EndpointsApiService });
1087
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EndpointsApiService, decorators: [{
1195
+ EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1196
+ EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
1197
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
1198
+ type: Injectable
1199
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1200
+
1201
+ class FlowStateApiService {
1202
+ constructor(httpService) {
1203
+ this.httpService = httpService;
1204
+ this.SERVICE_URL = '/configuration/states';
1205
+ }
1206
+ /**
1207
+ * Initialize flow state
1208
+ * @param request Request
1209
+ * @returns Flow initialization response, which contains session ID and result of selectors
1210
+ */
1211
+ init(request) {
1212
+ return this.httpService.api({
1213
+ method: 'post',
1214
+ url: `${this.SERVICE_URL}/quote/start`,
1215
+ body: request,
1216
+ });
1217
+ }
1218
+ /**
1219
+ * Get existing state by ID
1220
+ * @param id ID
1221
+ * @returns Flow State
1222
+ */
1223
+ get(id) {
1224
+ return this.httpService.api({
1225
+ url: `${this.SERVICE_URL}/${id}`,
1226
+ });
1227
+ }
1228
+ /**
1229
+ * Execute actions/selectors
1230
+ * @param id State ID
1231
+ * @param request Request
1232
+ * @returns Execute result
1233
+ */
1234
+ execute(id, request) {
1235
+ return this.httpService.api({
1236
+ method: 'post',
1237
+ url: `${this.SERVICE_URL}/quote/${id}/execute`,
1238
+ body: request,
1239
+ });
1240
+ }
1241
+ /**
1242
+ * Save Quote in the state
1243
+ * @param id State ID
1244
+ */
1245
+ save(id) {
1246
+ return this.httpService.api({
1247
+ method: 'post',
1248
+ url: `${this.SERVICE_URL}/quote/${id}/save`,
1249
+ });
1250
+ }
1251
+ /**
1252
+ * Submit Quote in the state
1253
+ * @param id State ID
1254
+ */
1255
+ submit(id) {
1256
+ return this.httpService.api({
1257
+ method: 'post',
1258
+ url: `${this.SERVICE_URL}/quote/${id}/submit`,
1259
+ });
1260
+ }
1261
+ /**
1262
+ * Close Flow state
1263
+ * @param id State ID
1264
+ */
1265
+ cancel(id) {
1266
+ return this.httpService.api({
1267
+ method: 'post',
1268
+ url: `${this.SERVICE_URL}/quote/${id}/cancel`,
1269
+ });
1270
+ }
1271
+ }
1272
+ FlowStateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1273
+ FlowStateApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService });
1274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, decorators: [{
1088
1275
  type: Injectable
1089
1276
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1090
1277
 
@@ -1094,17 +1281,20 @@ class FlowsApiService {
1094
1281
  this.flowsKey = 'flows';
1095
1282
  }
1096
1283
  getFlow(id) {
1097
- return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)));
1284
+ return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
1285
+ if (!flow) {
1286
+ throw new Error(`Flow with flowId=${id} is not defined`);
1287
+ }
1288
+ return flow;
1289
+ }));
1098
1290
  }
1099
1291
  fetchFlows() {
1100
- return this.configurationSettingsApiService
1101
- .fetchSetting(this.flowsKey)
1102
- .pipe(map((flow) => (flow?.value ? JSON.parse(flow.value) : [])));
1292
+ return this.configurationSettingsApiService.fetchSetting(this.flowsKey).pipe(map((setting) => (setting?.value ? JSON.parse(setting.value) : [])), map(anyFlows => anyFlows.map(toLatestFlow).filter(isDefined)));
1103
1293
  }
1104
1294
  }
1105
- FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1106
- FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowsApiService });
1107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowsApiService, decorators: [{
1295
+ FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1296
+ FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
1297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
1108
1298
  type: Injectable
1109
1299
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1110
1300
 
@@ -1163,9 +1353,9 @@ class GuidedSellingsAdminApiService {
1163
1353
  }
1164
1354
  }
1165
1355
  GuidedSellingsAdminApiService.MAX_RESULTS = 60;
1166
- GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1167
- GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingsAdminApiService });
1168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
1356
+ GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1357
+ GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
1358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
1169
1359
  type: Injectable
1170
1360
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1171
1361
 
@@ -1195,9 +1385,9 @@ class GuidedSellingApiService {
1195
1385
  });
1196
1386
  }
1197
1387
  }
1198
- GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1199
- GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingApiService });
1200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingApiService, decorators: [{
1388
+ GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1389
+ GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
1390
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
1201
1391
  type: Injectable
1202
1392
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1203
1393
 
@@ -1266,9 +1456,9 @@ class OffersApiService {
1266
1456
  }
1267
1457
  }
1268
1458
  OffersApiService.MAX_RESULTS = 60;
1269
- OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1270
- OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OffersApiService });
1271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OffersApiService, decorators: [{
1459
+ OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1460
+ OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
1461
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
1272
1462
  type: Injectable
1273
1463
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1274
1464
 
@@ -1282,11 +1472,11 @@ class OrgInfoApiService {
1282
1472
  return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
1283
1473
  }
1284
1474
  }
1285
- OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1286
- OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OrgInfoApiService });
1287
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OrgInfoApiService, decorators: [{
1475
+ OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1476
+ OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
1477
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
1288
1478
  type: Injectable
1289
- }], ctorParameters: function () { return [{ type: i4.HttpClient }]; } });
1479
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
1290
1480
 
1291
1481
  class PicklistsApiService {
1292
1482
  constructor(baseHttpService) {
@@ -1320,9 +1510,81 @@ class PicklistsApiService {
1320
1510
  };
1321
1511
  }
1322
1512
  }
1323
- PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1324
- PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PicklistsApiService });
1325
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PicklistsApiService, decorators: [{
1513
+ PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1514
+ PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
1515
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
1516
+ type: Injectable
1517
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1518
+
1519
+ class PortalsApiService {
1520
+ constructor(baseHttpService) {
1521
+ this.baseHttpService = baseHttpService;
1522
+ this.serviceUrl = '/admin/portal';
1523
+ this.getPortals$ = (skip = 1, name = '') => {
1524
+ let params = new HttpParams();
1525
+ params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
1526
+ params = params.append('skip', '0');
1527
+ params = params.append('name', name);
1528
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
1529
+ };
1530
+ this.searchPortals$ = (skip = 0, expression) => {
1531
+ let params = new HttpParams();
1532
+ params = params.set('skip', '' + skip);
1533
+ params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
1534
+ return this.baseHttpService.api({
1535
+ method: 'post',
1536
+ url: `${this.serviceUrl}/search`,
1537
+ params,
1538
+ body: expression || {},
1539
+ });
1540
+ };
1541
+ this.removePortal$ = (id) => {
1542
+ return this.baseHttpService.api({
1543
+ url: `${this.serviceUrl}/${id}`,
1544
+ method: 'delete',
1545
+ });
1546
+ };
1547
+ this.restore$ = (id) => {
1548
+ return this.baseHttpService.api({
1549
+ method: 'patch',
1550
+ url: `${this.serviceUrl}/${id}/restore`,
1551
+ });
1552
+ };
1553
+ this.duplicatePortal$ = (cloneRequest) => {
1554
+ return this.baseHttpService.api({
1555
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
1556
+ method: 'post',
1557
+ body: cloneRequest,
1558
+ });
1559
+ };
1560
+ this.getPortal$ = (id) => {
1561
+ return this.baseHttpService.api({
1562
+ url: `${this.serviceUrl}/${id}`,
1563
+ });
1564
+ };
1565
+ }
1566
+ createNewPortal$(body) {
1567
+ return this.baseHttpService.api({
1568
+ url: `${this.serviceUrl}`,
1569
+ method: 'post',
1570
+ body,
1571
+ });
1572
+ }
1573
+ updatePortal$(portal, settings) {
1574
+ return this.baseHttpService.api({
1575
+ url: `${this.serviceUrl}/${portal.id}`,
1576
+ method: 'put',
1577
+ body: {
1578
+ ...portal,
1579
+ settings: JSON.stringify(settings),
1580
+ },
1581
+ });
1582
+ }
1583
+ }
1584
+ PortalsApiService.MAX_RESULTS = 60;
1585
+ PortalsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1586
+ PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
1587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
1326
1588
  type: Injectable
1327
1589
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1328
1590
 
@@ -1380,9 +1642,9 @@ class PriceApiService {
1380
1642
  });
1381
1643
  }
1382
1644
  }
1383
- PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1384
- PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PriceApiService });
1385
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PriceApiService, decorators: [{
1645
+ PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1646
+ PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
1647
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
1386
1648
  type: Injectable
1387
1649
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1388
1650
 
@@ -1474,9 +1736,9 @@ class ProceduresApiService {
1474
1736
  });
1475
1737
  }
1476
1738
  }
1477
- ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1478
- ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProceduresApiService });
1479
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProceduresApiService, decorators: [{
1739
+ ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1740
+ ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
1741
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
1480
1742
  type: Injectable
1481
1743
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1482
1744
 
@@ -1622,9 +1884,9 @@ class ProductApiService {
1622
1884
  return `${this.serviceUrl}/${productId}/image`;
1623
1885
  }
1624
1886
  }
1625
- ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1626
- ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductApiService });
1627
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductApiService, decorators: [{
1887
+ ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1888
+ ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
1889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
1628
1890
  type: Injectable
1629
1891
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1630
1892
 
@@ -1853,9 +2115,72 @@ class ProductModelApiService {
1853
2115
  }
1854
2116
  }
1855
2117
  ProductModelApiService.MAX_RESULTS = 200;
1856
- ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1857
- ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelApiService });
1858
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelApiService, decorators: [{
2118
+ ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2119
+ ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
2120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
2121
+ type: Injectable
2122
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2123
+
2124
+ class PromotionsApiService {
2125
+ constructor(baseHttpService) {
2126
+ this.baseHttpService = baseHttpService;
2127
+ this.serviceUrl = '/admin/promotion';
2128
+ this.fetchAll$ = () => {
2129
+ return this.baseHttpService.api({ url: this.serviceUrl });
2130
+ };
2131
+ this.fetchOne$ = (id) => {
2132
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2133
+ };
2134
+ this.remove$ = (id) => {
2135
+ return this.baseHttpService.api({
2136
+ url: `${this.serviceUrl}/${id}`,
2137
+ method: 'delete',
2138
+ });
2139
+ };
2140
+ this.restore$ = (id) => {
2141
+ return this.baseHttpService.api({
2142
+ method: 'patch',
2143
+ url: `${this.serviceUrl}/${id}/restore`,
2144
+ });
2145
+ };
2146
+ this.duplicate$ = (body) => {
2147
+ return this.baseHttpService
2148
+ .api({
2149
+ url: `${this.serviceUrl}/${body.id}/clone`,
2150
+ method: 'post',
2151
+ body,
2152
+ })
2153
+ .pipe(map$1(response => response.clonedRecordId));
2154
+ };
2155
+ }
2156
+ search$(expression, skip, count) {
2157
+ let params = new HttpParams();
2158
+ if (typeof skip === 'number') {
2159
+ params = params.set('skip', '' + skip);
2160
+ }
2161
+ if (typeof count === 'number') {
2162
+ params = params.set('count', '' + count);
2163
+ }
2164
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2165
+ }
2166
+ create$(body) {
2167
+ return this.baseHttpService.api({
2168
+ url: `${this.serviceUrl}`,
2169
+ method: 'post',
2170
+ body,
2171
+ });
2172
+ }
2173
+ update$(body) {
2174
+ return this.baseHttpService.api({
2175
+ url: `${this.serviceUrl}/${body.id}`,
2176
+ method: 'put',
2177
+ body,
2178
+ });
2179
+ }
2180
+ }
2181
+ PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2182
+ PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
2183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
1859
2184
  type: Injectable
1860
2185
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1861
2186
 
@@ -1901,9 +2226,9 @@ class QuoteApiService {
1901
2226
  });
1902
2227
  }
1903
2228
  }
1904
- QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1905
- QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteApiService });
1906
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteApiService, decorators: [{
2229
+ QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2230
+ QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
2231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
1907
2232
  type: Injectable
1908
2233
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1909
2234
 
@@ -1929,9 +2254,135 @@ class RampApiService {
1929
2254
  });
1930
2255
  }
1931
2256
  }
1932
- RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1933
- RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RampApiService });
1934
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RampApiService, decorators: [{
2257
+ RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2258
+ RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
2259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
2260
+ type: Injectable
2261
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2262
+
2263
+ class RebateProgramApiService {
2264
+ constructor(baseHttpService) {
2265
+ this.baseHttpService = baseHttpService;
2266
+ this.serviceUrl = '/admin/rebate-program';
2267
+ this.fetchAll$ = () => {
2268
+ return this.baseHttpService.api({ url: this.serviceUrl });
2269
+ };
2270
+ this.fetchOne$ = (id) => {
2271
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2272
+ };
2273
+ this.remove$ = (id) => {
2274
+ return this.baseHttpService.api({
2275
+ url: `${this.serviceUrl}/${id}`,
2276
+ method: 'delete',
2277
+ });
2278
+ };
2279
+ this.restore$ = (id) => {
2280
+ return this.baseHttpService.api({
2281
+ method: 'patch',
2282
+ url: `${this.serviceUrl}/${id}/restore`,
2283
+ });
2284
+ };
2285
+ this.duplicate$ = (body) => {
2286
+ return this.baseHttpService
2287
+ .api({
2288
+ url: `${this.serviceUrl}/${body.id}/clone`,
2289
+ method: 'post',
2290
+ body,
2291
+ })
2292
+ .pipe(map$1(response => response.clonedRecordId));
2293
+ };
2294
+ }
2295
+ search$(expression, skip, count) {
2296
+ let params = new HttpParams();
2297
+ if (typeof skip === 'number') {
2298
+ params = params.set('skip', '' + skip);
2299
+ }
2300
+ if (typeof count === 'number') {
2301
+ params = params.set('count', '' + count);
2302
+ }
2303
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2304
+ }
2305
+ create$(body) {
2306
+ return this.baseHttpService.api({
2307
+ url: `${this.serviceUrl}`,
2308
+ method: 'post',
2309
+ body,
2310
+ });
2311
+ }
2312
+ update$(body) {
2313
+ return this.baseHttpService.api({
2314
+ url: `${this.serviceUrl}/${body.id}`,
2315
+ method: 'put',
2316
+ body,
2317
+ });
2318
+ }
2319
+ }
2320
+ RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2321
+ RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
2322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
2323
+ type: Injectable
2324
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2325
+
2326
+ class RebateTypeApiService {
2327
+ constructor(baseHttpService) {
2328
+ this.baseHttpService = baseHttpService;
2329
+ this.serviceUrl = '/admin/rebate-type';
2330
+ this.fetchAll$ = () => {
2331
+ return this.baseHttpService.api({ url: this.serviceUrl });
2332
+ };
2333
+ this.fetchOne$ = (id) => {
2334
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2335
+ };
2336
+ this.remove$ = (id) => {
2337
+ return this.baseHttpService.api({
2338
+ url: `${this.serviceUrl}/${id}`,
2339
+ method: 'delete',
2340
+ });
2341
+ };
2342
+ this.restore$ = (id) => {
2343
+ return this.baseHttpService.api({
2344
+ method: 'patch',
2345
+ url: `${this.serviceUrl}/${id}/restore`,
2346
+ });
2347
+ };
2348
+ this.duplicate$ = (body) => {
2349
+ return this.baseHttpService
2350
+ .api({
2351
+ url: `${this.serviceUrl}/${body.id}/clone`,
2352
+ method: 'post',
2353
+ body,
2354
+ })
2355
+ .pipe(map$1(response => response.clonedRecordId));
2356
+ };
2357
+ }
2358
+ search$(expression, skip, count) {
2359
+ let params = new HttpParams();
2360
+ if (typeof skip === 'number') {
2361
+ params = params.set('skip', '' + skip);
2362
+ }
2363
+ if (typeof count === 'number') {
2364
+ params = params.set('count', '' + count);
2365
+ }
2366
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2367
+ }
2368
+ create$(body) {
2369
+ return this.baseHttpService.api({
2370
+ url: `${this.serviceUrl}`,
2371
+ method: 'post',
2372
+ body,
2373
+ });
2374
+ }
2375
+ update$(body) {
2376
+ return this.baseHttpService.api({
2377
+ url: `${this.serviceUrl}/${body.id}`,
2378
+ method: 'put',
2379
+ body,
2380
+ });
2381
+ }
2382
+ }
2383
+ RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2384
+ RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
2385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
1935
2386
  type: Injectable
1936
2387
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1937
2388
 
@@ -1985,9 +2436,9 @@ class RuleGroupsApiService {
1985
2436
  };
1986
2437
  }
1987
2438
  }
1988
- RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1989
- RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuleGroupsApiService });
1990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuleGroupsApiService, decorators: [{
2439
+ RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2440
+ RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
2441
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1991
2442
  type: Injectable
1992
2443
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1993
2444
 
@@ -2057,17 +2508,26 @@ class RulesApiService {
2057
2508
  });
2058
2509
  }
2059
2510
  execute$(body) {
2060
- const url = body.rule.ruleGroupType === RuleGroupTypes.eligibility ? '/rules/eligibility/execute' : '/rules/execute';
2511
+ const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
2061
2512
  return this.baseHttpService.api({
2062
2513
  url,
2063
2514
  method: 'post',
2064
2515
  body,
2065
2516
  });
2066
2517
  }
2518
+ getExecuteRuleUrl(ruleGroupType) {
2519
+ if (ruleGroupType === RuleGroupTypes.eligibility) {
2520
+ return '/rules/eligibility/execute';
2521
+ }
2522
+ if (ruleGroupType === RuleGroupTypes.catalog) {
2523
+ return '/rules/catalog/execute';
2524
+ }
2525
+ return '/rules/execute';
2526
+ }
2067
2527
  }
2068
- RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2069
- RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService });
2070
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService, decorators: [{
2528
+ RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2529
+ RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
2530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
2071
2531
  type: Injectable
2072
2532
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2073
2533
 
@@ -2141,9 +2601,9 @@ class ScriptsApiService {
2141
2601
  };
2142
2602
  }
2143
2603
  }
2144
- ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2145
- ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService });
2146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService, decorators: [{
2604
+ ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2605
+ ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
2606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
2147
2607
  type: Injectable
2148
2608
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2149
2609
 
@@ -2164,9 +2624,9 @@ class ShoppingCartSettingsApiService {
2164
2624
  }, {})));
2165
2625
  }
2166
2626
  }
2167
- ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2168
- ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService });
2169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2627
+ ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2628
+ ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
2629
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2170
2630
  type: Injectable
2171
2631
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
2172
2632
 
@@ -2212,9 +2672,9 @@ class StatefulConfigurationApiService {
2212
2672
  });
2213
2673
  }
2214
2674
  }
2215
- StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2216
- StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService });
2217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2675
+ StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2676
+ StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
2677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2218
2678
  type: Injectable
2219
2679
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2220
2680
 
@@ -2281,9 +2741,9 @@ class UIDefinitionsApiService {
2281
2741
  return `/models/${modelId}/uidefinitions`;
2282
2742
  }
2283
2743
  }
2284
- UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2285
- UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService });
2286
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2744
+ UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2745
+ UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
2746
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2287
2747
  type: Injectable
2288
2748
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2289
2749
 
@@ -2519,6 +2979,11 @@ class UITemplatesApiService {
2519
2979
  this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
2520
2980
  ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
2521
2981
  };
2982
+ this.fetchComponentsAttachments$ = (templateId) => {
2983
+ return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
2984
+ return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
2985
+ }));
2986
+ };
2522
2987
  this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
2523
2988
  return this.baseHttpService
2524
2989
  .api({
@@ -2569,9 +3034,9 @@ class UITemplatesApiService {
2569
3034
  });
2570
3035
  }
2571
3036
  }
2572
- UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2573
- UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService });
2574
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService, decorators: [{
3037
+ UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
3038
+ UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
3039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
2575
3040
  type: Injectable
2576
3041
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2577
3042
 
@@ -2607,6 +3072,15 @@ class VeloceObjectsApiService {
2607
3072
  url: `${this.serviceUrl}/${id}`,
2608
3073
  });
2609
3074
  };
3075
+ this.duplicateObject$ = (body) => {
3076
+ return this.baseHttpService
3077
+ .api({
3078
+ method: 'post',
3079
+ url: `${this.serviceUrl}/${body.id}/clone`,
3080
+ body,
3081
+ })
3082
+ .pipe(map(response => response.clonedRecordId));
3083
+ };
2610
3084
  this.restoreObject$ = (id) => {
2611
3085
  return this.baseHttpService.api({
2612
3086
  method: 'patch',
@@ -2645,143 +3119,17 @@ class VeloceObjectsApiService {
2645
3119
  });
2646
3120
  }
2647
3121
  }
2648
- VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2649
- VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService });
2650
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2651
- type: Injectable
2652
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2653
-
2654
- class RebateProgramApiService {
2655
- constructor(baseHttpService) {
2656
- this.baseHttpService = baseHttpService;
2657
- this.serviceUrl = '/admin/rebate-program';
2658
- this.fetchAll$ = () => {
2659
- return this.baseHttpService.api({ url: this.serviceUrl });
2660
- };
2661
- this.fetchOne$ = (id) => {
2662
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2663
- };
2664
- this.remove$ = (id) => {
2665
- return this.baseHttpService.api({
2666
- url: `${this.serviceUrl}/${id}`,
2667
- method: 'delete',
2668
- });
2669
- };
2670
- this.restore$ = (id) => {
2671
- return this.baseHttpService.api({
2672
- method: 'patch',
2673
- url: `${this.serviceUrl}/${id}/restore`,
2674
- });
2675
- };
2676
- this.duplicate$ = (body) => {
2677
- return this.baseHttpService
2678
- .api({
2679
- url: `${this.serviceUrl}/${body.id}/clone`,
2680
- method: 'post',
2681
- body,
2682
- })
2683
- .pipe(map$1(response => response.clonedRecordId));
2684
- };
2685
- }
2686
- search$(expression, skip, count) {
2687
- let params = new HttpParams();
2688
- if (typeof skip === 'number') {
2689
- params = params.set('skip', '' + skip);
2690
- }
2691
- if (typeof count === 'number') {
2692
- params = params.set('count', '' + count);
2693
- }
2694
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2695
- }
2696
- create$(body) {
2697
- return this.baseHttpService.api({
2698
- url: `${this.serviceUrl}`,
2699
- method: 'post',
2700
- body,
2701
- });
2702
- }
2703
- update$(body) {
2704
- return this.baseHttpService.api({
2705
- url: `${this.serviceUrl}/${body.id}`,
2706
- method: 'put',
2707
- body,
2708
- });
2709
- }
2710
- }
2711
- RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2712
- RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService });
2713
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, decorators: [{
2714
- type: Injectable
2715
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2716
-
2717
- class RebateTypeApiService {
2718
- constructor(baseHttpService) {
2719
- this.baseHttpService = baseHttpService;
2720
- this.serviceUrl = '/admin/rebate-type';
2721
- this.fetchAll$ = () => {
2722
- return this.baseHttpService.api({ url: this.serviceUrl });
2723
- };
2724
- this.fetchOne$ = (id) => {
2725
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2726
- };
2727
- this.remove$ = (id) => {
2728
- return this.baseHttpService.api({
2729
- url: `${this.serviceUrl}/${id}`,
2730
- method: 'delete',
2731
- });
2732
- };
2733
- this.restore$ = (id) => {
2734
- return this.baseHttpService.api({
2735
- method: 'patch',
2736
- url: `${this.serviceUrl}/${id}/restore`,
2737
- });
2738
- };
2739
- this.duplicate$ = (body) => {
2740
- return this.baseHttpService
2741
- .api({
2742
- url: `${this.serviceUrl}/${body.id}/clone`,
2743
- method: 'post',
2744
- body,
2745
- })
2746
- .pipe(map$1(response => response.clonedRecordId));
2747
- };
2748
- }
2749
- search$(expression, skip, count) {
2750
- let params = new HttpParams();
2751
- if (typeof skip === 'number') {
2752
- params = params.set('skip', '' + skip);
2753
- }
2754
- if (typeof count === 'number') {
2755
- params = params.set('count', '' + count);
2756
- }
2757
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2758
- }
2759
- create$(body) {
2760
- return this.baseHttpService.api({
2761
- url: `${this.serviceUrl}`,
2762
- method: 'post',
2763
- body,
2764
- });
2765
- }
2766
- update$(body) {
2767
- return this.baseHttpService.api({
2768
- url: `${this.serviceUrl}/${body.id}`,
2769
- method: 'put',
2770
- body,
2771
- });
2772
- }
2773
- }
2774
- RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2775
- RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService });
2776
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService, decorators: [{
3122
+ VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
3123
+ VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
3124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2777
3125
  type: Injectable
2778
3126
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2779
3127
 
2780
3128
  class ApiModule {
2781
3129
  }
2782
- ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2783
- ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2784
- ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, providers: [
3130
+ ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3131
+ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
3132
+ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
2785
3133
  BaseHttpService,
2786
3134
  XrayService,
2787
3135
  ConfigurationApiService,
@@ -2817,8 +3165,14 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2817
3165
  StatefulConfigurationApiService,
2818
3166
  RebateProgramApiService,
2819
3167
  RebateTypeApiService,
3168
+ PromotionsApiService,
3169
+ VeloceAuthService,
3170
+ ContractedPriceApiService,
3171
+ PortalsApiService,
3172
+ ConfigurationProcessorsApiService,
3173
+ FlowStateApiService,
2820
3174
  ], imports: [HttpClientModule] });
2821
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
3175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
2822
3176
  type: NgModule,
2823
3177
  args: [{
2824
3178
  imports: [HttpClientModule],
@@ -2858,6 +3212,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2858
3212
  StatefulConfigurationApiService,
2859
3213
  RebateProgramApiService,
2860
3214
  RebateTypeApiService,
3215
+ PromotionsApiService,
3216
+ VeloceAuthService,
3217
+ ContractedPriceApiService,
3218
+ PortalsApiService,
3219
+ ConfigurationProcessorsApiService,
3220
+ FlowStateApiService,
2861
3221
  ],
2862
3222
  }]
2863
3223
  }] });
@@ -2866,5 +3226,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2866
3226
  * Generated bundle index. Do not edit.
2867
3227
  */
2868
3228
 
2869
- export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationSettingsApiService, ContextApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceObjectsApiService };
3229
+ export { AccountApiService, ApiModule, CatalogAdminApiService, CatalogApiService, ConfigurationApiService, ConfigurationProcessorsApiService, ConfigurationSettingsApiService, ContextApiService, ContractedPriceApiService, DeltaApiService, DocumentAttachmentApiService, DocumentTemplatesApiService, EndpointsApiService, FlowStateApiService, FlowsApiService, GuidedSellingApiService, GuidedSellingsAdminApiService, OffersApiService, OrgInfoApiService, PicklistsApiService, PortalsApiService, PriceApiService, ProceduresApiService, ProductApiService, ProductModelApiService, PromotionsApiService, QuoteApiService, RampApiService, RebateProgramApiService, RebateTypeApiService, RuleGroupsApiService, RulesApiService, SalesforceApiService, ScriptsApiService, ShoppingCartSettingsApiService, StatefulConfigurationApiService, UIDefinitionsApiService, UITemplatesApiService, VeloceAuthService, VeloceObjectsApiService };
2870
3230
  //# sourceMappingURL=veloceapps-api.mjs.map