@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';
@@ -53,12 +53,30 @@ class AccountApiService {
53
53
  return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/${accountId}/orders/${orderId}/to-asset`, method: 'post', body: { id: orderId } }, options));
54
54
  }
55
55
  }
56
- AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AccountApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
57
- AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AccountApiService });
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: AccountApiService, decorators: [{
56
+ AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
57
+ AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService });
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AccountApiService, decorators: [{
59
59
  type: Injectable
60
60
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
61
61
 
62
+ class VeloceAuthService {
63
+ constructor(http) {
64
+ this.http = http;
65
+ }
66
+ auth$(instanceUrl, accessToken) {
67
+ const headers = new HttpHeaders({
68
+ 'Content-Type': 'application/json',
69
+ Authorization: `Bearer ${accessToken}`,
70
+ });
71
+ return this.http.get(`${instanceUrl}/services/apexrest/VELOCPQ/veloce-auth`, { headers });
72
+ }
73
+ }
74
+ 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 });
75
+ VeloceAuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceAuthService, decorators: [{
77
+ type: Injectable
78
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
79
+
62
80
  class CatalogAdminApiService {
63
81
  constructor(baseHttpService) {
64
82
  this.baseHttpService = baseHttpService;
@@ -240,9 +258,9 @@ class CatalogAdminApiService {
240
258
  }
241
259
  }
242
260
  CatalogAdminApiService.MAX_RESULTS = 60;
243
- CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
244
- CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogAdminApiService });
245
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogAdminApiService, decorators: [{
261
+ CatalogAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
262
+ CatalogAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService });
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogAdminApiService, decorators: [{
246
264
  type: Injectable
247
265
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
248
266
 
@@ -326,9 +344,9 @@ class CatalogApiService {
326
344
  });
327
345
  }
328
346
  }
329
- CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
330
- CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogApiService });
331
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CatalogApiService, decorators: [{
347
+ CatalogApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
348
+ CatalogApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService });
349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogApiService, decorators: [{
332
350
  type: Injectable
333
351
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
334
352
 
@@ -354,6 +372,23 @@ class ConfigurationApiService {
354
372
  }
355
373
  }));
356
374
  }
375
+ customConfigurePrice({ url, configurationRequest, runtimeModel, }) {
376
+ return this.httpService
377
+ .api({
378
+ method: 'post',
379
+ url,
380
+ body: configurationRequest,
381
+ errorHandler: e => throwError(e),
382
+ })
383
+ .pipe(map(configurePrice => {
384
+ if (runtimeModel) {
385
+ return Object.assign(Object.assign({}, configurePrice), { lineItem: this.updatePortDomains(configurePrice.lineItem, runtimeModel) });
386
+ }
387
+ else {
388
+ return configurePrice;
389
+ }
390
+ }));
391
+ }
357
392
  getRuntimeDataByProductId(productId, offeringId) {
358
393
  return this.httpService
359
394
  .api({
@@ -361,13 +396,7 @@ class ConfigurationApiService {
361
396
  url: `${this.SERVICE_URL}/${productId}/model` + ((offeringId && `/${offeringId}`) || ''),
362
397
  })
363
398
  .pipe(map(runtimeData => {
364
- return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto => {
365
- const uiDefinitionContainer = uiDefinitionFromDTO(dto);
366
- if (isLegacyUIDefinition(uiDefinitionContainer.source)) {
367
- ModelTranslatorUtils.toLocalUIDefinition(uiDefinitionContainer.source);
368
- }
369
- return uiDefinitionContainer;
370
- }) });
399
+ return Object.assign(Object.assign({}, runtimeData), { uiDefinitions: runtimeData.uiDefinitions.map(dto => uiDefinitionFromDTO(dto)) });
371
400
  }));
372
401
  }
373
402
  getRuntimeDataByModelId(modelId) {
@@ -382,16 +411,51 @@ class ConfigurationApiService {
382
411
  const portDomains = Object.assign({}, lineItem.portDomains);
383
412
  for (const port of (_a = type === null || type === void 0 ? void 0 : type.ports) !== null && _a !== void 0 ? _a : []) {
384
413
  const portDomain = portDomains[port.name];
385
- if (((_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === 'false') {
414
+ if (((_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.properties) === null || _b === void 0 ? void 0 : _b['domainComputation']) === ('None')) {
386
415
  portDomain.domainTypes = port.domainTypes;
387
416
  }
388
417
  }
389
418
  return Object.assign(Object.assign({}, lineItem), { lineItems: (_c = lineItem.lineItems) === null || _c === void 0 ? void 0 : _c.map(i => this.updatePortDomains(i, runtimeModel)), portDomains });
390
419
  }
391
420
  }
392
- ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
393
- ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationApiService });
394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationApiService, decorators: [{
421
+ ConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
422
+ ConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService });
423
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationApiService, decorators: [{
424
+ type: Injectable
425
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
426
+
427
+ class ConfigurationProcessorsApiService {
428
+ constructor(baseHttpService) {
429
+ this.baseHttpService = baseHttpService;
430
+ this.serviceUrl = '/configuration/processors/owners';
431
+ this.fetchConfigurationProcessors$ = (ownerId) => {
432
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${ownerId}` });
433
+ };
434
+ this.createConfigurationProcessors$ = (configurationProcessor) => {
435
+ return this.baseHttpService.api({
436
+ method: 'post',
437
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}`,
438
+ body: configurationProcessor,
439
+ });
440
+ };
441
+ this.updateConfigurationProcessors$ = (configurationProcessor) => {
442
+ return this.baseHttpService.api({
443
+ method: 'put',
444
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
445
+ body: configurationProcessor,
446
+ });
447
+ };
448
+ this.deleteConfigurationProcessors$ = (configurationProcessor) => {
449
+ return this.baseHttpService.api({
450
+ method: 'delete',
451
+ url: `${this.serviceUrl}/${configurationProcessor.ownerId}/${configurationProcessor.id}`,
452
+ });
453
+ };
454
+ }
455
+ }
456
+ ConfigurationProcessorsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
457
+ ConfigurationProcessorsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService });
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationProcessorsApiService, decorators: [{
395
459
  type: Injectable
396
460
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
397
461
 
@@ -464,9 +528,9 @@ class ConfigurationSettingsApiService {
464
528
  return this.httpService.api(Object.assign({ method: 'get', url: '/cache/evict/' + name }, options));
465
529
  }
466
530
  }
467
- 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 });
468
- ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationSettingsApiService });
469
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
531
+ 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 });
532
+ ConfigurationSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService });
533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ConfigurationSettingsApiService, decorators: [{
470
534
  type: Injectable
471
535
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i2.MessageService }]; } });
472
536
 
@@ -486,9 +550,50 @@ class ContextApiService {
486
550
  });
487
551
  }
488
552
  }
489
- ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
490
- ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextApiService });
491
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ContextApiService, decorators: [{
553
+ ContextApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
554
+ ContextApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService });
555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextApiService, decorators: [{
556
+ type: Injectable
557
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
558
+
559
+ class ContractedPriceApiService {
560
+ constructor(baseHttpService) {
561
+ this.baseHttpService = baseHttpService;
562
+ this.serviceUrl = '/admin/contracted-price';
563
+ this.fetchContractedPrices$ = () => {
564
+ return this.baseHttpService.api({ url: `${this.serviceUrl}` });
565
+ };
566
+ this.fetchContractedPrice$ = (id) => {
567
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
568
+ };
569
+ this.createContractedPrice$ = (data) => {
570
+ return this.baseHttpService.api({
571
+ url: `${this.serviceUrl}`,
572
+ method: 'put',
573
+ body: data,
574
+ });
575
+ };
576
+ this.updateContractedPrice$ = (data) => {
577
+ return this.baseHttpService.api({
578
+ url: `${this.serviceUrl}/${data.id}`,
579
+ method: 'put',
580
+ body: data,
581
+ });
582
+ };
583
+ this.searchContractedPrices$ = (searchParams, expression) => {
584
+ const params = new HttpParams({ fromObject: Object.assign({}, searchParams) });
585
+ return this.baseHttpService.api({
586
+ method: 'post',
587
+ url: `${this.serviceUrl}/search`,
588
+ params,
589
+ body: expression || {},
590
+ });
591
+ };
592
+ }
593
+ }
594
+ ContractedPriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
595
+ ContractedPriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService });
596
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContractedPriceApiService, decorators: [{
492
597
  type: Injectable
493
598
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
494
599
 
@@ -506,9 +611,9 @@ class DeltaApiService {
506
611
  });
507
612
  }
508
613
  }
509
- DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
510
- DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DeltaApiService });
511
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DeltaApiService, decorators: [{
614
+ DeltaApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
615
+ DeltaApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService });
616
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DeltaApiService, decorators: [{
512
617
  type: Injectable
513
618
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
514
619
 
@@ -568,9 +673,9 @@ class DocumentAttachmentApiService {
568
673
  });
569
674
  }
570
675
  }
571
- 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 });
572
- DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentAttachmentApiService });
573
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
676
+ 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 });
677
+ DocumentAttachmentApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService });
678
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentAttachmentApiService, decorators: [{
574
679
  type: Injectable
575
680
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: i1.FileDownloadService }]; } });
576
681
 
@@ -612,6 +717,8 @@ class SalesforceApiService {
612
717
  return this.httpService.api(Object.assign({ method: 'post', url: methodUrl, body: fields }, options));
613
718
  }
614
719
  apexGetRequest(path, params, options) {
720
+ // this line is needed because HttpParams instance from Integration behaves wrong in studio instance of Angular
721
+ // const httpParams = new HttpParams({ fromString: params.toString() });
615
722
  return this.httpService.api(Object.assign({ url: `${this.SERVICE_URL}/apex${path}`, params }, options));
616
723
  }
617
724
  apexPostRequest(path, body, options) {
@@ -630,9 +737,9 @@ class SalesforceApiService {
630
737
  });
631
738
  }
632
739
  }
633
- SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
634
- SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SalesforceApiService });
635
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: SalesforceApiService, decorators: [{
740
+ SalesforceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
741
+ SalesforceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService });
742
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SalesforceApiService, decorators: [{
636
743
  type: Injectable
637
744
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
638
745
 
@@ -884,11 +991,11 @@ class DocumentTemplatesApiService {
884
991
  return forkJoin(attachmentIds.map(id => this.documentAttachmentService.getAttachmentFile(id, true)));
885
992
  }
886
993
  queryObject({ objectName, resultObjectName, fields, statement }, { properties }) {
887
- var _a;
994
+ var _a, _b;
888
995
  const patternLimit = /(\s*limit\s\d*)/i;
889
996
  let limit = 1;
890
997
  if (statement && patternLimit.test(statement)) {
891
- const limitStr = (_a = statement === null || statement === void 0 ? void 0 : statement.match(patternLimit)) === null || _a === void 0 ? void 0 : _a[1].trim().substring(5).trim();
998
+ const limitStr = (_b = (_a = statement === null || statement === void 0 ? void 0 : statement.match(patternLimit)) === null || _a === void 0 ? void 0 : _a[1]) === null || _b === void 0 ? void 0 : _b.trim().substring(5).trim();
892
999
  if (limitStr) {
893
1000
  limit = Number.parseInt(limitStr, 10);
894
1001
  }
@@ -901,11 +1008,11 @@ class DocumentTemplatesApiService {
901
1008
  return this.salesforceApiService.query(searchRequest, objectName).pipe(this.mapSfQueryResult(limit), map(value => ({ [resultObjectName]: value })));
902
1009
  }
903
1010
  }
904
- 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 });
905
- DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentTemplatesApiService });
906
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
1011
+ 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 });
1012
+ DocumentTemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService });
1013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocumentTemplatesApiService, decorators: [{
907
1014
  type: Injectable
908
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i4.HttpClient }]; } });
1015
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }, { type: SalesforceApiService }, { type: i1.FileDownloadService }, { type: DocumentAttachmentApiService }, { type: i1$1.HttpClient }]; } });
909
1016
 
910
1017
  class EndpointsApiService {
911
1018
  constructor(baseHttpService) {
@@ -976,9 +1083,86 @@ class EndpointsApiService {
976
1083
  });
977
1084
  }
978
1085
  }
979
- EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
980
- EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EndpointsApiService });
981
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: EndpointsApiService, decorators: [{
1086
+ EndpointsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1087
+ EndpointsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService });
1088
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EndpointsApiService, decorators: [{
1089
+ type: Injectable
1090
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1091
+
1092
+ class FlowStateApiService {
1093
+ constructor(httpService) {
1094
+ this.httpService = httpService;
1095
+ this.SERVICE_URL = '/configuration/states';
1096
+ }
1097
+ /**
1098
+ * Initialize flow state
1099
+ * @param request Request
1100
+ * @returns Flow initialization response, which contains session ID and result of selectors
1101
+ */
1102
+ init(request) {
1103
+ return this.httpService.api({
1104
+ method: 'post',
1105
+ url: `${this.SERVICE_URL}/quote/start`,
1106
+ body: request,
1107
+ });
1108
+ }
1109
+ /**
1110
+ * Get existing state by ID
1111
+ * @param id ID
1112
+ * @returns Flow State
1113
+ */
1114
+ get(id) {
1115
+ return this.httpService.api({
1116
+ url: `${this.SERVICE_URL}/${id}`,
1117
+ });
1118
+ }
1119
+ /**
1120
+ * Execute actions/selectors
1121
+ * @param id State ID
1122
+ * @param request Request
1123
+ * @returns Execute result
1124
+ */
1125
+ execute(id, request) {
1126
+ return this.httpService.api({
1127
+ method: 'post',
1128
+ url: `${this.SERVICE_URL}/quote/${id}/execute`,
1129
+ body: request,
1130
+ });
1131
+ }
1132
+ /**
1133
+ * Save Quote in the state
1134
+ * @param id State ID
1135
+ */
1136
+ save(id) {
1137
+ return this.httpService.api({
1138
+ method: 'post',
1139
+ url: `${this.SERVICE_URL}/quote/${id}/save`,
1140
+ });
1141
+ }
1142
+ /**
1143
+ * Submit Quote in the state
1144
+ * @param id State ID
1145
+ */
1146
+ submit(id) {
1147
+ return this.httpService.api({
1148
+ method: 'post',
1149
+ url: `${this.SERVICE_URL}/quote/${id}/submit`,
1150
+ });
1151
+ }
1152
+ /**
1153
+ * Close Flow state
1154
+ * @param id State ID
1155
+ */
1156
+ cancel(id) {
1157
+ return this.httpService.api({
1158
+ method: 'post',
1159
+ url: `${this.SERVICE_URL}/quote/${id}/cancel`,
1160
+ });
1161
+ }
1162
+ }
1163
+ FlowStateApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1164
+ FlowStateApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService });
1165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowStateApiService, decorators: [{
982
1166
  type: Injectable
983
1167
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
984
1168
 
@@ -988,17 +1172,20 @@ class FlowsApiService {
988
1172
  this.flowsKey = 'flows';
989
1173
  }
990
1174
  getFlow(id) {
991
- return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)));
1175
+ return this.fetchFlows().pipe(map(flows => flows.find(flow => flow.id == id)), map(flow => {
1176
+ if (!flow) {
1177
+ throw new Error(`Flow with flowId=${id} is not defined`);
1178
+ }
1179
+ return flow;
1180
+ }));
992
1181
  }
993
1182
  fetchFlows() {
994
- return this.configurationSettingsApiService
995
- .fetchSetting(this.flowsKey)
996
- .pipe(map((flow) => ((flow === null || flow === void 0 ? void 0 : flow.value) ? JSON.parse(flow.value) : [])));
1183
+ return this.configurationSettingsApiService.fetchSetting(this.flowsKey).pipe(map((setting) => ((setting === null || setting === void 0 ? void 0 : setting.value) ? JSON.parse(setting.value) : [])), map(anyFlows => anyFlows.map(toLatestFlow).filter(isDefined)));
997
1184
  }
998
1185
  }
999
- FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1000
- FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowsApiService });
1001
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowsApiService, decorators: [{
1186
+ FlowsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
1187
+ FlowsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService });
1188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowsApiService, decorators: [{
1002
1189
  type: Injectable
1003
1190
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
1004
1191
 
@@ -1057,9 +1244,9 @@ class GuidedSellingsAdminApiService {
1057
1244
  }
1058
1245
  }
1059
1246
  GuidedSellingsAdminApiService.MAX_RESULTS = 60;
1060
- GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1061
- GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingsAdminApiService });
1062
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
1247
+ GuidedSellingsAdminApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1248
+ GuidedSellingsAdminApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService });
1249
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingsAdminApiService, decorators: [{
1063
1250
  type: Injectable
1064
1251
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1065
1252
 
@@ -1089,9 +1276,9 @@ class GuidedSellingApiService {
1089
1276
  });
1090
1277
  }
1091
1278
  }
1092
- GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1093
- GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingApiService });
1094
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingApiService, decorators: [{
1279
+ GuidedSellingApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1280
+ GuidedSellingApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService });
1281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingApiService, decorators: [{
1095
1282
  type: Injectable
1096
1283
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1097
1284
 
@@ -1160,9 +1347,9 @@ class OffersApiService {
1160
1347
  }
1161
1348
  }
1162
1349
  OffersApiService.MAX_RESULTS = 60;
1163
- OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1164
- OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OffersApiService });
1165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OffersApiService, decorators: [{
1350
+ OffersApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1351
+ OffersApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService });
1352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OffersApiService, decorators: [{
1166
1353
  type: Injectable
1167
1354
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1168
1355
 
@@ -1177,11 +1364,11 @@ class OrgInfoApiService {
1177
1364
  return this.http.get(`${this.hostUrl}/org-info/${organizationId}`);
1178
1365
  }
1179
1366
  }
1180
- OrgInfoApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OrgInfoApiService, deps: [{ token: i4.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1181
- OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OrgInfoApiService });
1182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: OrgInfoApiService, decorators: [{
1367
+ 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 });
1368
+ OrgInfoApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService });
1369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OrgInfoApiService, decorators: [{
1183
1370
  type: Injectable
1184
- }], ctorParameters: function () { return [{ type: i4.HttpClient }]; } });
1371
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
1185
1372
 
1186
1373
  class PicklistsApiService {
1187
1374
  constructor(baseHttpService) {
@@ -1212,9 +1399,78 @@ class PicklistsApiService {
1212
1399
  };
1213
1400
  }
1214
1401
  }
1215
- PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1216
- PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PicklistsApiService });
1217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PicklistsApiService, decorators: [{
1402
+ PicklistsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1403
+ PicklistsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService });
1404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PicklistsApiService, decorators: [{
1405
+ type: Injectable
1406
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1407
+
1408
+ class PortalsApiService {
1409
+ constructor(baseHttpService) {
1410
+ this.baseHttpService = baseHttpService;
1411
+ this.serviceUrl = '/admin/portal';
1412
+ this.getPortals$ = (skip = 1, name = '') => {
1413
+ let params = new HttpParams();
1414
+ params = params.append('count', (PortalsApiService.MAX_RESULTS * skip).toString());
1415
+ params = params.append('skip', '0');
1416
+ params = params.append('name', name);
1417
+ return this.baseHttpService.api({ url: `${this.serviceUrl}`, params });
1418
+ };
1419
+ this.searchPortals$ = (skip = 0, expression) => {
1420
+ let params = new HttpParams();
1421
+ params = params.set('skip', '' + skip);
1422
+ params = params.set('count', '' + PortalsApiService.MAX_RESULTS);
1423
+ return this.baseHttpService.api({
1424
+ method: 'post',
1425
+ url: `${this.serviceUrl}/search`,
1426
+ params,
1427
+ body: expression || {},
1428
+ });
1429
+ };
1430
+ this.removePortal$ = (id) => {
1431
+ return this.baseHttpService.api({
1432
+ url: `${this.serviceUrl}/${id}`,
1433
+ method: 'delete',
1434
+ });
1435
+ };
1436
+ this.restore$ = (id) => {
1437
+ return this.baseHttpService.api({
1438
+ method: 'patch',
1439
+ url: `${this.serviceUrl}/${id}/restore`,
1440
+ });
1441
+ };
1442
+ this.duplicatePortal$ = (cloneRequest) => {
1443
+ return this.baseHttpService.api({
1444
+ url: `${this.serviceUrl}/${cloneRequest.id}/clone`,
1445
+ method: 'post',
1446
+ body: cloneRequest,
1447
+ });
1448
+ };
1449
+ this.getPortal$ = (id) => {
1450
+ return this.baseHttpService.api({
1451
+ url: `${this.serviceUrl}/${id}`,
1452
+ });
1453
+ };
1454
+ }
1455
+ createNewPortal$(body) {
1456
+ return this.baseHttpService.api({
1457
+ url: `${this.serviceUrl}`,
1458
+ method: 'post',
1459
+ body,
1460
+ });
1461
+ }
1462
+ updatePortal$(portal, settings) {
1463
+ return this.baseHttpService.api({
1464
+ url: `${this.serviceUrl}/${portal.id}`,
1465
+ method: 'put',
1466
+ body: Object.assign(Object.assign({}, portal), { settings: JSON.stringify(settings) }),
1467
+ });
1468
+ }
1469
+ }
1470
+ PortalsApiService.MAX_RESULTS = 60;
1471
+ PortalsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1472
+ PortalsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService });
1473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PortalsApiService, decorators: [{
1218
1474
  type: Injectable
1219
1475
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1220
1476
 
@@ -1272,9 +1528,9 @@ class PriceApiService {
1272
1528
  });
1273
1529
  }
1274
1530
  }
1275
- PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1276
- PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PriceApiService });
1277
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: PriceApiService, decorators: [{
1531
+ PriceApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1532
+ PriceApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService });
1533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PriceApiService, decorators: [{
1278
1534
  type: Injectable
1279
1535
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1280
1536
 
@@ -1366,9 +1622,9 @@ class ProceduresApiService {
1366
1622
  });
1367
1623
  }
1368
1624
  }
1369
- ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1370
- ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProceduresApiService });
1371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProceduresApiService, decorators: [{
1625
+ ProceduresApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1626
+ ProceduresApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService });
1627
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProceduresApiService, decorators: [{
1372
1628
  type: Injectable
1373
1629
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1374
1630
 
@@ -1514,9 +1770,9 @@ class ProductApiService {
1514
1770
  return `${this.serviceUrl}/${productId}/image`;
1515
1771
  }
1516
1772
  }
1517
- ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1518
- ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductApiService });
1519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductApiService, decorators: [{
1773
+ ProductApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1774
+ ProductApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService });
1775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductApiService, decorators: [{
1520
1776
  type: Injectable
1521
1777
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1522
1778
 
@@ -1745,9 +2001,72 @@ class ProductModelApiService {
1745
2001
  }
1746
2002
  }
1747
2003
  ProductModelApiService.MAX_RESULTS = 200;
1748
- ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1749
- ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelApiService });
1750
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ProductModelApiService, decorators: [{
2004
+ ProductModelApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2005
+ ProductModelApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService });
2006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModelApiService, decorators: [{
2007
+ type: Injectable
2008
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2009
+
2010
+ class PromotionsApiService {
2011
+ constructor(baseHttpService) {
2012
+ this.baseHttpService = baseHttpService;
2013
+ this.serviceUrl = '/admin/promotion';
2014
+ this.fetchAll$ = () => {
2015
+ return this.baseHttpService.api({ url: this.serviceUrl });
2016
+ };
2017
+ this.fetchOne$ = (id) => {
2018
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2019
+ };
2020
+ this.remove$ = (id) => {
2021
+ return this.baseHttpService.api({
2022
+ url: `${this.serviceUrl}/${id}`,
2023
+ method: 'delete',
2024
+ });
2025
+ };
2026
+ this.restore$ = (id) => {
2027
+ return this.baseHttpService.api({
2028
+ method: 'patch',
2029
+ url: `${this.serviceUrl}/${id}/restore`,
2030
+ });
2031
+ };
2032
+ this.duplicate$ = (body) => {
2033
+ return this.baseHttpService
2034
+ .api({
2035
+ url: `${this.serviceUrl}/${body.id}/clone`,
2036
+ method: 'post',
2037
+ body,
2038
+ })
2039
+ .pipe(map$1(response => response.clonedRecordId));
2040
+ };
2041
+ }
2042
+ search$(expression, skip, count) {
2043
+ let params = new HttpParams();
2044
+ if (typeof skip === 'number') {
2045
+ params = params.set('skip', '' + skip);
2046
+ }
2047
+ if (typeof count === 'number') {
2048
+ params = params.set('count', '' + count);
2049
+ }
2050
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2051
+ }
2052
+ create$(body) {
2053
+ return this.baseHttpService.api({
2054
+ url: `${this.serviceUrl}`,
2055
+ method: 'post',
2056
+ body,
2057
+ });
2058
+ }
2059
+ update$(body) {
2060
+ return this.baseHttpService.api({
2061
+ url: `${this.serviceUrl}/${body.id}`,
2062
+ method: 'put',
2063
+ body,
2064
+ });
2065
+ }
2066
+ }
2067
+ PromotionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2068
+ PromotionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService });
2069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: PromotionsApiService, decorators: [{
1751
2070
  type: Injectable
1752
2071
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1753
2072
 
@@ -1783,9 +2102,9 @@ class QuoteApiService {
1783
2102
  });
1784
2103
  }
1785
2104
  }
1786
- QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1787
- QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteApiService });
1788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: QuoteApiService, decorators: [{
2105
+ QuoteApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2106
+ QuoteApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService });
2107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteApiService, decorators: [{
1789
2108
  type: Injectable
1790
2109
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1791
2110
 
@@ -1801,9 +2120,135 @@ class RampApiService {
1801
2120
  return this.httpService.api(Object.assign({ method: 'post', url: `${this.SERVICE_URL}/renew`, body: request }, options));
1802
2121
  }
1803
2122
  }
1804
- RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1805
- RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RampApiService });
1806
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RampApiService, decorators: [{
2123
+ RampApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2124
+ RampApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService });
2125
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RampApiService, decorators: [{
2126
+ type: Injectable
2127
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2128
+
2129
+ class RebateProgramApiService {
2130
+ constructor(baseHttpService) {
2131
+ this.baseHttpService = baseHttpService;
2132
+ this.serviceUrl = '/admin/rebate-program';
2133
+ this.fetchAll$ = () => {
2134
+ return this.baseHttpService.api({ url: this.serviceUrl });
2135
+ };
2136
+ this.fetchOne$ = (id) => {
2137
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2138
+ };
2139
+ this.remove$ = (id) => {
2140
+ return this.baseHttpService.api({
2141
+ url: `${this.serviceUrl}/${id}`,
2142
+ method: 'delete',
2143
+ });
2144
+ };
2145
+ this.restore$ = (id) => {
2146
+ return this.baseHttpService.api({
2147
+ method: 'patch',
2148
+ url: `${this.serviceUrl}/${id}/restore`,
2149
+ });
2150
+ };
2151
+ this.duplicate$ = (body) => {
2152
+ return this.baseHttpService
2153
+ .api({
2154
+ url: `${this.serviceUrl}/${body.id}/clone`,
2155
+ method: 'post',
2156
+ body,
2157
+ })
2158
+ .pipe(map$1(response => response.clonedRecordId));
2159
+ };
2160
+ }
2161
+ search$(expression, skip, count) {
2162
+ let params = new HttpParams();
2163
+ if (typeof skip === 'number') {
2164
+ params = params.set('skip', '' + skip);
2165
+ }
2166
+ if (typeof count === 'number') {
2167
+ params = params.set('count', '' + count);
2168
+ }
2169
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2170
+ }
2171
+ create$(body) {
2172
+ return this.baseHttpService.api({
2173
+ url: `${this.serviceUrl}`,
2174
+ method: 'post',
2175
+ body,
2176
+ });
2177
+ }
2178
+ update$(body) {
2179
+ return this.baseHttpService.api({
2180
+ url: `${this.serviceUrl}/${body.id}`,
2181
+ method: 'put',
2182
+ body,
2183
+ });
2184
+ }
2185
+ }
2186
+ RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2187
+ RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService });
2188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateProgramApiService, decorators: [{
2189
+ type: Injectable
2190
+ }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2191
+
2192
+ class RebateTypeApiService {
2193
+ constructor(baseHttpService) {
2194
+ this.baseHttpService = baseHttpService;
2195
+ this.serviceUrl = '/admin/rebate-type';
2196
+ this.fetchAll$ = () => {
2197
+ return this.baseHttpService.api({ url: this.serviceUrl });
2198
+ };
2199
+ this.fetchOne$ = (id) => {
2200
+ return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2201
+ };
2202
+ this.remove$ = (id) => {
2203
+ return this.baseHttpService.api({
2204
+ url: `${this.serviceUrl}/${id}`,
2205
+ method: 'delete',
2206
+ });
2207
+ };
2208
+ this.restore$ = (id) => {
2209
+ return this.baseHttpService.api({
2210
+ method: 'patch',
2211
+ url: `${this.serviceUrl}/${id}/restore`,
2212
+ });
2213
+ };
2214
+ this.duplicate$ = (body) => {
2215
+ return this.baseHttpService
2216
+ .api({
2217
+ url: `${this.serviceUrl}/${body.id}/clone`,
2218
+ method: 'post',
2219
+ body,
2220
+ })
2221
+ .pipe(map$1(response => response.clonedRecordId));
2222
+ };
2223
+ }
2224
+ search$(expression, skip, count) {
2225
+ let params = new HttpParams();
2226
+ if (typeof skip === 'number') {
2227
+ params = params.set('skip', '' + skip);
2228
+ }
2229
+ if (typeof count === 'number') {
2230
+ params = params.set('count', '' + count);
2231
+ }
2232
+ return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2233
+ }
2234
+ create$(body) {
2235
+ return this.baseHttpService.api({
2236
+ url: `${this.serviceUrl}`,
2237
+ method: 'post',
2238
+ body,
2239
+ });
2240
+ }
2241
+ update$(body) {
2242
+ return this.baseHttpService.api({
2243
+ url: `${this.serviceUrl}/${body.id}`,
2244
+ method: 'put',
2245
+ body,
2246
+ });
2247
+ }
2248
+ }
2249
+ RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2250
+ RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService });
2251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RebateTypeApiService, decorators: [{
1807
2252
  type: Injectable
1808
2253
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1809
2254
 
@@ -1857,9 +2302,9 @@ class RuleGroupsApiService {
1857
2302
  };
1858
2303
  }
1859
2304
  }
1860
- RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1861
- RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuleGroupsApiService });
1862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RuleGroupsApiService, decorators: [{
2305
+ RuleGroupsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2306
+ RuleGroupsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService });
2307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RuleGroupsApiService, decorators: [{
1863
2308
  type: Injectable
1864
2309
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1865
2310
 
@@ -1929,17 +2374,26 @@ class RulesApiService {
1929
2374
  });
1930
2375
  }
1931
2376
  execute$(body) {
1932
- const url = body.rule.ruleGroupType === RuleGroupTypes.eligibility ? '/rules/eligibility/execute' : '/rules/execute';
2377
+ const url = this.getExecuteRuleUrl(body.rule.ruleGroupType);
1933
2378
  return this.baseHttpService.api({
1934
2379
  url,
1935
2380
  method: 'post',
1936
2381
  body,
1937
2382
  });
1938
2383
  }
2384
+ getExecuteRuleUrl(ruleGroupType) {
2385
+ if (ruleGroupType === RuleGroupTypes.eligibility) {
2386
+ return '/rules/eligibility/execute';
2387
+ }
2388
+ if (ruleGroupType === RuleGroupTypes.catalog) {
2389
+ return '/rules/catalog/execute';
2390
+ }
2391
+ return '/rules/execute';
2392
+ }
1939
2393
  }
1940
- RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
1941
- RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService });
1942
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RulesApiService, decorators: [{
2394
+ RulesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2395
+ RulesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService });
2396
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RulesApiService, decorators: [{
1943
2397
  type: Injectable
1944
2398
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
1945
2399
 
@@ -2013,9 +2467,9 @@ class ScriptsApiService {
2013
2467
  };
2014
2468
  }
2015
2469
  }
2016
- ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2017
- ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService });
2018
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ScriptsApiService, decorators: [{
2470
+ ScriptsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2471
+ ScriptsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService });
2472
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ScriptsApiService, decorators: [{
2019
2473
  type: Injectable
2020
2474
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2021
2475
 
@@ -2036,9 +2490,9 @@ class ShoppingCartSettingsApiService {
2036
2490
  }, {})));
2037
2491
  }
2038
2492
  }
2039
- ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2040
- ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService });
2041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2493
+ ShoppingCartSettingsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, deps: [{ token: ConfigurationSettingsApiService }], target: i0.ɵɵFactoryTarget.Injectable });
2494
+ ShoppingCartSettingsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService });
2495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartSettingsApiService, decorators: [{
2042
2496
  type: Injectable
2043
2497
  }], ctorParameters: function () { return [{ type: ConfigurationSettingsApiService }]; } });
2044
2498
 
@@ -2084,9 +2538,9 @@ class StatefulConfigurationApiService {
2084
2538
  });
2085
2539
  }
2086
2540
  }
2087
- StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2088
- StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService });
2089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2541
+ StatefulConfigurationApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2542
+ StatefulConfigurationApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService });
2543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: StatefulConfigurationApiService, decorators: [{
2090
2544
  type: Injectable
2091
2545
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2092
2546
 
@@ -2150,9 +2604,9 @@ class UIDefinitionsApiService {
2150
2604
  return `/models/${modelId}/uidefinitions`;
2151
2605
  }
2152
2606
  }
2153
- UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2154
- UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService });
2155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2607
+ UIDefinitionsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2608
+ UIDefinitionsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService });
2609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UIDefinitionsApiService, decorators: [{
2156
2610
  type: Injectable
2157
2611
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2158
2612
 
@@ -2388,6 +2842,11 @@ class UITemplatesApiService {
2388
2842
  this.fetchComponentAttachmentFile$(templateId, component.id, 'json'),
2389
2843
  ]).pipe(map$1(([html, js, css, json]) => ({ html, js, css, json })));
2390
2844
  };
2845
+ this.fetchComponentsAttachments$ = (templateId) => {
2846
+ return this.fetchComponents$(templateId).pipe(switchMap$1(components => {
2847
+ return forkJoin(components.map(component => this.fetchComponentAttachments$(templateId, component)));
2848
+ }));
2849
+ };
2391
2850
  this.fetchComponentAttachmentFile$ = (templateId, componentId, attachmentType) => {
2392
2851
  return this.baseHttpService
2393
2852
  .api({
@@ -2438,9 +2897,9 @@ class UITemplatesApiService {
2438
2897
  });
2439
2898
  }
2440
2899
  }
2441
- UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2442
- UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService });
2443
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: UITemplatesApiService, decorators: [{
2900
+ UITemplatesApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2901
+ UITemplatesApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService });
2902
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: UITemplatesApiService, decorators: [{
2444
2903
  type: Injectable
2445
2904
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2446
2905
 
@@ -2476,6 +2935,15 @@ class VeloceObjectsApiService {
2476
2935
  url: `${this.serviceUrl}/${id}`,
2477
2936
  });
2478
2937
  };
2938
+ this.duplicateObject$ = (body) => {
2939
+ return this.baseHttpService
2940
+ .api({
2941
+ method: 'post',
2942
+ url: `${this.serviceUrl}/${body.id}/clone`,
2943
+ body,
2944
+ })
2945
+ .pipe(map(response => response.clonedRecordId));
2946
+ };
2479
2947
  this.restoreObject$ = (id) => {
2480
2948
  return this.baseHttpService.api({
2481
2949
  method: 'patch',
@@ -2514,143 +2982,17 @@ class VeloceObjectsApiService {
2514
2982
  });
2515
2983
  }
2516
2984
  }
2517
- VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2518
- VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService });
2519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2520
- type: Injectable
2521
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2522
-
2523
- class RebateProgramApiService {
2524
- constructor(baseHttpService) {
2525
- this.baseHttpService = baseHttpService;
2526
- this.serviceUrl = '/admin/rebate-program';
2527
- this.fetchAll$ = () => {
2528
- return this.baseHttpService.api({ url: this.serviceUrl });
2529
- };
2530
- this.fetchOne$ = (id) => {
2531
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2532
- };
2533
- this.remove$ = (id) => {
2534
- return this.baseHttpService.api({
2535
- url: `${this.serviceUrl}/${id}`,
2536
- method: 'delete',
2537
- });
2538
- };
2539
- this.restore$ = (id) => {
2540
- return this.baseHttpService.api({
2541
- method: 'patch',
2542
- url: `${this.serviceUrl}/${id}/restore`,
2543
- });
2544
- };
2545
- this.duplicate$ = (body) => {
2546
- return this.baseHttpService
2547
- .api({
2548
- url: `${this.serviceUrl}/${body.id}/clone`,
2549
- method: 'post',
2550
- body,
2551
- })
2552
- .pipe(map$1(response => response.clonedRecordId));
2553
- };
2554
- }
2555
- search$(expression, skip, count) {
2556
- let params = new HttpParams();
2557
- if (typeof skip === 'number') {
2558
- params = params.set('skip', '' + skip);
2559
- }
2560
- if (typeof count === 'number') {
2561
- params = params.set('count', '' + count);
2562
- }
2563
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2564
- }
2565
- create$(body) {
2566
- return this.baseHttpService.api({
2567
- url: `${this.serviceUrl}`,
2568
- method: 'post',
2569
- body,
2570
- });
2571
- }
2572
- update$(body) {
2573
- return this.baseHttpService.api({
2574
- url: `${this.serviceUrl}/${body.id}`,
2575
- method: 'put',
2576
- body,
2577
- });
2578
- }
2579
- }
2580
- RebateProgramApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2581
- RebateProgramApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService });
2582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateProgramApiService, decorators: [{
2583
- type: Injectable
2584
- }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2585
-
2586
- class RebateTypeApiService {
2587
- constructor(baseHttpService) {
2588
- this.baseHttpService = baseHttpService;
2589
- this.serviceUrl = '/admin/rebate-type';
2590
- this.fetchAll$ = () => {
2591
- return this.baseHttpService.api({ url: this.serviceUrl });
2592
- };
2593
- this.fetchOne$ = (id) => {
2594
- return this.baseHttpService.api({ url: `${this.serviceUrl}/${id}` });
2595
- };
2596
- this.remove$ = (id) => {
2597
- return this.baseHttpService.api({
2598
- url: `${this.serviceUrl}/${id}`,
2599
- method: 'delete',
2600
- });
2601
- };
2602
- this.restore$ = (id) => {
2603
- return this.baseHttpService.api({
2604
- method: 'patch',
2605
- url: `${this.serviceUrl}/${id}/restore`,
2606
- });
2607
- };
2608
- this.duplicate$ = (body) => {
2609
- return this.baseHttpService
2610
- .api({
2611
- url: `${this.serviceUrl}/${body.id}/clone`,
2612
- method: 'post',
2613
- body,
2614
- })
2615
- .pipe(map$1(response => response.clonedRecordId));
2616
- };
2617
- }
2618
- search$(expression, skip, count) {
2619
- let params = new HttpParams();
2620
- if (typeof skip === 'number') {
2621
- params = params.set('skip', '' + skip);
2622
- }
2623
- if (typeof count === 'number') {
2624
- params = params.set('count', '' + count);
2625
- }
2626
- return this.baseHttpService.api({ method: 'post', url: `${this.serviceUrl}/search`, params, body: expression });
2627
- }
2628
- create$(body) {
2629
- return this.baseHttpService.api({
2630
- url: `${this.serviceUrl}`,
2631
- method: 'post',
2632
- body,
2633
- });
2634
- }
2635
- update$(body) {
2636
- return this.baseHttpService.api({
2637
- url: `${this.serviceUrl}/${body.id}`,
2638
- method: 'put',
2639
- body,
2640
- });
2641
- }
2642
- }
2643
- RebateTypeApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2644
- RebateTypeApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService });
2645
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: RebateTypeApiService, decorators: [{
2985
+ VeloceObjectsApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, deps: [{ token: i1.BaseHttpService }], target: i0.ɵɵFactoryTarget.Injectable });
2986
+ VeloceObjectsApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService });
2987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: VeloceObjectsApiService, decorators: [{
2646
2988
  type: Injectable
2647
2989
  }], ctorParameters: function () { return [{ type: i1.BaseHttpService }]; } });
2648
2990
 
2649
2991
  class ApiModule {
2650
2992
  }
2651
- ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2652
- ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2653
- ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, providers: [
2993
+ ApiModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2994
+ ApiModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, imports: [HttpClientModule] });
2995
+ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, providers: [
2654
2996
  BaseHttpService,
2655
2997
  XrayService,
2656
2998
  ConfigurationApiService,
@@ -2686,8 +3028,14 @@ ApiModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
2686
3028
  StatefulConfigurationApiService,
2687
3029
  RebateProgramApiService,
2688
3030
  RebateTypeApiService,
3031
+ PromotionsApiService,
3032
+ VeloceAuthService,
3033
+ ContractedPriceApiService,
3034
+ PortalsApiService,
3035
+ ConfigurationProcessorsApiService,
3036
+ FlowStateApiService,
2689
3037
  ], imports: [HttpClientModule] });
2690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: ApiModule, decorators: [{
3038
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ApiModule, decorators: [{
2691
3039
  type: NgModule,
2692
3040
  args: [{
2693
3041
  imports: [HttpClientModule],
@@ -2727,6 +3075,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2727
3075
  StatefulConfigurationApiService,
2728
3076
  RebateProgramApiService,
2729
3077
  RebateTypeApiService,
3078
+ PromotionsApiService,
3079
+ VeloceAuthService,
3080
+ ContractedPriceApiService,
3081
+ PortalsApiService,
3082
+ ConfigurationProcessorsApiService,
3083
+ FlowStateApiService,
2730
3084
  ],
2731
3085
  }]
2732
3086
  }] });
@@ -2735,5 +3089,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
2735
3089
  * Generated bundle index. Do not edit.
2736
3090
  */
2737
3091
 
2738
- 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 };
3092
+ 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 };
2739
3093
  //# sourceMappingURL=veloceapps-api.mjs.map